I am trying to design a master-slave system with the following attributes:
1. Linux Master box having all the Java code. 2. At least two Windows XP Professional Slave boxes (no Java code on any of these)
Front end screens on Master would contain a text fields for IP Address and Java program to be executed. On a click of button, the slaves (who's IP Address was entered in the Master screen text field) would get the request to execute the given Java program, a given number of times. Once executed, each slave would turn the results in to the master via a file. After all the slaves have turned in their results, Master would consolidate the results, work another program on the results and re-delegate tasks to the slaves. The steps would stop iterating only when an exit criteria specified by the program has been met.
If we were to restrict all code to only the master box, what could be the lucidly possible ways to achieve this design?
What you're suggesting sounds possible and interesting. You want the slaves to have "no java code" but they will have to have a JVM and some kind of service running to do the work, right? Maybe you mean no source code?
What have you thought of for your design ... communications protocols, what kind of messages you'll send back and forth, how to execute programs on the slaves, capture output, etc?
Give us some kind of starting point and we'll see if we can keep you moving.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
the slaves are more of a server than the master in this case. slaves will need some support. You cant expect to send them a random file and execute it without creating some architecture to support that. your going to need servers on each slave to handle the requests.
have a look at some OSGI implementation, which can take jars from remote URL, load and start. It is a bit complex stuff then what you need, but you can always get idea by looking at its code One of such implementation is Knopflerfish, which I saw around 2 years back. Do look at the default bundled services it has, some automation in them might achieve the required task
- Deepak +
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.