Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Distribuerede systemer og sikkerhed – 28. februar 2002 From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.

Similar presentations


Presentation on theme: "1 Distribuerede systemer og sikkerhed – 28. februar 2002 From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley."— Presentation transcript:

1 1 Distribuerede systemer og sikkerhed – 28. februar 2002 From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001 Presentation based on slides for the book: Slides modified by Jens B Jorgensen, University of Aarhus

2 2 Chapter 5: Distributed objects and remote invocation From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001

3 3 Distributed objects – middleware Applications Middleware layers Request reply protocol External data representation Operating System RMI, RPC and events

4 4 Distributed objects – interfaces zPrograms = communicating modules zModule interface specifies: yAvailable procedures (and variables). yParameters (input, output, both). zHiding of implementation details. zService interfaces (RPC), remote interfaces (RMI). zInterface Definition Language: A notation for defining interfaces.

5 5 Distributed objects – CORBA IDL example // 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(); };

6 6 Distributed objects – basic model invocation remote invocation remote local invocation A B C D E F Local method invocation Remote method invocation Remote object Remote object reference

7 7 Distributed objects – remote objects and remote interfaces interface remote m1 m2 m3 m4 m5 m6 Data implementation remoteobject { of methods

8 8 Remote method invocation – invocation semantics zLocal invocations executed exactly once. zRMI invocation semantics: yMaybe. yAt-least once. yAt-most once. zRMI invocation semantics ensured by various techniques.

9 9 Remote method invocation – invocation semantics techniques Fault tolerance measures Invocation semantics Retransmit request message Duplicate filtering Re-execute procedure or retransmit reply No Yes Not applicable No Yes Not applicable Re-execute procedure Retransmit replyAt-most-once At-least-once Maybe

10 10 Remote method invocation – architectural model object A object B skeleton Request proxy for B Reply Communication Remote Remote reference Communication module reference module module for B’s class & dispatcher remote client server

11 11 Remote method invocation – communication module Request ServerClient doOperation (wait) (continuation) Reply message getRequest execute method message select object sendReply messageType requestId objectReference methodId arguments int (0=Request, 1= Reply) int RemoteObjectRef int or Method array of bytes

12 12 Remote method invocation – remote reference module zTranslates between local and remote object references. zHas a remote object table with entries for all remote objects held by the process, and a record for each local proxy. zCreates remote object references.

13 13 Remote method invocation – RMI software zLayer between application-level objects and the communication and remote reference modules. zConsists of: yProxy. yDispatcher. ySkeleton. zClasses for RMI software can be generated automatically by an interface compiler.

14 14 Remote method invocation – proxy zMakes remote method invocation transparent to clients. zBehaves like a local object to the invoker. zImplements the methods in the remote interface of the remote object it represents. zDoes not execute invocation, but forwards request to remote object. yMarshals a reference to the target object, its own methodId and its arguments into a request message; y sends it to the target (via communication module); yawaits the reply message; yunmarshals it; yreturns the result to the invoker;

15 15 Remote method invocation – dispatcher and skeleton zDispatcher: yReceives request message from communication module; yUses methodId to select the appropriate method in the skeleton; yPasses on the request; zSkeleton: yUnmarshals the arguments in the request message; yInvokes the corresponding method in the remote object; yWaits for result; yMarshals result; ySends reply to sender’s proxy (via communication module);

16 16 Events and notifications – basics zOne object can react to a change occurring in another object. zPublish-subscribe communication pattern. zApplicable in heterogenous environments. zAsynchronous: Publishers and subscribers are decoupled.

17 17 Events and notifications – dealing room system Delivery semantics; observer roles

18 18 Summary zDistributed objects. zRemote method invocation (RMI). zEvents and notifications.


Download ppt "1 Distribuerede systemer og sikkerhed – 28. februar 2002 From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley."

Similar presentations


Ads by Google