Last updated $Date: 2000/04/05 14:39:09 $ $Author: ruff $

The HTTP callback framework for xmlBlaster
 
What is this?

When distributing dynamic, event driven content over the internet, you usually choose an applet. The applet connects to the server over CORBA (or any other protocol) and may receive instant notification from the server.
But applets produce some well known problems like higher download time, firewalls which won't allow TCP/IP connections, applet-javascript communication problems with some Java-VM's etc. 

This framework addresses these issues. It establishes a persistent http connection to allow instant callbacks of xmlBlaster messages to the browser. 

Konrad will provide a tutorial how to use this framework in near future. 

How does it work?

A callback frame in the browser refers to the BlasterHttpProxyServlet. Using the ActionType parameter set to login, the BrowserHttpProxyServlet holds the HTTP connection if login to the xmlBlaster via the BlasterHttpProxy succeeds.

This permanent HTTP connection is held by the HttpPushHandler, which pings each 40 sec the browser. This functionality ensures that the browser won't close the connection.

The ProxyConnection connects to xmlBlaster using CORBA  .

The messages from the xmlBlaster are directly (ProxyConnection.update - HttpPushHandler.update) transferred to the browser, which has a Javascript based XML parser and notifies the interested browser frames about the callback.
The content frame in the picture are only an example, you can provide as many own frames as you wish. This is the work which is left for you to design your web layout.

If you have too many messages in a short time frame, your browser won't process all of this message. For this you can use an additional ready frame. Connect this frame also with the BlasterHttpProxyServlet using ActionType=browserReady. Each reload of this frame indicates your permanent HTTP connection (HttpPushHandler) that your browser is ready to process more messages. HttpPushHandler will send you the whole queue each update.
The hidden callback frame is always necessary to handle the communication. 

In your parent frame you have to include callback.js, util.js and xparse.js.

For Servlet and Javascript examples have a look into the following directory of the xmlBlaster distribution:

xmlBlaster/src/java/org/xmlBlaster/protocol/http

HOME