Administrator Guide

Overview

The jWebSocket Load Balancer plug-in offers to developers an amazing easy way to develop fully clustered, scalable and distributed endpoint services with automated load balancing mechanisms.



 

Download

For the installation of the Load Balancer plug-in, the user should be download-ing the packages containing in the jWebSocket server. The user can find that in our Download area.

Installation environment

 

  • The Java Virtual Machine and Java Development Kit (Sun JDK | OpeJDK) 1.6 version or higher installed.
  • A Web server (e.g. Apache) installed to publish the Web applications.
  • An IDE to develop Java applications (e.g NetBeans or Eclipse).

Installation process

 

  • Download jWebSocketLoadBalancerPlugIn package from the address noted above.
  • Unzip the downloaded package to a selected directory. For example you can unzip the jWebSocketLoadBalancerPlugIn package in a folder located in C:/Programs Files/jWebSocket if you use Windows OS, otherwise if you use Unix OS you can unzip the jWebSocketLoadBalancerPlugIn package in a folder located in /usr/lib/jWebSocket
  • Create the JWEBSOCKET_HOME environment variable and assign it as value the path to the directory "jWebSocket-1.0" where was unzip the jWebSocketLoadBalancerPlugIn package.

If the operating system is Linux, the package that contains the application client must be copied var/www in addition it should be given all permits through the console. The package that contains the server can be stored in any location. Before running the client in the browser, the server must be running on an IDE.

If the operating system is Windows, you need a simple Apache installation to publish the Web application. Copy the packet that containing the application client in a public Web server directory. The package that contains the server can be stored in any location. Before running the client in the browser, the server must be running.

Hardware

Developers may use machines with powerful Dual-Core processors or higher and 2 or more GB of RAM.

Settings

For the application execution, the user needs to include the following configuration of Load Balancer plug-in in the plug-in section in the jWebSocket.xml.

<plugin>
	<name>org.jwebsocket.plugins.loadbalancer.LoadBalancerlugIn</name>
	<id>jws.lb</id>
	<ns>org.jWebSocket.plugins.loadbalancer</ns>
	<jar>jWebSocketLLoadBalancerPlugIn-1.0.jar</jar>
	<server-assignments>
		<server-assignment>ts0</server-assignments>
	</server-assignments>
	<settings>
		<setting key="spring_config">${JWEBSOCKET_HOME}conf/LoadBalancerPlugIn/loadbalancer.xml</setting>
	</settings>
</plugin>

The file loadbalancer.xml contains a map with a list of clusters and cluster services, as well as specific settings from each cluster as its namespace.

<bean id="service2cluster" class="org.jwebsocket.plugins.loadbalancer.Cluster">
	<property name=endPoints>
		<list>
			<ref bean="service2endPoint1"/>
			<ref bean="service2endPoint2"/>
		</list>
	</property>
	<property name=staticEntries value="2">
	<property name="password" value="admin">
	<property name="namespace" value="org.jwebsocket.plugins.samplemul">
</bean>

How does it work?

 

  • Execute the Web server to publish the server-side application Web client. Copy your Web client files in a public Web server directory.
  • Execute the jWebSocket server by using the following command line:
  • Open your Web client with a WebSocket compliant browser. Older Browsers are supported by the Flash- or Comet-Fallback. Start using your Load Balancer Web application from your Web client.

Support

The Load Balancer plug-in is part of the official jWebSocket release, has been developed by Rolando Betancourt member of the jWebSocket development team, Rolando Santamaría leader of the jWebSocket development team and Alexander Schulze leader of international community jWebSocket.

Contact with us at:

Publications

Learn more about WebSockets in general, get background information and gain deeper insight!

Join jWebSocket

Wether developer, designer or translator – join the jWebSocket team and grow together with our success!

Copyright © 2013 Innotrade GmbH. All rights reserved.