70 likes | 180 Views
CS 775/875: Fall 2000. Chapter 5: Distributed Objects and Remote Invocation. Terminology. Remote procedure call (RPC) Remote method invocation (RMI) Middleware: RMI,RPC,RR, XDR Interface definition language (IDL) CORBA IDL: struct Person { string name; string place; long year;}
E N D
CS 775/875: Fall 2000 Chapter 5: Distributed Objects and Remote Invocation
Terminology • Remote procedure call (RPC) • Remote method invocation (RMI) • Middleware: RMI,RPC,RR, XDR • Interface definition language (IDL) CORBA IDL: struct Person { string name; string place; long year;} interface PersonList { readonly attribute string listname; void addPerson(in Person p); void getperson(in string name, out Person p); long number(); };
Communication between distributed objects • The object model: Object reference, interfaces, actions, exceptions, garbage collection • Distributed objects: Client-server or other architectures • Distributed object model: Remote method invocation (when invoker is in a different process than the object), remote object references, remote interfaces, actions (RMI), garbage collection, exceptions
Design Issues for RMI • Local invocations are always exactly-once; but RMI has other options---maybe, at-least-once, at-most-once • Transparency---no distinction between local and remote invocations for users • Implementation of RMI: Communication module, remote reference module (remote objects and proxies), Proxy, dispatcher, and skeleton, the binder, server threads, activation of remote objects, persistent object storage, location service
Remote Procedure Call • Similar to RMI • Sun RPC case study: XDR, numerical Ids for programs/procedures, port mapper as local registry of services (runs at a well-known port)
Events and notifications • Events---manipulating a button, entering text via keyboard, etc. • Publish-subscribe paradigm • Distributed event-based systems: Heterogeneous and asynchronous • Participants: Object of interest, event, notification, subscriber, observer objects, publisher • Role of observer: forwarding, filtering, patterns of events, notification mailboxes (hold notifications)
Java RMI Case Study • Remote interfaces---Remote • parameters and result passing: zero or more input parameters; 0 or 1 output parameter; serializable objects • RMI registry---Maps textual URL-style names to references to remote objects hosted locally • Server program, client program • Callbacks: A mechanism for a server to inform a client of an event