Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.

Similar presentations


Presentation on theme: "Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design."— Presentation transcript:

1 Distributed Objects and Middleware

2 Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design

3 Crossing Hosts/Platforms Source: G. Coulouris et al., Distributed Systems: Concepts and Design

4 Provisions of Middleware l Higher-level abstractions (RPC, RMI, …) l Location transparency l Independent of communication protocols l Independent of hardware/operating systems l Use of several programming languages

5 The Middleware layer Source: G. Coulouris et al., Distributed Systems: Concepts and Design * The operating system includes basic network protocols.

6 Distributed Objects The object-based programming model is extended to allow objects in different processes to interact with one another. l Client/Server l Object References l Interfaces l Remote Method Invocation l Exceptions

7 A CORBA IDL Example Source: G. Coulouris et al., Distributed Systems: Concepts and Design

8 Local and Remote Method Invocations Source: G. Coulouris et al., Distributed Systems: Concepts and Design

9 A Remote Object and Its Interface Source: G. Coulouris et al., Distributed Systems: Concepts and Design

10 Client Proxy (Stub) and Server Skeleton (Stub) Source: G. Coulouris et al., Distributed Systems: Concepts and Design

11 The RMI Software l Proxy: the local representative of the remote object. l Dispatcher: relays a request to the appropriate skeleton method. l Skeleton: unmarshals the request and invokes the corresponding method in the remote object.

12 Java Remote Interface Examples Source: G. Coulouris et al., Distributed Systems: Concepts and Design

13 Java Server Example Source: G. Coulouris et al., Distributed Systems: Concepts and Design

14 Java Server Example (cont’d) Source: G. Coulouris et al., Distributed Systems: Concepts and Design

15 Java Client Example Source: G. Coulouris et al., Distributed Systems: Concepts and Design

16 CORBA l Defined by OMG to hide the intricacies of network programming. l An ORB (Object Request Broker) receives invocations from a client and deliver them to a target object. l The main communication protocol is GIOP (General Inter-ORB Protocol), known as IIOP when implemented over the Internet.

17 The CORBA Architecture Source: G. Coulouris et al., Distributed Systems: Concepts and Design

18 CORBA Object Interfaces l Each object has an interface defined in IDL. l An interface defines the operations that can be called by the clients. l An interface can be implemented in one language and called from by another. l The CORBA IDL includes features such as inheritance of interfaces, exceptions, and compound data types.

19 CORBA Programming with Java l Define the interfaces using IDL and compile them into Java interfaces. l Implement the interfaces with Java classes. l Write a server main function that creates instances of these classes and then inform the underlying CORBA implementation. l Register the server. l Write a client main function to connect to the server and to use server’s objects.

20 CORBA IDL Interfaces: Shape and ShapeList Source: G. Coulouris et al., Distributed Systems: Concepts and Design

21 Java Interface Generated from the CORBA Interface ShapeList Source: G. Coulouris et al., Distributed Systems: Concepts and Design

22 Java Implementation of Shapelist Source: G. Coulouris et al., Distributed Systems: Concepts and Design

23 Java Implementation of ShapeList (cont’d) Source: G. Coulouris et al., Distributed Systems: Concepts and Design

24 Java Implementation of a ShapeList Client Source: G. Coulouris et al., Distributed Systems: Concepts and Design


Download ppt "Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design."

Similar presentations


Ads by Google