In a Java environment there are some similar things but I don't know that they do what you want. For example, Tomcat allows you to cluster several machines and distribute the load using round-robin scheduling.
But what you want to do is somewhat more complex. To get a near realtime load on a machine is very O/S specific - the way you do it in Unix is much different than the way you do it in Windows.
I'm not sure that Java would be your best bet in this case. But I can picture the kind of native (C, C++, etc.) code that you would need to do it. Generally you're going to have an "agent" on each machine that is in your cluster. This agent would be native code and would be able to monitor how busy the machine is and report that back to some sort of central server. The central server, when given a program to run, would pick the machine with the lowest current load and send that machine, via the agent, the code to run.
This is a non-trival thing to do. Several issues come to mind:
- Each machine in the cluster will likely need to have a very similar configuration. For example, if the program you're running depends on a particular library then all the machines must have the library installed on it.
- Machine load can change almost instantaneously. The central router may select a machine based on the load that it knows about and right after the job is scheduled to run the load may increase. There isn't a good way around this.
- There may be security issues that come into play. This ties back to the fact that all machines need to be very similar
Good luck - you've got a good amount of work ahead!
This message was edited 1 time. Last update was at 05/17/2006 12:42:40
|