Here the store and forward system will actually use an XML vocabulary to define the message structure.
Store and forward applications can also take advantage of XML by routing XML instances between applications. An example of this would be using SMTP to send an XML instance to another person. This method requires that the recipients be able to process the message themselves.
Publish and Subscribe
Also known as distributed events services or push, publish and subscribe delivers a specific message to a group of users that have registered to receive it. In these systems, a consumer registers with a source for message delivery over a particular topic. The source then watches for information regarding that topic and passes it along to the interested parties when it arrives. These topics can be informational like a news update, or they can be system events like new files being added to the system.
With publish and subscribe systems, the message usually has a proprietary data format. This makes it difficult to develop generic clients. For example, PointCast delivers its news updates in a special nonpublic format. Therefore, you need the PointCast newsreader to handle the receipt and display of updates. With the emergence of XML, it becomes relatively easy to deliver messages that use a publicly published vocabulary and allow recipients to decide how they want to use the data they receive.
There was a tremendous buzz about push technology a year ago, but it seems to have fizzled badly. Much of the loss of interest is due to the requirement for new applications to be added to the desktop to handle proprietary message formats. It will be interesting to see if there is a push revival as more informational content providers adopt XML as a data format and publish their vocabularies.
Remote Procedure Calls
A Remote Procedure Call (RPC) extends the concept of local function call programming over the network so that a totally different machine is actually performing the work and returning the results to the calling machine. If you write code in just about any language, you (hopefully) understand the concept of a function call. In a function call, the program jumps to a block of code that performs a certain routine. We can pass parameters to this function and obtain an output of its work. In some cases, the routine will actually change the parameters that were passed in as well as return a result.
The Web server is an example of a very simple RPC. Each HTTP request is asking the Web server to execute a file retrieve function whose output is a stream of bytes. Generally, RPCs are much more complex than this, and are the heart of distributed computing. In an RPC, the local function call is now somewhere on another machine. This means that you must first package up the parameters into a stream of bytes to be shipped over the network. With local function calls, this is handled automatically by the memory and the processor. Unlike the Web server example, which just accepts a single string as input, you must now preserve type information, such as integer or string, and hardware-dependent byte ordering.
Once this information is packaged, a connection to the remote machine needs to be established. This introduces a possible point of failure. When you execute functions locally, the code you call may be erroneous and fails; with RPCs the code can be perfect and yet still fail. Assuming the connection is made correctly, you need to communicate with a receiving process that will take your package, issue the function call on your behalf, and package and return the results. This process of packaging on both ends is called marshaling.
Currently, there are many different RPC mechanisms available: Microsoft Distributed Component Object Model (DCOM), Distributed Computing Environment (DCE) RPC, Common Object Request Broker Architecture (CORBA), Internet Inter-ORB Protocol (IIOP), Java Remote Method Invocation (RMI), and a plethora of homegrown ones as
well. These mechanisms all share the underlying principle
of building the layer that marshals that code and executes the function.
There has also been an emergence of XML-based RPC mechanisms. The key difference between the mechanisms listed previously and an XML RPC is the client-side requirements. With COM, CORBA, DCE, and Java, there must be a client that knows how to speak the same language. With XML, there only needs to be a client that knows how to make a connection and send data. The Web browser itself can be the issuer of an RPC. To clarify this picture further, I'll walk through two scenarios, one with CORBA and the other with XML RPC.
If I want to develop a CORBA application that allows me to issue a function call on a remote CORBA object, I need to have a client that speaks IIOP and a piece of code that knows how to package up the parameters to the remote object properly. This piece of code is called a stub. The stub in turn calls the skeletonanother piece of code running on the remote machine that executes the call for me. If I want the Web browser to be the client for this application, I need IIOP built into the browser or I need to download it in the form of an application (Java or ActiveX).
Things get easier if I develop the same application with XML RPC. First, my package will be defined as an XML message. Second, I only need a skeleton if my receiving application cannot handle parsing XML instances. Otherwise, I can send the XML instance from the Web browser directly into the receiving application. The return values will be formatted as an XML instance, allowing the Web browser to display the results on the screen.
If you're using Internet Explorer 4.0 or later, the XML DSO component discussed earlier can be used to issue the RPC and display the results. The trick is to provide the XML instance as part of the URL that will be opened to receive the XML data stream:
|