We have a simple java app which runs user requests (commands) on the command line and outputs results. So, as an example, say the user submits a job along the lines of:
cmd.exe ping -10 google.com
Typically, we have around 100 users, submitting 100’s of requests to be exceuted. Currently, the java app simply queues the jobs and run them sequentially, without being “democratic” or “greedy” about it.
What we would like to do is have the ability to prioritize jobs, run jobs in a more “even” fashion (say 2 users have submitted 100 jobs each, we would like to run 1 job per user and switch back and forth).
To this end, I was wondering if there are any opensource tools such as PBS:
http://code.google.com/p/pbs4java/
which could integrate with java. A search on google does not reveal a lot – any comments or suggestions would be much appreciated.
UPDATE: The most important criterions I am after are:
[1] Should be opensource
[2] Should be able to integrate with Java.
I suggest taking a look at Akka Dispatch and priority features. You should manage how you want to assign the priorities to the tasks. So, in your case, as users submit more tasks, it could lead to degrading to lower priorities through time. The metrics should be defined by your problem requirement and injected into the library.
As a side node, Akka uses HawtDispatch ideas, so you might also take a look at the library if it suits you.