Please enable JavaScript.
Coggle requires JavaScript to display documents.
Remote Invocation (Remote Method Invocation (Implementation (Diagram 21),…
Exchange Protocols
3 protocols
Request-reply-acknowledge reply: client sends request, server replies, client acknowledges reply = at-most-once
Request-reply (RR): client sends request, server replies = at-least-once (HTTP protocol)
-
Invocation semantics
Define what the client can assume about the execution of the remote procedure; offers different reliability guarantees in terms of the number of times that the remote procedure is executed
3 semantics
-
At-least-once
-
-
-
Need to handle duplicate requests: run method again? (needs to be idempotent!) store replies? timeout for how long? how much memory is needed?
-
At-most-once
-
-
-
Need to handle no acknowledgements: keep state on both sides to know when or not to respond/receive acknowledgements
-
-
-
-
HTTP protocol
Specifies
-
Methods, arguments, results
-
-
-
Original version did not persist connections -> overload the server + network (new ones have persistent connections)
-
Remote Procedure Call
-
Diagram 16
-
Client stub procedure: Marshals procedure identifiers + arguments which is handed to the communication module. Unmarshalls results in the reply
Dispatcher: selects the server stub based on the procedure identifier and forwards the request to the server stub
Server stub procedure: unmarshalls arguments in the request msg and forwards it to the service procedure. Marshalls the arguments in the result msg and returns it to the client
Sun RPC
Defines the remote interface using the interface definition language XDR (external data representation)|
A compiler rpcgen for compiling the remote interface; generates header, server stub and client stub
-
-
-
-
-
Remote Method Invocation
-
Request-reply protocol
-
doOperation, getRequest, sendReply
-
Failure model considers
-
-
Handling lost reply messages (strategy depends on whether the server operations are idempotent (an operation that can be performed repeatedly e.g delete a file b/n two peers)
History - if servers have to send replies without re-execution, a history has to be maintained
-
-
-
-
Object location
-
Remote object reference contains internet address + port number that created the remote object --> restricts the object to reside within the same process
-
-
-
-