95-702 OCT
1
Master of Information System Management
Distributed Systems Lecture 10: Distributed Objects & Event - - PowerPoint PPT Presentation
Distributed Systems Lecture 10: Distributed Objects & Event Notification 95-702 OCT 1 Master of Information System Management Middleware layers Applications RMI, RPC and events Middleware Request reply protocol layers External data
95-702 OCT
1
Master of Information System Management
95-702 OCT
2
Master of Information System Management
Applications Middleware layers Request reply protocol External data representation Operating System RMI, RPC and events
95-702 OCT
3
Master of Information System Management
95-702 OCT
4
Master of Information System Management
95-702 OCT
5
Master of Information System Management
DCE (C like syntax)
by Microsoft’s DCOM
95-702 OCT
6
Master of Information System Management
// In file Person.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(); };
How does this compare with WSDL?
95-702 OCT
7
Master of Information System Management
const MAX = 1000; typedef int FileIdentifier; typedef int FilePointer; typedef int Length; struct Data { int length; char buffer[MAX]; }; struct writeargs { FileIdentifier f; FilePointer position; Data data; }; struct readargs { FileIdentifier f; FilePointer position; Length length; }; program FILEREADWRITE { version VERSION { void WRITE(writeargs)=1; // procedure Data READ(readargs)=2; // numbers }=2; // version number } = 9999; // program number // numbers passed in request message // rpcgen is the interface compiler
95-702 OCT
8
Master of Information System Management
95-702 OCT
9
Master of Information System Management
95-702 OCT
10
Master of Information System Management
invocation invocation remote invocation remote local local local invocation invocation A B C D E F
95-702 OCT
11
Master of Information System Management
interface remote m1 m2 m3 m4 m5 m6 Data implementation remote
95-702 OCT
12
Master of Information System Management
Local calls have Exactly Once semantics. Remote calls have Maybe, At Least Once
are due to the fault tolerance measures applied during the request reply protocol.
Remote calls should have a syntax that is close to local calls. But it should probably be clear to the programmer that a remote call is being made.
95-702 OCT
13
Master of Information System Management
Fault tolerance measures Invocation semantics Retransmit request message Duplicate filtering Re-execute procedure
No Yes Yes Not applicable No Yes Not applicable Re-execute procedure Retransmit reply (history) At-most-once At-least-once Maybe
Duplicate filtering means removing duplicate request at the server.
95-702 OCT
14
Master of Information System Management
95-702 OCT
15
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
95-702 OCT
16
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
The remote reference module holds a table that records the correspondence between local object references in that process and remote object references (which are system wide).
95-702 OCT
17
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
Coordinate to provide a specified invocation semantics. The communication module selects the dispatcher for the class of the object to be invoked, passing on the remote object’s local reference.
95-702 OCT
18
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
The proxy makes the RMI transparent to the caller. It marshals and unmarshals
95-702 OCT
19
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
The server has one dispatcher and skeleton for each class representing a remote object. A request message with a methodID is passed from the communication module. The dispatcher calls the method in the skeleton passing the request message. The skeleton implements the remote object’s interface in much the same way that a proxy does. The remote reference module may be asked for the local location associated with the remote reference.
95-702 OCT
20
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
The communication module selects the dispatcher based upon the remote object
unmarshalls parameters and calls the method in the remote object.
95-702 OCT
21
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
RMI software - between application level objects and communication and remote reference modules
Proxy - makes RMI transparent to client. Class implements remote interface. Marshals requests and unmarshals
Dispatcher - gets request from communication module and invokes method in skeleton (using methodID in message). Skeleton - implements methods in remote interface. Unmarshals requests and marshals results. Invokes method in remote object.
reply protocol translates between local and remote object references and creates remote object
95-702 OCT
22
Master of Information System Management
skeleton Request proxy for B Reply Communication Remote Remote reference Communication module module reference module module for B’s class & dispatcher remote client server
Binders allow an object to be named and registered.
95-702 OCT
23
Master of Information System Management
95-702 OCT
24
Master of Information System Management
95-702 OCT
25
Master of Information System Management
95-702 OCT
26
Master of Information System Management
95-702 OCT
27
Master of Information System Management
Dealer’s computer Information provider Dealer External source External source Information provider Dealer Dealer Dealer Notification Notification Notification Notification Notification Notification Notification Notification Dealer’s computer Dealer’s computer Dealer’s computer Notification Notification
95-702 OCT
28
Master of Information System Management
subscriber
Event service
subscriber subscriber 3. 1. 2. notification notification notification notification