Module 4 - Communication Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

In the layered network model, there exists a middleware protocol in which IPC is facilitated below the application layer.

What is the purpose of this middleware protocol?

A

In order to provide access transparency my isolating the application from the transport layer (TCP & UDP)

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

What are RPCs (Remote Procedure Calls)

What happens to the stack in RPCs?

A

<p></p>

<p>A transient communication abstraction, which behaves similarly to a conventional procedure call which passes parameters on the stack</p>

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

<p></p>

<p>RPCs are implemented using a client-server protocol. How does this work?</p>

A

<p></p>

<p>The application calls an RPC using a client stub that translates the call to a protocol message that is received and processed at the server by a server stub
<br></br>
<br></br>Note that the image is an example of a synchronous RPC</p>

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

<p></p>

<p>What is a "stub"</p>

A

<p></p>

<p>A stub is a small program routine that substitutes for a longer program, possibly to be loaded later or that is located remotely</p>

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

What are the 10 steps of the execution of an RPC

  • this one is hard :’) *
A
  1. The client process invokes the client stub using an ordinary procedure call
  2. The client stub builds a message and passes it to the client’s OS
  3. The client’s OS sends the message to the server’s OS
  4. The server’s OS delivers the message to the server stub
  5. The server stub unpacks the parameters and invokes the appropriate service handler in the server process
  6. The service handler does the work and returns the result to the server stub
  7. The server stub packs the result into a message and passes it to the server OS
  8. The server’s OS sends the message to the client’s OS
  9. The client’s OS delivers the message to the client stub
  10. The client stub unpacks the result and returns it to the client process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

<p></p>

<p>What is parameter mashalling?</p>

A

<p></p>

<p>The act of packing parameter values into a message (building a message)</p>

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

<p></p>

<p>In what way are values such as numbers and strings represented on different hardware platforms?</p>

A

<p></p>

<p>little-endian vs big-endian
<br></br>
<br></br>For example, intel x86 is little-endian but JVM stores data items in big-endian</p>

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

<p></p>

<p>Does endianness concern the implementation of network protocols?</p>

A

<p></p>

<p>Yes, it does. Bit transmission can be little or big endian. IP uses a big-endian network byte layer</p>

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

<p>How are RPC signatures defined? What is the mechanism behind this?</p>

A

<p>Using interface definition language (IDL)
<br></br>
<br></br>The IDL is compiled into a client stub and a server stub.</p>

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

<p>What defines the RPC's mutual agreement regarding the metadata between the client and the server? How much detail is provided?</p>

A

<p>The IDL compiler determines the high-level format of protocol messages for a given RPC, including details about the order of parameters, size of parameters, endianness, binary format, etc</p>

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

<p>Outline the difference between Synchronous and Asynchronous RPCs</p>

A

<p>Synchronous RPC: The client waits for the return value while the server executes the procedure
<br></br>
<br></br>Asynchronous RPC: The client resumes executing as soon as the server acknowledges the receipt of the request. There is a callback function that is called by the server to return the result back to the client.</p>

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

<p>Do Asynchronous RPC clients wait for acknowledgements of completion from the server?</p>

A

<p>No. They are one-way RPCs</p>

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

<p>In Asynchronous RPC clients, when does the client stop waiting in the timeline?</p>

A

<p>Clients stop waiting after the server acknowledges that the request has been received - this is before the result of the request is computed</p>

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

<p>In Asynchronous RPC clients, how does the client get back the response data from the server?</p>

A

<p>The server invokes a callback which is provided by the client to record the response which was computed on the server.<br></br>
<br></br>
The callback function may execute in a dedicated thread</p>

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

<p>An alternative to RPCs is the message queuing model. What sets apart the message queuing model from RPCs?</p>

A

<p>Message queues persists sent messages until they are consumed by a receiver. RPCs simply invoke a call on a remote process</p>

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

<p>Describe how the message queuing model works for sending and receiving messages & with respect to time</p>

A

<p>When messages are sent, they are persisted until they are consumed by a receiver. This enables persistent communication which is loosely coupled with time (time does not matter)</p>

17
Q

<p>What are the 4 primitives for the message queuing model? Describe their meaning</p>

A

PUT - Append a message to a specified queue
GET - Block until the specified queue is nonempty, and remove the first message (FIFO)
POLL - Check a specified queue for messages, and remove the first. Never block
NOTIFY - Install a callback function to be called when a message is put into the specified queue

18
Q

What are some disadvantages to using the message queuing model?

A
  • The delivery of a message after it is sent depends on the receiver, and cannot be guaranteed by the sender
  • More infrastructure is required
19
Q

<p>The message queueing model, and the publish-subscribe model are examples of what type of middleware? How is it characterized?</p>

A

<p>They are message-oriented middleware (MOM), characterized by asynchronous message passing</p>

20
Q

What is Referential coupling?

List an example with RPC and MOM

A

Referential coupling is when one process explicitly references another process.

RPC example: RPC client connects to server using an IP address and a port number

MOM example: Publisher inserts a news item into a message queue andknows exactlywhich Subscriber will read it

21
Q

What is Temporalcoupling?

Give an example with RPC and MOM

A

A type of coupling in which both communicating processes must be up and running

RPC example: A client cannot execute an RPC if the server is down
MOM example: A client cannot get a response if it places a message in a queue and it never gets consumed

22
Q

Compare RPC (Remote-Procedure Call)to MOM (Message-Oriented Model) extensively

A
  • RPC is used mostly for two-way communication in which client requires immediate response from the serverwhereas MOM is used mostly for one-way communication where the sender does not care about a response
  • In RPC,the middleware is linked into the client and server processes and no additional software infrastructure is needed, whereas in MOM, the middleware is a separate component sandwiched between the sender and the receiver
  • RPC is more tightly coupled, and the server failure can halt the client whereas MOM is more loosely coupled and it isolates the processes from each other, contributing to scalability and flexibility