Deploying Distributed Computing (Job Processor) Applications

To deploy your distributed computing solution, you must deploy the necessary server and worker components.

Server

The server hosts the JobService and WorkerService. These are consumed by the client and workers to communicate with the central server. The following DLLs are required to host the JobService and WorkerService:

Create a virtual directory, and include the DLLs listed above in the application's bin directory. LEADTOOLS includes the JobService.svc and WorkerService.svc files which can be used when deploying. Place both the JobService and WorkerService SVC files in the root of the virtual directory.

The WCF service web.config file should contain the following settings:

The Workers.xml configuration file defines the settings for each worker in the Job Processor. The Workers.xml must be located in the App_Data directory of the virtual directory. For more information on configuration files and their settings, refer to LEADTOOLS Job Processor Settings.

LEADTOOLS toolkits include a SQL script file (<installationdir>\Examples\DotNet\CS\JobProcessorServerConfigDemo\Resources\ASPNetSqlReg.sql) which can be used to install the database, tables, stored procedures, etc., in any SQL database. Alternatively, the existing database installed with the toolkit can be attached to any SQL server instance. If the default settings were used to install the database, the database files (LEADTOOLSJobProcessorDB.htmlf and LEADTOOLSJobProcessorDB_log.LDF can be found in MSSQL\Data directory.

For more information on the Job Processor database, refer to Understanding The LEADTOOLS Job Processor Database.

Worker

Each worker machine requires the windows worker service to be installed. The following DLLs are required when deploying the worker service:

Install the windows service using the InstallUtil.exe (included with the .NET framework). For more information on the InstallUtil.exe, refer to http://msdn.microsoft.com/en-us/library/50614e95(v=vs.80).aspx. The worker service accepts command line arguments to specify the description and display name of the service (see below for example). This is useful when multiple services, each responsible for a different job type, are installed on the same machine. For more information on using multiple job types, refer to Understanding The LEADTOOLS Job Processor Database.

To install a service:

Installutil /ServiceName= "ServiceName" /Description="ServiceDescription" /DisplayName="ServiceDisplayName" [ServicePath]

Example - Installutil /ServiceName="LEADTOOLSOcrJobProcessorService" /Description="LEADTOOLS OCR Job Processor Service" /DisplayName="LEADTOOLSOcrJobProcessorService" "C:\JobProcessor\MyService.exe"

To uninstall the service:

Installutil /u /ServiceName= "ServiceName" /Description="ServiceDescription" /DisplayName="ServiceDisplayName" [ServicePath]

Example - Installutil /u /ServiceName="LEADTOOLSOcrJobProcessorService" /Description="LEADTOOLS OCR Job Processor Service" /DisplayName="LEADTOOLSOcrJobProcessorService" "C:\JobProcessor\MyService.exe"

The Worker layer (Leadtools.JobProcessor.WorkerLayer.exe) is responsible for loading the custom worker assembly that is responsible for actually processing jobs. The Leadtools.JobProcessor.WorkerLayer.exe executable is provided in both Win32 and x64 configurations (so be sure to deploy the correct version based on the target configuration of your worker assembly). For more information on creating worker assemblies, refer to Creating Job Processor Worker Assemblies.

The worker service configuration file (Leadtools.JobProcessor.WorkerService.exe.config) should contain the following settings:

When installing multiple services, either deploy the worker service executable for each service to separate directories, or rename the service executable (and corresponding configuration file) uniquely for the service to which it belongs. This allows each service to have its own configuration file, each using specific settings for each service. This is useful in cases where a single machine will host multiple services, each responsible for a specific job type. For more information on these settings, refer to LEADTOOLS Job Processor Settings.

References

Programming with the LEADTOOLS Distributed Computing (Job Processor) SDK LEADTOOLS Job Processor Settings Understanding The LEADTOOLS Job Processor Database Creating Job Processor Worker Assemblies

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Imaging, Medical, and Document
Click or drag to resize