Get going with Kaazing WebSocket Gateway – HTML5 Edition – installing locally and running demos
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.
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:
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
- Push-based synchronized slideshow web application – implemented using WebSockets and Kaazing WebSocket Gateway
- Running CometD 2 examples – locally on Tomcat using Maven and NetBeans
- Getting Atmosphere – framework for Comet style communication – up and a first sample running on Tomcat
- Oracle Toplink goes open source – launch of the Community Edition
- Compile and invoke your webservice client (generated by XFire) in a running JVM
- First steps with jWebSocket – open source Java framework for WebSockets – installation and running samples « AMIS Technology blog
- JavaOne 2012: What’s new in Servlet3.1: An Overview
- How to build an IM (XMPP) solution with Oracle APEX and Websockets
- JavaOne 2012: Thinking Through Java Enterprise Performance (BOF 4712)
- Notifying ADF applications of database changes – fast and lean using Active Data Service for Server to Client Push – Part Two
- Notifying ADF applications of database changes – fast and lean using Database Query Result Change Notification – Part One
- Publishing to CometD Bayeux Channel from inside the Oracle Database – PL/SQL based push to CometD Web Client
- Stand-alone Java Client for jWebSocket Server – communicating from Java Client to Web Clients and vice versa over WebSockets
- Implementing a Java Server Side component for jWebSocket Server for WebSocket interaction with Web Clients
- Push-based synchronized slideshow web application – implemented using WebSockets and jWebSocket server – the open source Java WebSocket server
- First steps with jWebSocket – open source Java framework for WebSockets – installation and running samples