Category Archives: Programming

Writing Batch Programs

Batch programs are programs processing a big chunk of data. Our batch programs are written badly. Oh yeah, very badly. Because it continuously creates network traffic between the Application Server and the DB Server. And this is the main reason why our batch program is performing slow.

Right now, our consultants are suggesting to us to put our batch programs into the DB Server and executing it from there. And our contract Project Managers fully agree with it while a few of us do not. The consultant has his reasons and I agree to them – it will reduce the network traffic and our batch program will perform faster and it is faster to implement.

Here are my arguments:

  • We will have another set of programs to maintain and this will somehow in the long run create problems when it comes to program deployment.
  • The DB server is called a DB Server for a reason. It is where our DB sits and not the application.

The best solution for this is to use Oracle’s Stored Procedures. Although it would be a painful process to rewrite the business logic, but it is safe and runs faster and meets our consultant’s reasons. Using Stored Procedures will reduce our Java codes.

But it will take a long time to implement using Stored Procedures. Our customers are waiting to see new results in our Batch Programs by next week before they start to use our system. My take to this is yes, it is slow but compared to the older version, the new version has more processes and so the slow performance is justifiable until we do it the Stored Procedure way.

Follow

Get every new post delivered to your Inbox.