0% found this document useful (0 votes)
506 views

Proxies and Skeletons: Proxy: Client Stub

This document discusses proxies and skeletons in distributed systems. A proxy is a client stub that maintains server information and handles serialization/deserialization of parameters. A skeleton is a server stub that handles deserialization and passes parameters to the server. Proxies set up and tear down connections, while skeletons send results back to the proxy.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
506 views

Proxies and Skeletons: Proxy: Client Stub

This document discusses proxies and skeletons in distributed systems. A proxy is a client stub that maintains server information and handles serialization/deserialization of parameters. A skeleton is a server stub that handles deserialization and passes parameters to the server. Proxies set up and tear down connections, while skeletons send results back to the proxy.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Proxies and Skeletons

• Proxy: client stub


– Maintains server ID, endpoint, object ID
– Sets up and tears down connection with the server
– [Java:] does serialization of local object parameters
– In practice, can be downloaded/constructed on the fly (why
can’t this be done for RPCs in general?)
• Skeleton: server stub
– Does deserialization and passes parameters to server and sends
result to proxy

• Interface
– The interface of a module specifies accessible procedures and variables
that can be accessed from other modules
– Inner alteration won’t affect the user of the interface
• Interface in distributed system
– Can’t access variables directly
– Input argument and output argument
– Pointers can’t be passed as arguments or returned results
Distributed object
Figure 5.3
remote
Distributed garbage collection
invocation
• It is based on reference counting.
– Whenever a remote object reference enters a process, a proxy will be
created and will be created and will stay there for as long as it is needed.
A B
– The process where the object lives should be informed of the new proxy at
the client.
– Then later when there is no longer a proxy at the client, the server should
be informed.
• A temporary entry is added until the addRef arrives
• The case where removeRef fails is delt with by leases

• each process contains objects, some


others only local invocations.
• Method invocations between object
method invocations, otherwise local
• objects that can receive remote invo
• objects need to know the remote obj
in order to invoke its methods. E.g.
• the remote interface specifies the me
Proxy: client stub
– Maintains server ID, endpoint, object ID
– Sets up and tears down connection with the server
– [Java:] does serialization of local object parameters
– In practice, can be downloaded/constructed on the fly (why
can’t this be done for RPCs in general?)
Skeleton: server stub
– Does deserialization and passes parameters to server and sends
result to proxy

Server
– Defines interface and implements interface methods
– Server program
• Creates server object and registers object with “remote
object” registry
• Client
– Looks up server in remote object registru
– Uses normal method call syntax for remote methos
• Java tools
– Rmiregistry: server-side name server
– Rmic: uses server interface to create client and server stubs

You might also like