Proxies and Skeletons: Proxy: Client Stub
Proxies and Skeletons: Proxy: Client Stub
• 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
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