Module 7, 8, 9, 10, 11 - Interprocess communication Flashcards

1
Q

Why is there a need for interprocess communication

A
  1. Exchange data with another microservice

2. Induce status change/invoke business logic in another microservice

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

Types of communication pattern

A
  1. How many receivers
    • 1 receiver = one-to-one
    • Many receivers = one-to-many
    • Selected receivers = one-to-selected
  2. Does the sender expect a reply
    • No: Fire-and-forget
    • Yes: Request- reply
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Types of communication technologies

A
  1. Invocation-based (HTTP Calls, function calls)

2. Messaging based (go through message broker)

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

Characteristics of invocation-based

A
  1. Tightly coupled (if one go down, cannot work)
  2. Code dependencies
  3. Don’t need to maintain broker
  4. If receiver offline, sender cannot send data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Characteristics of messaging-based

A
  1. Single point of failure in the messaging broker
  2. Less tightly coupled than invocation
  3. Can help facilitate 1-many communication
  4. Need to maintain broker
  5. Even if receiver die, sender still can send data and data is stored in queue.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

For messaging-based, does the receiver need to attend to message immediately

A

No. Messages stored at the queue and the receiver listen to the queue whenever

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

What is inside a message

A
  1. Networking info
  2. Properties
  3. Message body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is AMQP, RabbitMQ, Pika

A

Advanced messaging queuing protocol
As long as both sides AMQP compliant, can use AMQP technologies

RabbitMQ is implementation of AMQP
Pika is python module that allows the use of RabbitMQ
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Types of exchange

A
  1. Direct exchange
    - Deliver message whose routing key matches exactly the binding key of the queue
  2. Topic exchange
    - Does wildcard matching between routing key of message and binding key of queue
    - * means exactly 1
    - # means 0 or many
  3. Fanout exchange
    - Send the message to every queue bound to the exchange
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In a request reply, what does the sender need to send

A
  1. Correlation ID

2. Reply-to-queue

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