WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Using the dispatcher

This topic describes the dispatcher application and how to utilize it.

The dispatcher is a standalone application that acts as an intermediary between large Location Awareness Services for WebSphere® Premises Server event providers, such as hubs that process more than 300 messages per second, and one or more devices. The dispatcher retrieves all location messages from the event providers it is connected to and distributes them to one or more Location Awareness Services for WebSphere Premises Server devices. Using the dispatcher enables Location Awareness Services for WebSphere Premises Server to increase the number of location messages it processes.

The dispatcher is shipped with Location Awareness Services for WebSphere Premises Server and is located in the LAS_HOME\samples\AtlasStandaloneDispatcher directory.

Communicating with event providers

The dispatcher connects to the event providers as a socket server using the IP address and port that are specified in the dispatcher.bat file. When the dispatcher establishes a connection, it receives all location messages sent by the provider and distributes them to the connected devices. Each device receives a subset of the location messages from the event provider.

If the dispatcher cannot connect, it tries again every 30 seconds. If an existing connection to an event provider drops, the dispatcher tries to reconnect in time intervals increasing from one to 30 seconds.

Communicating with event devices

The dispatcher communicates with a device as if it were an event provider. The dispatcher waits for a device, which is a client application to the dispatcher, to connect. You specify the number of clients and associated ports that can connect to the dispatcher in the dispatcher.bat file. Each client must use an individual port.

When the dispatcher connects to a device, it forwards all location messages assigned to that device. All messages have the same format and content as when they are received from the event providers.

How location messages are assigned to a device

The dispatcher supports two simple algorithms for assigning location messages to a device: modulo (the suggested algorithm) and round robin. You specify the algorithm that you want to use in the Dispatcher.bat file.
  • Modulo - This algorithm uses the last digit or letter of a location message's tag ID. The number of active devices determines which device the message is assigned to.

    If there are no active Location Awareness Services for WebSphere Premises Server devices, the dispatcher discards the location messages from the provider. The dispatcher considers only active devices, and forwards all messages arriving from the location event providers to them. If a device cannot keep up with the number of messages provided, the dispatcher queues the outstanding messages.

  • Round robin - Using this algorithm, if N Location Awareness Services for WebSphere Premises Server devices are connected to the dispatcher, each gets every Nth location message.
  • Hash map - Setting this algorithm means that the set of available tag IDs is evenly distributed to the different devices and that messages referring to the same tag ID always go to the same device.
Note: In a production environment, use the modulo or the hash map algorithm. These dispatching algorithms work better with filtering and position smoothing within Location Awareness Services for WebSphere Premises Server. You might use the round robin algorithm in a test environment where you use fewer tags to generate test data.

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.