Setting Up Kaazing WebSocket Gateway Clients

To set up Kaazing WebSocket Gateway clients, go to kaazing.com/download, click the name of the client SDK you want, and follow the instructions. You can download the client SDKs to your computer, install them via a package manager, or include them in your development environment via other means such as a content delivery network.

Kaazing WebSocket Gateway Client Tutorial Applications

There are tutorial applications publicly available on Github for all of the Kaazing WebSocket Gateway clients:

Install the Gateway by unpacking the compressed download of the Gateway.

Unpack the Gateway to any directory location. Unpacking creates the Gateway directory structure into a directory of your choice (for example, C:\kaazing or /home/username/kaazing). See About GATEWAY_HOME to learn more about Kaazing Gateway directory destinations.

Start a local Gateway.

For Windows: use the Windows Services Manager or use the net start command with administrator rights. Alternatively, in Windows Explorer, navigate to the GATEWAY_HOME/bin directory where you unpacked the Gateway and double-click the gateway.start.bat script.

For Linux: sudo service kaazing-gateway-community-5.0.x-platform start

When you successfully start the Gateway, messages display in your shell or command prompt indicating the services that are hosted by the Gateway. The startup message might differ depending on your Gateway configuration. To verify that the Gateway started correctly as a service, look at the log file in GATEWAY_HOME/log/service.log that is generated when the service is started or stopped. If the Gateway does not start successfully, see Troubleshoot Kaazing Gateway Configuration and Startup or contact your administrator.

Verify the Gateway setup.

To verify that the Gateway is up and running, open a browser and access the Gateway home page at http://localhost:8000/. The “It Works!” page displays.

You are now done setting up the Gateway locally.

To start building your first application, see the For Developers documentation topics.

To stop the Gateway on Windows, use the Windows Services Manager, press CTRL + C at the command prompt that was used to start the Gateway or simply close the command prompt, or use the net stop command to stop the Gateway service.

To stop the Gateway on Linux, UNIX, and Mac, kill the process at the command line, or use the Linux or Ubuntu (Upstart) service stop command.

Navigate to the GATEWAY_HOME/conf/ directory and edit the Gateway configuration to update the value of the gateway.hostname property by replacing localhost with your host name or IP address.

Edit the Gateway configuration file you are using gateway-config.xml or edit your custom configuration file if you created one. The Gateway configuration files are described in detail in About Gateway Configuration.

Replace localhost with your host name or IP address.

For example, the hostname example.com replaces localhost as the property value for gateway.hostname in the following Gateway configuration file:

Note: You can optionally specify default values for configuration elements using the properties element in the “Property defaults” section of the Gateway configuration file. Doing so is recommended because it allows you to define a property value once and have its value used throughout the configuration.

If you are using a message broker, start it. You can also start one of the pre-packaged brokers and the Gateway.

Setting Up a Secure Kaazing Gateway Configuration

By default, the Gateway listens for non-encrypted traffic. Secure communication between the browser and the server is necessary to ensure that only the intended recipient of a message can read the transmitted message and to allow the message recipient to trust that the message is indeed from the expected source.

Figure: An Encrypted Configuration Using Kaazing Gateway

For secure communication with the Gateway, consider configuring for the following levels of security:

Secure network traffic Configure Transport Layer Security (TLS, also known as SSL) for secure communications channels to access the Gateway by setting up certificates. See Secure Network Traffic with the Gateway for more information.

Limit access to services Use Cross-Origin Resource Sharing to control access to Gateway services based on the origin of an application by configuring cross-site constraints in the gateway-config.xml file. See Configure the HTTP Challenge Scheme for more information.