CH-02 Distributed Objects & File System
CH-02 Distributed Objects & File System
CH – 02
Distributed Objects and File System
• Like a regular object but it can be accessed from anywhere on the network
remotely. (E.g.: Client and Server Objects)
• Failure: Distributed objects have far more points of failure than typical local
objects.
3
© Baikuntha Acharya (baikunth2a@gmail.com)
Communication in Distributed Objects
✓ Communication channel is realized by using two generated objects:
• Stubs or proxy – client side object that acts as gateway for all outgoing requests.
• can be written up manually or generated
• wraps client object functionality and adds network logic for reliable communication
• Skeletons – server side object that acts as a getaway for incoming client requests.
• can be written up manually or generated
• wraps server object functionality and exposes it to the clients and adds network logic
• stub marshalls call type and the input arguments into a request message
• client stub sends the message over the network to the server and blocks the
current execution thread
• skeleton unpacks call type from the request message and looks up the procedure
on the called object
• skeleton sends the message over the network back to the client
• stub passes output arguments to the caller, releases execution thread and caller
then continues in execution
6
© Baikuntha Acharya (baikunth2a@gmail.com)
Basic RPC Operation
✓ Remote Procedure Call (RPC) is an inter-process communication technique
which is used for client-server applications.
• executes a subroutine in different address space without specifically coding the details for
the remote interaction.
7
© Baikuntha Acharya (baikunth2a@gmail.com)
Basic RPC Operation (Cont..)
✓ Typical RPC Example
8
© Baikuntha Acharya (baikunth2a@gmail.com)
RPC Operation (Cont..)
Characteristics & Features of RPC
✓ Features of RPC
• Simple call syntax
9
© Baikuntha Acharya (baikunth2a@gmail.com)
RPC Operation (Cont..)
Advantages/Disadvantages of RPC
✓ Advantages:
• Uses the conventional use of procedure calls in high-level languages.
• RPC makes the internal message passing mechanism hidden from the user.
• provides abstraction.
✓ Disadvantages:
• Supports pass by value only (not pass by reference)
• RPC (and return) time (i.e., overheads) can be significantly lower than that for a local procedure.
• Not offers any flexibility in RPC for hardware architecture as It is mostly interaction-based.
10
© Baikuntha Acharya (baikunth2a@gmail.com)
RPC Operation (Cont..)
Call Semantics in RPC Communication
• caller waits until a pre-determined timeout period and then continues to execute
• this semantics does not guarantee the receipt of call message nor the execution.
• call is keep repeating until result of procedure execution is received by the caller.
• results of the last executed call are used by the caller (last-once semantics)
• easy to implement for two nodes but tricky for nested RPCs and cases by orphan
calls.
12
© Baikuntha Acharya (baikunth2a@gmail.com)
References
13
© Baikuntha Acharya (baikunth2a@gmail.com)