Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction | Help Version 19.0.7.12
|
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:
Leadtools.Services.JobProcessor.DataContracts.dll
Leadtools.Services.JobProcessor.FaultContracts.dll
Leadtools.Services.JobProcessor.ServiceContracts.dll
Leadtools.Services.JobProcessor.ServiceImplementations.dll
Leadtools.JobProcessor.DataAccessLayer.dll
Leadtools.Logging.dll
Leadtools.dll
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:
A connection string named 'LEADTOOLSJobProcessorDB' which points to the Job Processor database.
A logging channel, if logging is implemented.
WCF settings used to host the WCF services. The WCF web.config file that ships with the toolkit contains default a WCF configuration which can be used if a custom configuration is unnecessary.
Developer key and license file.
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.mdf 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:
Leadtools.JobProcessor.Worker.dll
Leadtools.JobProcessor.WorkerLayer.exe
Leadtools.JobProcessor.WorkerService.exe
Leadtools.JobProcessor.WorkerService.exe.config
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:
A logging channel, if logging is implemented.
The namespace / class in the worker assembly which should be created to process the job.
The type of job(s) this service will accept.
Path to the worker layer executable (Leadtools.JobProcessor.WorkerLayer.exe).
Path to the worker assembly used to process jobs.
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.