Module 4 - Communication Flashcards
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?
In order to provide access transparency my isolating the application from the transport layer (TCP & UDP)
What are RPCs (Remote Procedure Calls)
What happens to the stack in RPCs?
<p></p>
<p>A transient communication abstraction, which behaves similarly to a conventional procedure call which passes parameters on the stack</p>
<p></p>
<p>RPCs are implemented using a client-server protocol. How does this work?</p>
<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>
<p></p>
<p>What is a "stub"</p>
<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>
What are the 10 steps of the execution of an RPC
- this one is hard :’) *
- The client process invokes the client stub using an ordinary procedure call
- The client stub builds a message and passes it to the client’s OS
- The client’s OS sends the message to the server’s OS
- The server’s OS delivers the message to the server stub
- The server stub unpacks the parameters and invokes the appropriate service handler in the server process
- The service handler does the work and returns the result to the server stub
- The server stub packs the result into a message and passes it to the server OS
- The server’s OS sends the message to the client’s OS
- The client’s OS delivers the message to the client stub
- The client stub unpacks the result and returns it to the client process
<p></p>
<p>What is parameter mashalling?</p>
<p></p>
<p>The act of packing parameter values into a message (building a message)</p>
<p></p>
<p>In what way are values such as numbers and strings represented on different hardware platforms?</p>
<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>
<p></p>
<p>Does endianness concern the implementation of network protocols?</p>
<p></p>
<p>Yes, it does. Bit transmission can be little or big endian. IP uses a big-endian network byte layer</p>
<p>How are RPC signatures defined? What is the mechanism behind this?</p>
<p>Using interface definition language (IDL)
<br></br>
<br></br>The IDL is compiled into a client stub and a server stub.</p>
<p>What defines the RPC's mutual agreement regarding the metadata between the client and the server? How much detail is provided?</p>
<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>
<p>Outline the difference between Synchronous and Asynchronous RPCs</p>
<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>
<p>Do Asynchronous RPC clients wait for acknowledgements of completion from the server?</p>
<p>No. They are one-way RPCs</p>
<p>In Asynchronous RPC clients, when does the client stop waiting in the timeline?</p>
<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>
<p>In Asynchronous RPC clients, how does the client get back the response data from the server?</p>
<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>
<p>An alternative to RPCs is the message queuing model. What sets apart the message queuing model from RPCs?</p>
<p>Message queues persists sent messages until they are consumed by a receiver. RPCs simply invoke a call on a remote process</p>