Wednesday, April 22, 2009

Printing

The previous post brings me on to the general area of printing.

To print a document which has just been created

For example a delivery note. Typically, this can be done via a browser as suggested in the previous post. It isn't possible to override the local user's browser setting, however they can change their own settings so that page headers are not printing, shading and images are printed, and even that they are not prompted for permission to print.

To print a batch, or print on someone else's printer

For example a batch of customer statements, or a batch of customer invoices, 100 sites worth of P&Ls etc. The print run might take a long time to prepare, which would result in a browser timeout. In this context, we are not going to be printing via the user's browser.

  • Have network access from a central print server to the client's printer. The job can then be run invisibly in the background, and the print can spool when the print is ready. A fairly simple print spooler can be run on a standalone linux/windows machine.
  • Emailing the user with the results of the print. The user can then open the document, print at their convenience, or depending on the format, cut/paste and analyse the results.
  • Emailing the user with a link to the results of the print. As above, other than that some central storage would be required, along with some sort of job schedule listing.
  • Introducing a job scheduler or concurrent process manager, and running the job in the background.
Pretty much all of the above need the ability for jobs to run in the background. This potentially opens up the complex area of job scheduling, including precedents, parallelisation, the ability to classify jobs by user, view and cancel jobs, and user time scheduling limitations, recurring jobs etc.
 
For the practical purpose of this application, I'm going to avoid batch processing entirely. Everything is going to go via the user's browser or otherwise complete while the user has their browser open, and applications will be written with this in mind. When timeouts eventually occur, clients will be given the option of running the application on a dedicated server, or will be of the size where they can afford some programming expertise to meet their requirements.

No comments:

Post a Comment