Communication style pattern Flashcards

1
Q

Communcation style pattern

A

Remote Procedure Invocation
Messaging
Domain-specific protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Remote Procedure Invocation (RPI): context

A

You have applied the Microservice architecture pattern. Services must handle requests from the application’s clients. Furthermore, services must sometimes collaborate to handle those requests. They must use an inter-process communication protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Remote Procedure Invocation (RPI): solution

A

Use RPI for inter-service communication. The client uses a request/reply-based protocol to make requests to a service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Remote Procedure Invocation (RPI): example

A

REST
gRPC
Apache Thrift

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Remote Procedure Invocation (RPI): result benefits

A
  • Simple and familiar
  • Request/reply is easy
  • Simpler system since there in no intermediate broker
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Remote Procedure Invocation (RPI): result drawbacks

A
  • Usually only supports request/reply and not other interaction patterns such as notifications, request/async response, publish/subscribe, publish/async response
  • Reduced availability since the client and the service must be available for the duration of the interaction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Remote Procedure Invocation (RPI): result issues

A

Client needs to discover locations of service instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Remote Procedure Invocation (RPI): related

A

The Domain-specific protocol is an alternative pattern
The Messaging is an alternative pattern
Externalized configuration supplies the (logical) network location, e.g. URL, of the service.
A client must use either Client-side discovery and Server-side discovery to locate a service instance
A client will typically use the Circuit Breaker pattern to improve reliability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Messaging: context

A

You have applied the Microservice architecture pattern. Services must handle requests from the application’s clients. Furthermore, services must sometimes collaborate to handle those requests. They must use an inter-process communication protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Messaging: solution

A

Use asynchronous messaging for inter-service communication. Services communicating by exchanging messages over messaging channels.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Messaging: examples

A

There are numerous examples of asynchronous messaging technologies

Apache Kafka
RabbitMQ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Messaging: result benefits

A
  • Loose runtime coupling since it decouples the message sender from the consumer
  • Improved availability since the message broker buffers messages until the consumer is able to process them
  • Supports a variety of communication patterns including request/reply, notifications, request/async response, publish/subscribe, publish/async response etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Messaging: result drawback

A

Additional complexity of message broker, which must be highly available

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Messaging: result issues

A

Request/reply-style communication is more complex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Messaging: related

A
  • The Saga pattern and CQRS pattern use messaging
  • The Transactional Outbox pattern enables messages to be sent as part of a database transaction
  • The Externalized configuration pattern supplies the (logical) message channel names and the location of the message broker
  • The Domain-specific protocol pattern is an alternative pattern
  • The RPI pattern is an alternative pattern
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Messaging: related

A

Enterprise Integration Patterns - a comprehensive set of message patterns
The Event Tram framework, which implements transaction messaging for microservices

17
Q

Domain-specific protocol: context

A

You have applied the Microservice architecture pattern. Services must handle requests from the application’s clients. Furthermore, services must sometimes collaborate to handle those requests. They must use an inter-process communication protocol.

18
Q

Domain-specific protocol: solution

A

Use a domain-specific protocol for inter-service communication.

19
Q

Domain-specific protocol: example

A

There are numerous domain-specific protocols including:

  • Email protocols such as SMTP and IMAP
  • Media streaming protocols such as RTMP, HLS, and HDS
20
Q

Domain-specific protocol: related

A
  • The Messaging pattern is an alternative pattern

* The RPI pattern is an alternative pattern