230 likes | 246 Views
Latest techniques and Applications in Interprocess Communication and Coordination. Xiaoou Zhang. Outline. What is Interprocess communication Message oriented communication Web Services WCF. Inter-Process Communication.
E N D
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang
Outline • What is Interprocess communication • Message oriented communication • Web Services • WCF
Inter-Process Communication • Inter-Process Communication (IPC) is a set of techniques for the exchange of data among two or more threads in one or more processes. Processes may be running on one or more computers connected by a network.
Distributed System Communication [1] • Remote procedure call a protocol that allows one application to execute another application or module on another computer • Message-oriented communication Messages exchange between systems • Stream-oriented communication and multicast communication
Advantages of Using Messaging [2] • Cross platform integration: Messages can be the “universal translator” between various platforms and languages, allowing each platform to work with their respective native data type • Asynchronous communications: both the sender and receiver can be running flat out and not be constrained by waiting on each other
Advantages of Using Messaging • Remote communication: messages replace the need for the serializing and deserializing that occurs when one application makes a remote call to another application. • End-to-end security: messages can transfer the complete security context to the consumer using a combination of headers and tokens
Web services • software system designed to support interoperable machine-to-machine interaction over a network. • web services are the standards-based way to realize Service-Oriented Architecture (SOA)
SOA [3] • SOA is an example of the composite computing model • The composite computing model is an architecture that uses distributed, discovery-based execution to expose and manage a collection of service-oriented software assets. • At the fundamental level, an SOA is a collection of service on a network that communicate with each other, the services are loosely coupled, have well-defined interfaces and are reusable. An SOA therefore has a higher-level view of coarse-grained application development that uses standard interfaces to hide the underlying technical complexity
SOA + Internet protocols • The basic building blocks for using web services are the SOA and Internet protocols. • Web services can be represented, advertised, discovered and communicated within a dynamic environment. • Web services are based on standards and standards-based technologies, which ensure that applications are compliant, thereby enabling program-to-program interoperability.
Main components Web services protocol stack is based on standardized XML technologies. There are three main components: • Simple Object Access Protocol (SOAP) • Web Services Description Language (WSDL) • Universal Description, Discovery, and Integration (UDDI)
SOAP [3] • SOAP is a lightweight communication protocol for web services. • It is used to exchange structured and typed information between systems. • SOAP allows users to invoke methods on remote machines without knowing specific detail of the platform or software running on those machines. • XML is used to represent the data, while the data is structured according to the SOAP schema.
SOAP • The characteristics of a SOAP message are: • It is extensible: it allows various features such as reliability, security, to be layered via SOAP extensions. • It works across a number of standardized underlying network protocols. • It is independent of the underlying language or platform or programming model.
SOAP message A SOAP message is an ordinary XML document containing the following elements: • A required Envelope element that identifies the XML document as a SOAP message • An optional Header element that contains header information • A required Body element that contains call and response information • An optional Fault element that provides information about errors that occurred while processing the message
SOAP message example: the following SOAP message represents a request to transfer funds between bank accounts: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <x:TransferFunds xmlns:x="urn:examples-org:banking"> <from>22-342439</from> <to>98-283843</to> <amount>100.00</amount> </x:TransferFunds> </soap:Body> </soap:Envelope>
WSDL [3] WSDL is a specification defining how to describe web services in a common XML grammar. WSDL describes four critical pieces of data: • Interface information describing all publicly available functions • Data type information for all message requests and message responses • Binding information about the transport protocol to be used • Address information for locating the specified service
UDDI [3] • UDDI is a platform-independent directory protocol for describing services and discovering and integrating services via the Internet. It describes the details of the services using WSDL and communicates via SOAP
Implementing Web Services • A service provider creates a Web service • The service provider uses WSDL to describe the service to a UDDI registry • The service provider registers the service in a UDDI registry • Another service or consumer locates and requests the registered service by querying UDDI. • The requesting service or user writes an application to bind the registered service using SOAP • Data and messages are exchanged as XML over HTTP
Window Communication Foundation (WCF) [2] • WCF is a programming framework used to build distributed applications that inter-communicate. WCF is the part of the .NET Framework dedicated to communications. • Three main design goals of WCF: • Unification of existing technologies • Interoperability across platform • Service-oriented development
Interoperability across platform [4] • WCF’s fundamental communication mechanism is SOAP-based web services. • WCF use SOAP messages to interact with any other application which supports standard web service. • when a WCF process communicates with another WCF process, the SOAP messages can be encoded in an optimized binary format.
Interoperability across platform • To allow more than just basic communication, WCF implements Web services technologies defined by the WS-* specifications to achieve seamless Interoperability across platform. Those specifications covers: • Messaging: WS-Addressing defines additions to the SOAP header for addressing SOAP messages, which frees SOAP from relying on the underlying transport protocol, such as HTTP, to carry addressing information. Message Transmission Optimization Mechanism (MTOM) defines an optimized transmission format for SOAP messages with large binary data contents based on the XML-binary Optimized Packaging (XOP) specification.
Interoperability across platform • Metadata: WS-Policy allows specification of more dynamic aspects of a service’s behavior that cannot be expressed in WSDL, such as a preferred security option. WS-MetadataExchange allows a client to directly request descriptive information about a service, such as its WSDL and its policies, using SOAP. • Security: WS-Security, WS-SecureConversation, WS-Trust, and WS-Federation all define additions to SOAP messages for providing authentication, data integrity, data privacy, and other security features. • Reliability: WS-Reliable Messaging defines additions to the SOAP header that allow reliable end-to-end communication, even when one or more Web services intermediaries must be traversed.
References [1] “Distributed Systems: Principles and Paradigms”, Andrew S. Tanenbaum and Maarten Van Steen, Prentice Hall, 2007 [2] “Pro WCF : practical Microsoft SOA implementation”, Chris Peiris, Springer, 2007 [3]“From P2P TO Web Services and Grids”, Ian J. Taylor, Springer, 2005 [4]What is Windows Communication Foundation?, http://msdn.microsoft.com/en-us/library/ms731082.aspx