Lecture 7 - Communication II - Some random things I got to know Flashcards

1
Q

What is Persisten communication?

A

A message that has been submitted for transmission is stored by the communication middleware for as long as it takes to deliver it to the receiver (think about messaging system)
Sosial media, snapchat, messenger etc.
Your chat will go through different servers “brokers” where these messages will be stored.

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

What is Transient communication?

A

The message is stored only during the period that the sender and receiver are executing.
An example of this would be a router which stores your packet for a limited time before its sent away, or deleted.

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

What is Synchronous communication?

A

Sender is blocked until its request is know to be accepted.

Example:
When trying to communicate with an RPC server, but the server isn’t able to “reply”, the sender is stuck “blocked” from doing anything before its gotten a reply from the server.

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

What is Asynchronous communication?

A

A sender continues immediatly after submitting its message for transmission.

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

We need to make it multithreaded, so that each request “spawns” a new thread that takes care of the request, and unblocks the sender (A and C). If results need to be handed over agan, we have a callback function.

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

What are two major weaknesses with RPC?

A
  • Both the sender and the receiver have to be running druing message exchanges (coupled in time)
  • Trditional RPC is synchronous - blocking mechanism
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the essence of Persisten Message-Oriented-Middlewear (MOM)?

A
  • Asynchronous persisten communication through support of middleware-level queues.
  • Applications communicate by inserting messages in specific queues.
  • Queues correspond to buffers at communication servers.
  • Allows us to have a loosely coupled architecture
  • Processes are loosly couples in time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does asynchronous communication mean?

a) In the context of RPC

b) In the context of MoM

A

a) In RPC we need multithreading to spawn new processes that take care of each request, so we unblock the sender, and a callback function to retrieve results.

In RPC the sender and reciever need to be running at the same time, they are coupled in time. We made then asynchronous by unblocking the sender/reciever but the NEED to be active at the same time.

b) In MoM we have support of middleware-level queues, and applications communicate by inserting messages in specific queues.

In MoM the sender and reciever can be in any state. You can send a message, close the application, and your friend/enemy will be able to get the message eventually.
They are NOT coupled in time, they are loosly coupled.

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

In Message Oriented Middleware:

a) Producer and consumer can exchange messages without being synchronised

b) Producer and the broker can exchange messages without being synchronised

A

a) Producer and consumer can exchange messages without being synchronised

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

In asynchronous RPC model:

a) Sender or receiver is not blocked during RPC exchanges

b) Multiple threads can be used

A

BOTH are correct!
a) Sender or receiver is not blocked during RPC exchanges

b) Multiple threads can be used

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

What type of communication exist between producer (POST) and consumer (GET) in REST model?

a) Persistent
b) Synchronous
c) Transient
d) Asynchronous

A

a) Persistent
d) Asynchronous

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

RPC communication model is:

a) Persisten
b) Transient
c) I dun now nothin

A

b) Transient

Both sender and reciever need to be active!

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

In Message-Oriented Middleware, the communication between the producer/publisher and the broker is:

a) Synchronous
b) Asynchronous

A

a) Synchronous

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

REST communication style requires a persisten storage

a) True
b) False

A

a) True

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