1 / 16

Distributed objects and remote invocation

Distributed objects and remote invocation. Pages 165 - 187 . Objectives . Models (RPC, RMI, ……) Interface – remote and service. Communications between objects - Remote method invocation. General models. Remote procedure call model (RPC)

ayasha
Download Presentation

Distributed objects and remote invocation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed objects and remote invocation Pages 165 - 187

  2. Objectives • Models (RPC, RMI, ……) • Interface – remote and service. • Communications between objects - Remote method invocation.

  3. General models • Remote procedure call model (RPC) • allows client programs to call procedures in server programs running in separate processes and computers • Remote method invocation (RMI) • allows an object living in one process to invoke methods of an object living in another process • Middelware • software that provides a programming model above the basic building blocks of processes and message passing

  4. Applications RMI, RPC and events local C remote Middleware E local Request reply protocol invocation invocation layers remote invocation invocation F B External data representation local A invocation D Operating System Middleware layers Remote and local method invocations

  5. Middleware • Location transparency • Communication protocols • Computer hardware • O.S.

  6. remote object Data remote interface m4 { m1 implementation m5 m2 m6 of methods m3 Interface • Interface - module (data, procedure) in general • Interface – module in D.S. (input, output)

  7. remote object Data remote interface m4 { m1 implementation m5 m2 m6 of methods m3 Remote interface and Service interface • Objects - each object has a remote object reference and a remote interface • Service interface - client- server model.

  8. Communications between D. objects • Object model – reference, interface, actions, exception, garbage collection. • Distributed object – program is partitioned, objects are logically partitioned Distribution,

  9. local C remote E local invocation invocation remote invocation invocation F B local A invocation D Distributed object model • reference, interface, actions, exception, garbage collection.

  10. Invocation Fault tolerance measures semantics Retransmit request Duplicate Re-execute procedure message filtering or retransmit reply No Not applicable Not applicable Maybe Yes No Re-execute procedure At-least-once Yes Yes Retransmit reply At-most-once Design issues for RMI • Invocation semantics

  11. Design issues for RMI (cont’d) • Exactly once semantics • every method is executed exactly once • At-least-once semantics • the invoker receives: either a result (method executed at least once) or an exception (no result received) • Transparency • remote calls look like local ones

  12. Home work Figure 5.6 server client remote skeleton object B object A proxy for B Request & dispatcher for B’s class Reply servant Communication Communication Remote reference Remote module reference module module module

  13. Implementation of RMI • Communication module • Request-Reply protocol, client-server model • Remote reference module • Responsible for translating between local and remote object references and creating remote object references

  14. Implementation for RMI • The RMI software (self study) • Proxy: makes remote method invocation transparent to the invoker by behaving like a local object, forwards a message to a remote object • Dispatcher: receives the Request message, chooses the appropriate method in the skeleton and passes on the Request message • Skeleton: the class of a remote object has a skeleton which implements the methods in the remote interfaces. Unmarshals the arguments in the Request message, invokes the corresponding method in the remote object. Then waits for invocation to complete and marshals the result in a Reply message

  15. client process server process Request Reply client stub server stub procedure procedure service client Communication Communication program procedure dispatcher module module Remote procedure call

More Related