Requirements for a Messaging Service
There are common features of messaging for distributed and parallel computing; for instance messages have in each case a source and destination. In P2P networks especially, the destination may be specified indirectly and determined dynamically while the message is en route using properties (published meta-data) of the message matched to subscription interest from potential recipients. Groups of potential recipients are defined in both JXTA (
کد:
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
) for P2P and MPI for parallel computing. Collective communication – messages sent by hardware or software multicast – is important in all cases; much of the complexity of MPI is devoted to this. Again one needs to support in both cases, messages containing complex data structures with a mix of information of different types. One must also support various synchronization constraints between sender and receiver; messages must be acknowledged perhaps. These general characteristics are shared across messaging systems.
There are also many differences where perhaps performance is the most important issue. The message passing of parallel computing is fine grain – one must aim at latencies (overhead for zero length messages) of a few microseconds. The bandwidth must also be high and is application dependent and communication needs decrease as the grain (memory) size of each node increases. As a rough goal, one can ask that each process be able to receive or send one word in the time it takes to do a “few” (around 10) floating point operations. MPI is trying to do something quite simple extremely fast. Now consider message passing for a distributed system. Here we have elegant objects
exchanging messages that are themselves objects. As we explained this object structure is natural and useful as it expresses key features of the system. In an earlier article, we stressed that XML was a powerful new approach which expresses objects in a convenient way with a familiar syntax that generalizes HTML. It is not surprising that it inow becoming very popular to use XML for defining the objects and messages of distributed systems. Fig. 1 shows our simple view of a distributed system – a Grid or P2P Network – as a set of XML specified resources linked by a set of XML specified messages. Again a resource is any entity with an electronic signature; computer, database, program, user, sensor. The web community has introduced SOAP (
s
کد:
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
). which is essentially the XML message format postulated above and “Web services” which are XML specified distributed objects. Web services are “just” computer programs running on one of the computers in our distributed set. Often one would use one of the popular web servers from Apache (
کد:
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
) to host one or more web services. In this simple model, Web services send and receive messages on so-called ports – each port is roughly equivalent to a subroutine or method call in the “old programming model”. The messages define the name of the subroutine and its input and if necessary output parameters. This message interface is called WSDL (Web Service Definition Language
کد:
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
) and this standard is an important W3C consortium activity As an example the simplest Web service could be one that serves up Web pages and this has the URL as input parameter and the page itself as returned value. Web services use by default the same protocol HTTP as this simple case but use the rich XML syntax to specify a more complex input and output. The Web service is the unit of distributed computing in the same way that processes and threads are for a single computer. Processes have many methods and correspondingly web services have many ports. As seen in the peer-to-peer Grid of fig. 2, ports are either user-facing (messages go between user and Web Services) or service-facing where messages are exchanged between different Web services. We will explain Web services and WSDL in more detail in a later article. Using Web services for the Grid requires extensions to WSDL and the resultant OGSA (Open Grid Service Architecture
کد:
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
) is a major effort in the Grid forum (
کد:
برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
) at the moment.
One particularly clever idea in WSDL is the concept that one first defines not methods themselves but their abstract specification. Then there is part of WSDL that ”binds” the abstract specification to a particular implementation. Here one can as mentioned late choose to bind the message transport not to the default HTTP but to a different and perhaps higher performance protocol. For instance if one had ports linking Web services on the same computer, then these could in principle be bound to direct subroutine calls. This concept has interesting implications for building systems defined largely in XML at the level of both data structure and methods. Further one can imagine some nifty new branch of compilation which automatically converted XML calls on high performance ports and generated the best possible implementation