Published on


Published in: Education
1 Comment
1 Like
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Middleware Technologies Mohammed Waheeduddin Associate Professor Anwarul Uloom College For Computer studies
  2. 2. Middleware <ul><li>Need for Distributed Computing </li></ul><ul><li>Distributed Computing-Middleware </li></ul><ul><li>RMI </li></ul><ul><li>RPC </li></ul><ul><li>CORBA </li></ul><ul><li>SOA </li></ul><ul><li>Web Services </li></ul>
  3. 3. Why do you go for Distributed computing? <ul><li>The information itself is inherently distributed due to the physical distributed nature of an organization. </li></ul><ul><li>Explicit distribution gives </li></ul><ul><ul><li>Higher reliability </li></ul></ul><ul><ul><li>Higher Availability </li></ul></ul><ul><ul><li>Higher Performance etc. </li></ul></ul>
  4. 4. The Problem <ul><li>What is the problem with traditional single address space computing? </li></ul><ul><li>Objects have to be in the same address space, and hence an object cannot send a message to an object that is on a different machine. </li></ul><ul><li>You need to extend or enrich the traditional model for facilitating distributed computing. </li></ul>
  5. 5. What is the solution? <ul><li>We would put the objects on different machines and have them send messages directly to each other. </li></ul><ul><li>Let us assume that the client objects was written in Java (so that it can run anywhere) </li></ul><ul><li>For the server objects, there are two obvious possibilities </li></ul><ul><ul><li>The server object was not written in Java. </li></ul></ul><ul><ul><li>The Server Object is written in Java. </li></ul></ul><ul><li>The first situation requires us to have a way for objects to talk to each other regardless of what language they were written (CORBA). </li></ul><ul><li>The second situation requires two objects written in Java to talk to each other (RMI) or RPC( written C or C++) </li></ul>
  6. 6. Distributed Object Computing <ul><li>A Distributed Object Computing Scenario. </li></ul><ul><li>Server Objects and Client Program can be located on different machines. </li></ul><ul><li>Client programs can send messages to these server objects, which are remote. </li></ul><ul><li>Location Transparency: Clients can send messages to these objects as if they are available locally. </li></ul><ul><ul><li>Requires middleware. </li></ul></ul><ul><ul><li>RPC,RMI,CORBA defines middleware. </li></ul></ul>
  7. 7. Distributed systems <ul><li>Heterogeneity is a challenge to designers: </li></ul><ul><li>distributed systems must be constructed from a variety of different networks, </li></ul><ul><li>operating systems, computer hardware and programming languages </li></ul><ul><li>Internet communication protocols mask the difference in networks and </li></ul><ul><li>middleware can deal with the other differences </li></ul><ul><li>Definition of Middleware </li></ul><ul><li>Software that provides a programming model above the basic building blocks of processes and message passing </li></ul><ul><li>[Coulouris, Dollimore, Kindberg, 2001] </li></ul>
  8. 9. Socket programming Sockets provide a low-level API for writing distributed client/server applications. Before a client communicates with a server, a socket endpoint needs to be created. The transport protocol chosen for communications can be either TCP or UDP in the TCP/IP protocol stack. The client also needs to specify the hostname and port number that the server process is listening on.
  9. 10. RPC
  10. 11. RPC is another mechanism that can be used to construct distributed client/server applications. RPC can use either TCP or UDP for its transport protocol. RPC relies heavily on an Interface Definition Language (IDL) interface to describe the remote procedures executing on the server-side. From an RPC IDL interface, an RPC compiler can automatically generate a client-side stub and a server-side skeleton. With the help of the stub and skeleton, RPC hides the low-level communication and provides a high level communication abstraction for a client to directly call a remote procedure as if the procedure were local. RPC
  11. 12. Java RMI
  12. 13. Java RMI The Java RMI is an object-oriented mechanism from Sun Microsystems for building distributed client/server applications. Java RMI is an RPC implementation in Java. Similar to RPC, Java RMI hides the low-level communications between client and server by using a client-side stub and a server-side skeleton (which is not needed in Java 1.2 or later) that are automatically generated from a class that extends java.rmi.UnicastRemoteObject and implements an RMI Remote interface.
  13. 14. DCOM
  14. 15. DCOM The Component Object Model (COM) is a binary standard for building Microsoft-based component applications, which is independent of the implementation language. DCOM is an extension to COM for distributed client/server applications. Similar to RPC, DCOM hides the low-level communication by automatically generating a client-side stub (called proxy in DCOM) and a server-side skeleton (called stub in DCOM) using Microsoft’s Interface Definition Language (MIDL) interface. DCOM uses a protocol called the Object Remote Procedure Call (ORPC) to invoke remote COM components.
  15. 16. What is CORBA? <ul><ul><ul><li>CORBA is a specification for the distributed object bus architecture defined by OMG. </li></ul></ul></ul><ul><ul><ul><li>It is the product of a consortium called the object management group (OMG). </li></ul></ul></ul><ul><ul><ul><li>OMG includes 800 Companies representing the entire spectrum of computer industry. </li></ul></ul></ul><ul><ul><ul><li>OMG issues specifications, not products. </li></ul></ul></ul>
  16. 17. CORBA
  17. 18. CORBA CORBA is an object-oriented middleware infrastructure from Object Management Group (OMG) for building distributed client/server applications. Similar to Java RMI and DCOM, CORBA hides the low-level communication between the client and server by automatically generating a client-side stub and a server-side skeleton through an Interface Definition Language (IDL) interface. CORBA uses Internet-Inter ORB Protocol (IIOP) to invoke remote CORBA objects. The Object Request Broker (ORB) is the core of CORBA; it performs data marshaling and un marshalling between CORBA clients and objects. Compared with Java RMI and DCOM, CORBA is independent of location, a particular platform or programming language. CORBA supports both synchronous and asynchronous communications.
  18. 19. CORBA Object Request Broker (ORB) Application Objects Object Services Common Facilities Application Objects
  19. 20. CORBA <ul><li>The key parts of CORBA are: </li></ul><ul><li>􀂃 Object Request Broker (ORB):in charge of the interaction </li></ul><ul><li>between components </li></ul><ul><li>CORBA services: standard definitions of system services </li></ul><ul><li>A standardized IDL language for the publication of </li></ul><ul><li>interfaces </li></ul><ul><li>Protocols for allowing ORBs to talk to each other </li></ul><ul><li>CORBA was an attempt to modernize RPC by making it object oriented and providing a standard </li></ul>
  20. 21. CORBA <ul><li>Figure shows the four main elements of the architecture. </li></ul><ul><ul><li>Object Request Broker </li></ul></ul><ul><ul><li>CORBA Services </li></ul></ul><ul><ul><li>CORBA facilities </li></ul></ul><ul><ul><li>Application Objects </li></ul></ul>
  21. 22. CORBA-Object Request Broker <ul><ul><ul><li>is the case of OMG Architecture </li></ul></ul></ul><ul><ul><ul><li>is the object bus </li></ul></ul></ul><ul><ul><ul><li>lets objects transparently make request to - and receive response from – other objects located locally or remotely. </li></ul></ul></ul><ul><ul><ul><li>Through ORB objects written in the different languages on different machines of different architecture running different operating system can communicate to each other. </li></ul></ul></ul>
  22. 23. CORBA- CORBA Services <ul><li>Are Collections of system – level service packages with IDL specified interfaces. </li></ul><ul><li>They augment the functionality of ORB. </li></ul><ul><li>They include </li></ul><ul><ul><li>Life Cycle services </li></ul></ul><ul><ul><li>Persistence Services </li></ul></ul><ul><ul><li>Naming Services </li></ul></ul><ul><ul><li>Event Service </li></ul></ul><ul><ul><li>Concurrency control service </li></ul></ul><ul><ul><li>Transactional Service </li></ul></ul><ul><ul><li>Relationship Service </li></ul></ul><ul><ul><li>Externalization </li></ul></ul><ul><ul><li>Query Service </li></ul></ul><ul><ul><li>Licensing Service </li></ul></ul><ul><ul><li>Properties Service </li></ul></ul><ul><ul><li>Time Service </li></ul></ul><ul><ul><li>Security Service </li></ul></ul><ul><ul><li>Trader Service </li></ul></ul><ul><ul><li>Collection Service etc. </li></ul></ul>
  23. 24. CORBA-CORBA facilities <ul><li>Are collections of IDL – defined frameworks that provide services of direct use to application objects. </li></ul><ul><li>Categories </li></ul><ul><ul><li>Horizontal </li></ul></ul><ul><ul><li>Vertical </li></ul></ul><ul><li>Includes </li></ul><ul><ul><li>Interfaces for display, printing </li></ul></ul><ul><ul><li>Help </li></ul></ul><ul><ul><li>Workflow management. </li></ul></ul><ul><ul><li>Facilities for specific application </li></ul></ul>
  24. 25. CORBA-Application Objects. <ul><li>These are business objects. </li></ul><ul><li>Clients and Server Objects. </li></ul><ul><li>According to OMG : A business object is an application – level component you can use in unpredictable combinations. </li></ul><ul><li>A business object is by definition, independent of any single application. </li></ul><ul><li>Examples </li></ul><ul><li>Customer </li></ul><ul><li>Order </li></ul><ul><li>Library </li></ul><ul><li>Payment etc. </li></ul><ul><li>A distributed object framework lays foundation for component based future. </li></ul><ul><li>A distributed object has to be a component. </li></ul>
  25. 26. A summary on Java RMI, DCOM and CORBA Java RMI, DCOM and CORBA have all been around for some time and represent the most popular distributed, object-oriented middleware which can be used to rapidly develop distributed client/ server applications. They use proprietary communication protocols – e.g. Java RMI uses JRMP, DCOM uses ORPC and CORBA uses IIOP – to invoke remote objects or components. middleware such as Java RMI, DCOM and CORBA are not based on open standards, which makes it dif.cult for them to be ubiquitously taken up in heterogeneous environments. Ideally, what is needed is an open standards-based middleware infrastructure for building and integrating applications in heterogeneous environments, and Web services are emerging as such an infrastructure.
  26. 27. Service – Oriented Architecture (SOA) <ul><li>Structured </li></ul><ul><li>Object Oriented </li></ul><ul><li>Component Based </li></ul><ul><li>All these developments have ignored the aspect of interoperability Interoperable messages and exchange patterns. </li></ul><ul><li>SOA is concerned with interoperable message interchange to / and or from a message producer </li></ul><ul><li>Consumer Producer </li></ul><ul><li>message </li></ul>
  27. 28. Service Oriented Architecture <ul><li>Intended to define loosely coupled Services / Applications </li></ul><ul><li>To define a process for integrating these interoperable components </li></ul><ul><li>Applications are composed dynamically from the deployed and available services in the network </li></ul><ul><li>They provide increased availability and stability to the users. </li></ul><ul><li>Existing Web System: </li></ul><ul><li>Browser Web Server </li></ul><ul><li>Consumer Producer </li></ul><ul><li>MESSAGE </li></ul><ul><li>HTML / XHTML </li></ul>
  28. 29. Service Oriented Architecture <ul><li>The existing interoperability is inadequate </li></ul><ul><li>Needs more polished message exchange patterns to adapt to any user agent and / or applications of choice </li></ul><ul><li>Requires more generalized solution : Web Services </li></ul><ul><li>Web Services Architecture extends the above interaction pattern by adding XML </li></ul><ul><li>XML’s power and expressiveness serves the purpose. </li></ul><ul><li> Any Consumer Any Producer </li></ul><ul><li> Message </li></ul><ul><li> XML </li></ul>
  29. 30. Issues with Existing Models <ul><li>Proprietary protocols </li></ul><ul><li>Interoperability </li></ul><ul><li>Platform lock-in </li></ul><ul><li>Flexibility </li></ul>
  30. 31. What is SOA? <ul><li>IT architecture for request - reply applications </li></ul><ul><li>Application functions are modularized and presented as services </li></ul><ul><li>Services are loosely coupled </li></ul><ul><ul><li>Service interface is independent of the implementation </li></ul></ul>
  31. 32. Characteristics of SOA <ul><li>Services have platform independent, self describing interfaces (XML) </li></ul><ul><li>Messages are formally defined </li></ul><ul><li>Services can be discovered </li></ul><ul><li>Services have quality of service characteristics defined in policies </li></ul><ul><li>Services can be provided on any platform </li></ul>SOA Interoperable Loosely Coupled Re-Usable Composable
  32. 33. Service <ul><li>The delivery of software as a service that is, like electricity or gas to your home </li></ul><ul><li>Web services are the Distributed Computing equivalent of electrical socket </li></ul>
  33. 34. Anatomy of a Service Service Consumer Interface Proxy Service Interface Service Implementation New Service Wrapped Legacy Composite Service
  34. 35. Service Communication <ul><li>Communicate with messages </li></ul><ul><li>No knowledge about partner </li></ul><ul><li>Likely heterogeneous </li></ul>Service Consumers Service Producers
  35. 36. The SOA Interaction Pattern <ul><li>Discover Publish </li></ul><ul><li>Interact </li></ul><ul><li>SOA : Emphasizes on Standard </li></ul><ul><li>Service Description </li></ul><ul><li>Registration </li></ul><ul><li>Discovery </li></ul><ul><li>Interaction </li></ul>Registry Service Consumer Service Producer Service Service Description
  36. 37. Benefits of SOA <ul><li>Better reuse </li></ul><ul><ul><li>Build new client functionality on top of existing Business Services </li></ul></ul><ul><li>Well defined interfaces </li></ul><ul><ul><li>Make changes without affecting clients </li></ul></ul><ul><li>Easier to maintain </li></ul><ul><ul><li>Changes/Versions are not all-or-nothing </li></ul></ul><ul><li>Better flexibility </li></ul>
  37. 38. WEB SERVICES
  38. 39. WEB SERVICES Web services are emerging as a promising infrastructure for building distributed applications. Web services are based on a Service-Oriented Architecture (SOA) in which clients are service requestors and servers are service providers. Web services differ from other approaches such as Java RMI, CORBA and DCOM in their focus on simple open standards such as XML and HTTP, which have wide industry support and a chance of becoming truly ubiquitous. Essentially, a Web service is a loosely coupled, encapsulated, platform and programming language neutral, composable server-side component that can be described, published, discovered and invoked over an internal network or on the Internet.
  39. 40. • Loosely coupled : A Web service implementation is free to change without unduly impacting the service client as long as the service interface remains the same. • Encapsulated : The implementation of a Web service is completely invisible to the client of a service. • Platform and programming language neutral : A Web service can be implemented in any language and deployed on any platform. • Composable : A Web service can be composed from a number of deployed services. • Server-side component : A Web service can range in scope from a complete application to a subroutine that runs on a server.
  40. 41. • Described : An XML-based interface is used to describe the functionality and capabilities that a Web service can provide. • Published : A Web service can be registered with a service registry that can be accessed on an intranet or on the Internet. • Discovered : A Web service client can discover a service by searching a service registry and match their service requirements. • Invoked : A Web service can be bound to by a service client via standard transport protocols such as HTTP or FTP. • Internal network or the Internet : A Web service can be made available strictly within an organization or it can be offered across the.rewall, available to any consumer connected to the Internet.
  41. 42. What are Web Services? Web services are application components Web services communicate using open protocols Web services are self-contained and self-describing Web services can be discovered using UDDI Web services can be used by other applications XML is the basis for Web services
  42. 43. How Does it Work? The basic Web services platform is XML + HTTP. The HTTP protocol is the most used Internet protocol. XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions. Web services platform elements SOAP (Simple Object Access Protocol) UDDI (Universal Description, Discovery and Integration) WSDL (Web Services Description Language)
  43. 44. Web services have two types of uses. Reusable application components There are things different applications needs very often. So why make these over and over again? Web services can offer application components like currency conversion, weather reports or even language translation as services. Ideally, there will only be one type of each application component, and anyone can use it in their application. Connect existing software Web services help solve the interoperability problem by giving different applications a way to link their data. Using Web services you can exchange data between different applications and different platforms.
  44. 45. Web Services have three basic platform elements. These are called SOAP, WSDL and UDDI.
  45. 46. What is SOAP? The basic Web services platform is XML plus HTTP. SOAP stands for Simple Object Access Protocol SOAP is a communication protocol SOAP is for communication between applications SOAP is a format for sending messages SOAP is designed to communicate via Internet SOAP is platform, language independent SOAP is based on XML SOAP is simple and extensible SOAP allows you to get around firewalls SOAP will be developed as a W3C standard
  46. 47. What is WSDL? WSDL is an XML-based language for describing Web services and how to access them. WSDL stands for Web Services Description Language WSDL is written in XML WSDL is an XML document WSDL is used to describe Web services WSDL is also used to locate Web services WSDL is not yet a W3C standard
  47. 48. Thank You