






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Operating Systems; Subject: Computer Science; University: University of Texas - San Antonio; Term: Spring 2001;
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







❚ Approaches for distributed communication ❚ Interfaces ❚ Objects ❚ Java remote invocation (RMI) ❚ An example application ❚ The registry
❚ Remote procedure call – client calls the procedure in a server program that is running in a different process
❚ Remote method invocation (RMI) – an object in one process can invoke methods of objects in another process
❚ Event notification – objects receive notification of events at other objects for which they have registered
These mechanism must be location-transparent.
Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3
Figure 5. Middleware layers
Applications
Middleware Request reply protocol layers External data representation Operating System
RMI, RPC and events
❚ Specify procedures (methods) and variables that can be accessed in a module
❚ No information other than that specified by the interface can be communicated.
❚ Do not specify an implementation
❚ Types of interfaces:
❙ Service interface (RPC) ❙ Remote interface (RMI)
❚ CORBA – Common Object Request Broker Architecture
❚ Java RMI
❚ Microsoft’s Distributed Common Object Model (DCOM, now COM)
❚ An object encapsulates both data and methods
❚ Objects are accessed via object references
❚ Interfaces – provide definitions of signature of a set of methods
❚ Actions are performed in OO by having objects invoke methods of other objects.
❚ Invocation can cause:
❙ the state of the receiver to be changed (modifier methods) ❙ additional invocations of methods on other objects
❚ Exceptions are thrown when an error occurs. If object doesn’t “catch” the exception, the exception is delivered to caller (similar to signals, but at the programming language level)
Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3
Figure 5. Remote and local method invocations
invocation invocation
remote invocationremote
local local local
invocation invocation
A B
C
D
E F
❚ An object must have the remote object reference of an object in order to do remote invocation of an object
❚ Remote object references may be passed as input arguments or returned as output arguments.
❚ Server runs on remote machine.
❚ Remote classes are available on another host with a web server.
❚ Server registers with a binder on its machine, indicating its service and where to find the code.
❚ Client contacts the binder on the remote machine.
❚ The binder tells the client where to find the stub class and returns a remote object reference
❚ The client downloads the stub class
❚ The client invokes methods in the remote object
See http://vip.cs.utsa.edu/classes/cs5523s2001/lectures/JavaRMI/simpleHello.html
web server host
RMI client
web server
server host
RMIregistry
RMI server
client host
❚ Xxxxx (no suffix) – a remote interface
❚ XxxxxImpl – a servant class implementing interface
❚ XxxxxServer – a server program that creates servant objects
❚ XxxxxClient – a client program that calls remote methods of Xxxxx
❚ XxxxxImpl_Stub – a stub class generated for XxxxxImpl by rmic
❚ XxxxxImpl_Skel – a skeleton class generated for XxxxxImpl by rmic (no longer needed in Java 2)
❚ An object must have the remote object reference of an object in order to do remote invocation of an object
❚ Remote object references may be passed as input arguments or returned as output arguments.
❚ Parameters of a method in Java are input parameters
❚ Returned result of a method in Java is the output parameter
❚ Objects are serialized to be passed as parameters
❚ When a remote object reference is returned, it can be used to invoke remote methods
❚ Non-remote serializable objects are copied by value
Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3
Figure 5. Classes supporting Java RMI
❚ Read CDK 5.1, 5.2 and 5.