JobManager

Rationale

Most applications need to do some sort of data processing. In applications with GUI it is often required that application windows stay responsive to user interaction while processing happens in the background. There are various approaches to accomplishing that. JobManager is meant as a framework which focuses on the following things:

  • simplicity of use in the application
  • flexibility - provides easy way of implementing new job handlers and related functionality

JobManager not only provides a hierarchy of abstract classes, but also useful implementations such as handler that uses thread pool. These subclasses can be used "out of the box" easily. Moreover, programmer can focus on providing processing logic and not on technical details concerning executing job itself - that is provided by JobManager.

Design

TBD.

Examples

ThreadPoolJobHandler

This class is provided in the core JobManager package. It uses a pool (of configurable size) of worker threads to accomplish given job. While thread programming can be tricky and often introduces hard-to-find bugs, centralized handling of threads usage reduces the maintenance efforts to a set of classes related to this handler.

JobManager in Straw

JobManager can be used for the following jobs:

  • feed update
  • feed parse
  • OPML import/export
  • ...
  • (anything that blocks the UI)

Apps/Attic/Straw/JobManager (last edited 2013-11-21 22:41:16 by WilliamJonMcCann)