Lecture 7 - Communication II - Some random things I got to know Flashcards
What is Persisten communication?
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.
What is Transient communication?
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.
What is Synchronous communication?
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.
What is Asynchronous communication?
A sender continues immediatly after submitting its message for transmission.
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.
What are two major weaknesses with RPC?
- Both the sender and the receiver have to be running druing message exchanges (coupled in time)
- Trditional RPC is synchronous - blocking mechanism
What is the essence of Persisten Message-Oriented-Middlewear (MOM)?
- 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.
What does asynchronous communication mean?
a) In the context of RPC
b) In the context of MoM
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.
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) Producer and consumer can exchange messages without being synchronised
In asynchronous RPC model:
a) Sender or receiver is not blocked during RPC exchanges
b) Multiple threads can be used
BOTH are correct!
a) Sender or receiver is not blocked during RPC exchanges
b) Multiple threads can be used
What type of communication exist between producer (POST) and consumer (GET) in REST model?
a) Persistent
b) Synchronous
c) Transient
d) Asynchronous
a) Persistent
d) Asynchronous
RPC communication model is:
a) Persisten
b) Transient
c) I dun now nothin
b) Transient
Both sender and reciever need to be active!
In Message-Oriented Middleware, the communication between the producer/publisher and the broker is:
a) Synchronous
b) Asynchronous
a) Synchronous
REST communication style requires a persisten storage
a) True
b) False
a) True