Distributed Computing
Dr. Nazneen Pendhari
Distributed Objects
●We Expand the idea of RPCs to invocations on remote objects
● Data (state) and operations on those data are
encapsulated into an object
● Operations are implemented as methods and are
accessible through interfaces
Remote Object ● An object offers only its interface to clients.
Invocation ● An object may implement many interfaces;
● Given an interface definition, there may be several objects
that offer an implementation for it
Distributed Objects
●A client binds to a distributed object: an implementation of
the object’s interface, called a proxy, is loaded into the client’s
address space
● Proxy(analog to a client stub):
Remote Object ● ➢ Marshals method invocations into messages &
Invocation ● ➢ Un-marshals reply messages Actual object at a
server machine: offers the same interface
● Skeleton (analog to server stub):
● Un-marshals requests to proper method invocations at
the object’s interface at the server
Remote Object
Invocation
Distributed Objects
Compile-time objects:
● Related to language-level objects (e.g., Java, C++)
Remote Object ● Objects defined as instances of a class
Invocation ● Compiling the class definition results in code that allows to
instantiate Java objects
●Language-level objects, from which proxy and skeletons are
automatically generated.
●Depends on the particular language
Distributed Objects
Runtime objects:
● Can be implemented in any language, but require use of an
object adapter that makes the implementation appear as an
Remote Object object.
Invocation ●Adapter: objects defined based on their interfaces
●Register an implementation at the adapter
Distributed Objects
Transient objects:
● live only by virtue of a server: if the server exits, so will the
object.
Remote Object
Invocation
Persistent objects:
●live independently from a server: if a server exits, the object’s
state and code remain (passively) on disk
Binding a Client to an Object
●Provide system-wide object references, freely passed between
processes on different machines
● Reference denotes the server machine plus an endpoint for the
Remote Object object server, an id of which object
Invocation
● When a process holds an object reference, it must first bind to
the object
● Bind: the local proxy (stub) is instantiated and initialized for
specific object – implementing an interface for the object
methods
Binding a Client to an Object
Two ways of binding:
●Implicit binding: Invoke methods directly on the referenced
Remote Object object (requires global references)
Invocation
●Explicit binding: Client must first explicitly bind to object before
invoking it (generally returns a pointer to a proxy that then
becomes locally available)