Categories


Loading feed
Loading feed
Loading feed

IBM Shows Us: Batch processing in PHP


In a former life I was a System Administrator. Fun job but I ended up writing a bunch of little bash shell scripts to do small tasks. Then I discovered the power of PHP, wget, and cron. It was a life changing experience, I still get misty-eyed just thinking about it.

Along similar lines, Jack D. Herrington has published an article over at developerWorks titled Batch processing in PHP. Jack poses the question:

What do you do when you have a feature in your Web application that takes longer than a second or two to finish?

From that jumping off point, Jack takes you on an interesting journey that includes a very well written primer on cron. He starts off with cron because when doing batch processing like this you have to have a poller. There’s nothing wrong with sticking to the tried and true. Jack doesn’t say which version of cron he is working with however. The syntax varies slightly between versions so make sure you know your version before launching in.

From there, Jack walks you through several examples, each pointing out a different idea.

  • Sharing data between front and back end systems via database.
  • Sharing processes between front and back end systems by storing code in the database and executing it on the back end.
  • Using files instead of databases for interprocess communication.

If you are looking for something you can cut, paste, and use, then keep on moving, this isn’t the article you are looking for. Jack does a great job of explaining the concepts involved but it’s not really a tutorial. However, if you’ve always wanted to get into batch processing, this is a great introductory article.

=C=

Comments