Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Objects.

Similar presentations


Presentation on theme: "Distributed Objects."— Presentation transcript:

1 Distributed Objects

2 distributed objects - objects which reside on different machines/ network
 architectures, benefits, drawbacks implementation of a remote object system 

3 Design large systems - avoid bottlenecks and single points of failure
Distributed: partition system into autonomic subsystems, self-contained, with clear relations (interfaces) Subsystem may be on different host, communicate by networking protocols

4 active object model remote method invocation: OO concept
objects reside on different RTE's send messages to one to another how two objects are going to communicate? remote method invocation: OO concept objects in different environments communicate=send messages

5 RMI Architecture in Java
framework for remote method invocation abstract subsystem A as providing a service=an interface interface used by subsystem, B, in a different JVM - invoke methods of A.

6

7 example class, representing a printing service.
support printing lines of text sent to them from other objects, which reside on different JVMs, on different hosts.

8 interface of the service

9 remote interface supports remote method invocations

10 communication throws section

11 Implementing the Interface
implementing the remote interface  tell Java how this class is going to communicate remotely

12 Make the Service Available
instantiate Object of this class wait for messages from other RTE: Instantiate LinePrinterImpl Object, L. Make L available for remote invocations Wait for remote invocations, and call the appropriate methods of L.

13

14 process does not exit when the main function completes
user needs to locate where on which host and JVM printer object is located. process does not exit when the main function completes naming.rebind(name, object) - executor is created - waits for messages and executes


Download ppt "Distributed Objects."

Similar presentations


Ads by Google