Wednesday, July 9, 2008

Designing a batch system with.net 2.0

A common requirement for larger scale systems is to have some kind of batch processing system. Batch processing is beneficial when you have certain tasks that consume alot of resources and the tasks are not urgent. An example might be sending out an email notification to subscribers or printing invoices.
There are a few things to keep in mind when designing a batch system:
  • You should always use a sufficient amount of logging to help you resolve issues.
  • Designing a good BatchJob base class will make things alot easier for future development.
  • Batch system events should be visible.
  • The Batch System should be easy to re-configure (dont hard code stuff you shouldnt).
  • Build provisions for batch job failiures and time outs.
  • Dispose of resources properly.

I'll write a bit about how I implemented a batch system I just finished using c#.net and an asp.net 2.0 application to provide visibilty of batch system events.

No comments: