My last few articles on this blog site have all dealt with push architecture and technology in some way. This is an area that I have been investigating into quite bit recently. Part of these investigations had to be of course Kaazing, a specialized commercial offering, specifcally around WebSockets and its application in new HTML 5 application architectures.
Kaazing suggests a new way of implementing multi-tier (web) applications.
Communication between client and back end services happens over WebSockets. The Kaazing Gateway handles all WebSockets communication, turning messages from various back end services based on technologies such RSS, XMPP, JMS into WebSocket events.
Kaazing supports a variety of clients – though HTML 5 (JavaScript) web clients (including those running on mobile devices) are probably the most prominent ones.
A typical setup for HTML5 clients seems to be: download static HTML pages (along with JavaScript libraries) from a WebServer, then open WebSocket to Kaazing server and do all communication through the WebSocket. This would be quite a paradigm shift – as for the people at Kaazing, there is no need for (classic) JEE Application Servers anymore! (refer to: http://www.businesswire.com/news/home/20111019005426/en).
I find it hard to find documentation on configuring the Gateway and the back end services it will interact with. Particularly a setup which combines my existing JEE Web Applications and the Kaazing Gateway for push style interaction is not readily described anywhere it seems. Perhaps that is not necessarily the way the Kaazing team wants to go. Note that the Kaazing JMS Edition offers a possible way: messages published to JMS Topics can be picked up by the Kaazing Server to be forwarded to connected (WebSocket) Clients. This would offer a way to have the JEE Server push messages via JMS to Kaazing and from there to the clients.
Get going with Kaazing
It is easy to get going with Kaazing in your own environment. The steps I went through to get Kaazing setup locally and run the demos are the following:
1. Download Kaazing Server at http://kaazing.com/download
2. Unzip downloaded file
3. Start the Gateway
The console opens:
4. Access the Kaazing Server in a browser:
and navigate to the demos
6. Pick the Echo Demo (the quintessential WebSocket demo it seems)
7. Click on Connect, Click on Send and see the response (echo) from the WebSocket server. That was the first WebSocket exchange between HTML client and Kaazing server.
8. Run the Echo Demo as Java (Applet) Client:
When the Applet has loaded, click on Connect, then on Send:
9. Run a demo that has a Java backend send data packets over UDP to the Kaazing Server that then forwards these packages to the client as Server Sent Events.
For this to run, first start the Java backend that sends the UDP packets. This is done by running the demo-services.bat script in the bin directory of the Kaazing server installation:
The following command window appears:
Now the HTML demo client can be run. Click on Connect.
When the connection is open, events start arriving.
Multiple channels can be opened in the client:
and even more:
10. The next steps obviously involve trying out additional demos and – more usefully – inspecting the code behind these demos and first attempts at modifying and imitating them.
Kaazing ships with the sources for the demos and the libraries required to run them:
Resources
About Kaazing and WebSockets: http://tech.kaazing.com/documentation/html5/kaazing-websocket-html5.html
Kaazing Set Up Guide: http://tech.kaazing.com/documentation/html5/setup-guide.html
Downloading Kaazing HTML 5 Edition: http://kaazing.com/download
Thank you for the thoughtful review. The main advantage of html5 seems to be for embedding rich media such as audio and video in modern browsers. Although, the structure elements seem to be useful. CSS3 seems to be headed in the right direction, leaving many possibilities for implementation and creativity,