1 / 28

Interprocess Communication and Middleware

Interprocess Communication and Middleware. Sockets and Ports. Node 2. Node 1. Source: G. Coulouris et al., Distributed Systems: Concepts and Design. Crossing Hosts/Platforms. Source: G. Coulouris et al., Distributed Systems: Concepts and Design. Provisions of Middleware.

questa
Download Presentation

Interprocess Communication and Middleware

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. Interprocess CommunicationandMiddleware

  2. Sockets and Ports Node 2 Node 1 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 • Higher-level abstractions (RPC, RMI, …) • Location transparency • Independent of communication protocols • Independent of hardware/operating systems • Use of several programming languages

  5. The Middleware layer * The operating system includes common network protocols (TCP/IP, …). Source: G. Coulouris et al., Distributed Systems: Concepts and Design

  6. Request-Reply Communication Source: G. Coulouris et al., Distributed Systems: Concepts and Design

  7. Request-Reply Communication Using HTTP HTTP request message: HTTP reply message: Source: G. Coulouris et al., Distributed Systems: Concepts and Design

  8. Serialization (Marshalling) Source: G. Coulouris et al., Distributed Systems: Concepts and Design

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

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

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

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

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

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

  15. RPC/RMI Semantics Source: G. Coulouris et al., Distributed Systems: Concepts and Design

  16. Java Remote Interfaces Source: G. Coulouris et al., Distributed Systems: Concepts and Design

  17. A Java Server Source: G. Coulouris et al., Distributed Systems: Concepts and Design

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

  19. A Java Client Source: G. Coulouris et al., Distributed Systems: Concepts and Design

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

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

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

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

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

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

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

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

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

More Related