Windows System Services Development - Case Study

The Challenge

  • The project required generating a detailed set of reports containing revenues from past quarters as well as future projected revenues.
  • Each report was based on a certain time-period as well as a certain end-customer.
  • For a given report run period (e.g. the entire 2007) - one would end up with several thousand reports (one for each quarter for each end-customer).
  • These individual reports needed to be merged - and the resulting merged report sent to a pre-selected printer.
  • With the average size of each report in the MegaBytes - the possible size of the final merged report could be in the several 100s of MegaBytes. To process these in a Web environment - would typically bring the web-server to its knees (in terms of memory and resource consumption).

The Solution

  • In order to better handle the processing of large documents, an offline (outside the Web-Server) process was designed as a Windows Service.
  • An efficient file system monitoring component was used to constantly monitor for the presence of new reports. This component ran on a separate thread - leaving the actual processing on the main thread to continue without interruption.
  • A highly configurable merge component was developed - which shouldered the responsibility of performing the actual merging of the several MegaBytes of reports. The merge component provided feedback in the form of a detailed running log of its processing. This included any failure conditions and exceptions encountered during the merge process.
  • The entire process was written as a constantly running windows service which could be managed from the Services Control Panel. An installation program was developed to install and deploy the service running under a pre-specified user account.
  • Unit tests were written to test each piece of functionality - including loading and merging all documents.
  • The end result was a smoothly running windows service that ran constantly - and merged a large set of adobe pdf reports into one giant report - which was sent to the printer.

Highly Scalable Web Applications

sailing boat

Learn how agile practices helped us build and deploy a 6 to 9 month application in under 4 months.