This is a project to provide a library to assist in remote loading of a program executable, and bootstrapping within a distributed system.
Download: JRemoteBootstrapper.jar
Project Page: http://code.google.com/p/jremotebootstrap/
Write your program just like you always would.
public class HelloWorld {<br />
public static void main(String args[]) {<br />
System.out.println("Hello World!");<br />
}<br />
}
Now when you want to deploy your software, instead of executing main method as you normally would (java -cp _yourClasspath_ HelloWorld) execute the server instead as java -cp _yourClasspath_:JRemoteBootstrapper.jar org.franza.bootstrapper.server.Server
The Server will search the class path for all main methods and advertise them to clients over a UDP multicast heartbeat. This advertisement will inform clients how to request the class from the server.
To run the program from a client machine, you should run java -jar JRemoteBootstrapper.jar -Dclass=”HelloWorld” org.franza.bootstrapper.client.classloader.Client
Notice that the client JVM doesn’t actually contain the HelloWorld class in its class path. The client waits until it finds a server that advertises that it is hosting such a program and then it loaded it remotely over the network.
The idea is that you can take any existing software and deploy it to numerous workstations, then when it needs to be updated the only place it really exists is on the server. So updating the server code and restarting will automatically distribute the software to the client systems.
Server:
To run the server
java -cp JRemoteBootstrapper.jar org.franza.bootstrapper.server.Server
Optional: To change the port number that the server runs on add -Dport=3000 to the command line arguemnts.
Client:
To run the client either double-click the jar file, to load the graphical chooser or run the client
<br />
java -jar JRemoteBootstrapper.jar -Dclass="_the.main.class_" \<br />
org.franza.bootstrapper.client.classloader.Client<br />
Optional: To change the port number that the the client listens for server on, add -Dport=3000 to the command line arguemnts.