RG043 – RES AM: Dispatcher+ Explained

By Rob Aarts


One off the major changes in RES released Automation Manager 2012 RC2 is the Dispatcher+ functionality, which we will examine in depth in this article To ensure we’re all on the same page, a plain dispatcher is a service running on a computer, which communicates information from the datastore to agents. If new jobs are available for agents to which it connects, the dispatcher will download all necessary data from the datastore and cache it locally. The agents will use this data to execute the Automation Manager jobs.

  • Any RES Automation Manager site can contain several dispatchers. One Dispatcher+ suffices for up to 1500 Agents. This is an very cool new improvement because the former version only supported max. 150 connections (without the old registry tweak ;-).  
  • The column Connections shows the number of currently connected Agents. This number is updated approximately every thirty seconds.
  • The column Max. connections shows the maximum number of Agents that have ever connected concurrently to each Dispatcher. For example, 10/1500 means that the maximum number of Agents that have ever connected concurrently is 10, whereas the dispatcher can handle 1500 concurrent connections.

Adding Dispatchers to your RES AM enviroment

  • Because the dispatcher+ is built in C#, it’s necessary to install .NET Framework 4 on the target computer first.
  • If you are upgrading an existing pre-2012 installation, the console has provision to do this for you as the Full .Net 4 components are included in the datastore. Simply rightclick on the existing dispatcher and deploy it.
  • The Automation Manager datastore contains both a 32-bit and a 64-bit version of the Dispatcher +installation MSI. When you deploy a Dispatcher+ from the management console, RES Automation Manager will automagically use the correct installation file for 32-bit and 64-bit Microsoft Windows versions.
  • You can also create a job to install Agents unattended. Automation Manager features a special task called “Deploy RES Automation Manager Component” where you can schedule a push of consoles, dispatchers, or agents.
  • As a final alternative, you can also deploy dispatchers manually using MSIexec. This is handy if you have some existing ESD solution or manual scripting thing which you want to  move to Automation Manager. The commandline is: Msiexec.exe /i “<path>\res-am-dispatcher-x.x.x.x.msi” DBSERVER=”<yourdbms>” DBNAME=”AutomationManager” DBUSER=”<username>” DBPASSWORD=”<password>” /qn
  • New dispatchers deployed from the console, always take on the global Settings. These are found in the console under Infrastructure > Datastore Settings > Global Settings. If necessary, you can edit these settings for individual dispatchers after their deployment.

Dispatcher configuration tips

Resource location: First off, changing the location off the dispatchers resource cache folder might be a good idea when the disk the dispatcher is installed on (normaly C:\) doesn’t have enough space for all resources to be cached. Worst case this can bring your dispatcher down! It’s easy to fix it though.

  • Stop the dispatcher service.
  • Create or edit the following registry entry:

Key: HKLM\SOFTWARE\RES\AutomationManager\Dispatcher
Value: ResourceCachePath
DataType: REG_SZ (String Value)
Value Data: Local path to Dispatcher resource folder

  • Start the Dispatcher service.

Properties tab: If Dispatchers are identified by MAC address or by Domain name/NetBIOS name, this information will be shown in the field Identified by. This field is not shown if components are identified by their GUID. You can change the way in which components are identified in the Global Settings.

Settings tab: Except for the setting exclude from dispatcher list, you can choose for each setting whether to use Dispatcher specific settings or global settings.
Here you can adjust the connection, bandwidth and cache setting.


Master caching

This section covers a feature, which makes it possible for Dispatchers to share a common resource cache on a specific site: By assigning a master dispatcher, only this dispatcher is allowed to download resources from the datastore. If you “redirect” the other dispatchers to this master dispatcher, they only download resources from the master dispatcher; not from the datastore directly. This reduces bandwidth consumption between the dispatchers and the datastore, and so improves the reliability of the connection with the datastore and increases the overall speed at which resources are downloaded. Master caching is an essential feature to take into consideration in your design if you are planning an international deployment or any kind of setup that requrires multiple WAN connections.

Setting up a master Dispatcher: When setting up master caching, RES Software recommends making a master dispatcher exclusively available to dispatchers: this prevents agents from being able to contact the master dispatcher, thereby putting needless load on the master dispatcher. By default, RES Automation Manager uses port 3163 for communication between agents and dispatchers. With the registry settings dispatcher port, you can specify a different port on the master dispatcher (for example, 3164). This makes the master dispatcher unavailable for agents. It may still be reached by other dispatchers, provided you have specified this on these dispatchers. To specify a different port, set the following registry setting on the master Dispatcher:

Key: HKLM\SOFTWARE\RES\AutomationManager\Dispatcher
ValueName: DispatcherPort
ValueData: Port number

Setting up the other Dispatchers: With the registry setting MasterCacheDispatcherList, you can specify on a Dispatcher to which Master Dispatcher(s) it should be redirected to, when downloading Resources. If you specify multiple Master Dispatchers, the next master Dispatcher in the list will be used if a certain master Dispatcher is offline or for other reasons unavailable. To redirect a Dispatcher to a master Dispatcher, set the following registry value on this Dispatcher:

Key: HKLM\SOFTWARE\RES\AutomationManager\Dispatcher
ValueName: MasterCacheDispatcherList
DataType: REG_SZ
ValueData: IP address or FQDN of the Master Dispatcher.

Note: Separate multiple Dispatchers using a semicolon (;) If you have specified a different port on the Master Dispatcher, you also need to specify this port on each Dispatcher that is redirected to the Master Dispatcher. To redirect the other dispatchers, set the following registry setting on each slaved Dispatcher:

Key: HKLM\SOFTWARE\RES\AutomationManager\Dispatcher
Value Name: MasterCacheDispatcherPort
Data Type: REG_DWORD
Value Data: Port number of the master Dispatcher


Dispatcher Web API

This is a great new feature in Automation Manager 2012! While the main function of a Dispatcher is to cache and broker communication between the Datastore and the Agents, the Dispatcher also offers a Web API. This allows system developers to build and develop their own RESTful and/or SOAP web services, to integrate Automation Manager job scheduling into external systems. Communication with the Web API is secured with the regular security accounts of your RES Automation Manager site. This section provides basic information about how to get started with the Dispatcher Web API. To use it, you should have a basic familiarity with software development and RESTful and SOAP Web services.

Authentication: If your RES Automation Manager site is secured by login accounts, authentication is required to gain access to the Web API. You can only gain access with a login account using RES Automation Manager authentication. Login accounts using Microsoft Windows Authentication will not be granted access to the Web API. This means that if your RES Automation Manager site only contains login accounts using Microsoft Windows Authentication, you have to create an additional login account using RES Automation Manager Authentication. If your RES Automation Manager site is not secured by login accounts, no authentication is required.

Configuration: The Dispatcher Web API is disabled by default. You can enable it by creating the following registry value. After creating the registry value, restart the RES Automation Manager Dispatcher service (Shortname is: RESWDS).

Key: HKLM\SOFTWARE\RES\AutomationManager\Dispatcher
Value Name: WebAPI
Data Type: REG_SZ (String)
Value Data: yes | no

In your browser, use the following base URL as a template for job scheduling in an external system or client:

http://[dispatcher host name]/dispatcher/schedulingservice/

If you are hosting the web services on a different address (URL) and/or portnumber, please change these settings accordingly. You can change the settings of the base URL in the file Dispatcher.exe.config, which you can find in the installation folder of the Dispatcher (for example, “demo-010”, “myDispatcher” or “myDispatcher:8097”). When prompted for a username and password, use the credentials of an existing login account in your RES Automation Manager site. If no login accounts exist, leave the fields empty. For a reference to all the commands you can use through the Web API, online help is accessible at:

http://[dispatcher host name]/dispatcher/schedulingservice/help

This page will give you a nice overview of all available resources and actions. (Editor’s note: Here’s a preview below) All actions correspond to the functionality in the Job Execution nodes of the Console. For more information about the Dispatcher Web API, please refer to the RES Automation Manager 2012 Administration Guide, which is available as HTML or PDF.



No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.