Documentation Center

Background Task

Enhancements on the centralized Background Task system that replaces the decentralized Microsoft Message Queuing (MSMQ) system.

General

By introducing the Background Task system, we offer a full replacement of the previously used Microsoft Message Queuing system (MSMQ). Some features we introduced are:
  • Database centralized Xml Settings configuration (\Websites\Author\EnterViaUI\Admin.XMLBackgroundTaskConfiguration.xml). This provides a single point of configuration. Through Windows environment variable settings, we still allow per server changes. You can set on top of this extra environment variables such as installation paths in \Applications\BackgroundTask\Bin\BackgroundTask.exe.config.
  • Matrix based polling with maximum executions per message type, server or server role - if desired. By default we will restrict the number of publish operations to 2 in parallel, but we will at the same time also allow 2 translation management operations, a synchronize and 2 other (customer) types. So in this example up to 7 tasks are handled in parallel allowing various message types to make progress. Configuring the number of parallel executions protects the available server resources.
  • Scalability and fairness based on the central database queue.
  • The background task will be leased. This allows lease refreshes, lease time outs and hence recoveries without administrator interventions.

All programmer's interfaces are now fully natively .NET. In 11.0.0 we introduced IWrite* plugins as replacement for IOnDocStore and ICustomerFunction. Now we introduce IBackgroundTaskHandler to replace IEventHandler.

Improved polling increases BatchImport and PushTranslation throughput

The BackgroundTask service poller sleeps a configured interval (by default 10s) if all slots in all groups are occupied or when there are no tasks waiting to be executed. Some COM+ handlers like PushTranslation and BatchImport work with a single task that they continuously resubmit. This causes in practice the sleep interval to always be triggered. So effectively a slow down of these background tasks services (a BatchImport file import for example) takes less than the 10 seconds sleep time. [TS-8977|TS-8799]

As a general improvement, the poller will now be activated when a slot is freed up from a group. For the above example it means that the resubmitted task of a BatchImport will almost immediately be picked up again, therefore increasing throughput.

Besides this throughput improvement we changed the out-of-the-box XMLBackgroundTaskConfiguration.xml ISHBATCHIMPORT @isolationLevel value from Process to None. This avoids starting a new process for every file that needs importing. This could only be done by adjusting the logging engine to avoid file lock issues.

BackgroundTask isolationLevel AppDomain added

The execution by the BackgroundTask service of implementations of the IBackgroundTaskHandler configured through the @isolationLevel attribute can now be driven through these variations:
  • None; meaning that the code is directly loaded and executed by the BackgroundTask service (BackgroundTask.exe).
  • Process; meaning that the code is directly loaded and executed by a new child process of the BackgroundTask service (BackgroundTaskIso.exe).
  • AppDomain; meaning that the code is loaded in a separate .NET application domain (for the background task id) and then executed by the BackgroundTask service (BackgroundTask.exe). When the execution finishes this domain is unloaded in order to release all resources loaded in the domain. [TS-8989|TS-8350]