Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running java app as a batch and deployment

 
Udayan Kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

I have a scenario where in we have to run a java application as a batch operation. i.e. the java application will be executed a 100k or more times once a month.
The app in question is a core java application which makes use of few Apache utilities and Hibernate to communicate to the database.

I want to understand if it is ok to deploy such an application (batch intensive) on an application server. The plan is to provide a basic harness UI page to trigger the java batch operation. Is this inadvisable approach considering the impact on the performance of the app server as the batch operation would take quite a while?

The other option is to run the application as a standalone where in someone would have to trigger the application at periodic intervals. I looked at batch task utilities like Quartz but they don't run a job in auto schedule manner rather have to be chained with some batch initiating utility.

Another approach was to use Batch management system tools like Autosys or Ctrl-M but currently this option looks like a heavyweight solution for the problem scenario we are facing.

Let me know your thoughts.

Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application servers are designed to run multiple things at once. Having a batch job doesn't tie it up assuming you have enough memory/CPU allocated. Of course, you have to do this for a standalone program too or the machine will be too overloaded for the app server to run properly anyway.
 
Udayan Kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May seem to be a dumb question but is there an option where a call can be initiated from the app server and the memory intensive task of running the actual java (long running batch) application can be offloaded to use another JVM on the same machine w/out interfering with the app server's resources.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, just execute a .bat file - that will run in a new instance of jvm and insulate your app server from disasters.

If there are other machines on the network, you could start the job there. With something like JavaSpaces you could have a number of these batch jobs running all over the network, thus spreading the load away from your server.

Bill


 
Udayan Kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the late reply.

Rather than executing an external batch file I want to offload the current task to a new instance of JVM as mentioned in your post to insulate the app server from disasters.
From the servlet I call a method in a class and want this entire process to be shifted to a new instance of JVM.

We have our workflows clearly defined when we want this sort of behavior in the web app.

I tried searching on this but did not get much info so If someone has implemented anything similar do share your thoughts


Thanks Again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic