Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

Kaazing Javascript & ReactJS TodoMVC Example

Kaazing is the world's most scalable, secure, and robust WebSocket platform for real-time Web communication

Kaazing - kaazing.com

Using Kaazing Technology

The Kaazing Developers website is a great resource for getting started.

Here are some links you may find helpful:

If you have other helpful links to share, or find any of the links above no longer work, please let us know.

Implementation

Application enhances ReactJS TodoMVC published on TodoMVC site with real-time capabilities. Kaazing WebSocket enables Web application to use publish/subscribe model. Application notifies other instances when

  • Item is created
  • Item is complete/incomplete
  • Item text is modified
  • Item is ‘busy’ - somebody is working on it to help dealing with the race conditions.

Application also contains NodeJS backend components that connects to AMQP server and receives all messages thus maintaining the current state of the items. Once the connection is established Web clients can obtain all the items in their current state by sending initialization request. Helper component that emulates socket.io behavior for backward compatibility with existing NodeJS socket.io implementations is located under node/socketioalt.js

Installing Kaazing AMQP Gateway

  • Download AMQP Gateway (Gateway + Documentation + Demos) from AMQP Gateway downloads page as a ZIP file This package also contains AMQP server Apache QPID see - Apache QPID for more information.
  • Unzip downloaded package to <your installation directory>
  • By default Gateway is configured not to restrict communications only from the scripts that are running on its embedded servers which may not be convenient for Web Development. In order to disable it
    • Go to _<your installation directory>/kaazing-websocket-gateway-amqp-4.0.6/conf _
    • Edit gateway_config.xml
    • Locate lines
      <allow-origin>http://${gateway.hostname}:${gateway.extras.port}</allow-origin> and replace them with <allow-origin>*</allow-origin>
    • Make sure that you have Java 7 or greater installed
    • Open terminal window at <your installation directory>/kaazing-websocket-gateway-amqp-4.0.6/bin and start gateway
      ./gateway.start
    • Open terminal window at <your installation directory>/qpid-java-broker-0.28/bin and start Apache QPID AMQP server
      ./qpid-server
    • Note: to stop both Gateway and AMQP server just execute Ctrl-C on the relevant terminal windows or just close them.

Running the application

cd <application directory>
npm install amqplib
npm install express
npm install http
npm install
  • Start the application
node serverws.js