Concurrent Jobs demo
What does the sample do?
This sample demonstrates fully working implementations of the patterns explored in the Submitting multiple jobs concurrently section of the documentation.
How do I run it?
1. Grid setup
- you will first need to start a JPPF server and one node. For information on how to set up a node and server, please refer to the JPPF documentation.
- start a JPPF administration console
- once you can see the driver and node in the console's topology view, select the node, then click on the "node provisioning"
() button. Enter 3 for the number of slave nodes, then click "Ok". You should see 3 additional nodes starting. Lastly, switch to the "Job data" view
2. Running the demo
- open a command prompt in the JPPF-x.y.z-samples-pack/ConcurrentJobs folder
- start the demo by entering "run.bat n" on Windows, "./run.sh n" on Linux/Unix or launching the Ant script "ant -Dfn=n run",
where n is a function number corresponding to each concurrent job execution pattern, with the possible following values:
- for the "job submissions from multiple threads" pattern
- for the "multiple non-blocking jobs from a single thread" pattern
- for the "full asynchronous processing" pattern
- for the "job streaming" pattern
- During the demo, the "job data" view of the administration console will show the jobs executing in parallel and how they are distributed among the nodes:
- ConcurrentJobs.java: The entry point for the demo, implements all the concurrent job patterns
- JobProvider.java: provides a stream of jobs based on the data in a text input file
- MyTask.java: a simple JPPF task implementation used by all execution patterns in the demo
I have additional questions and comments, where can I go?
If you need more insight into the code of this demo, you can consult the Java source files located in the CustomLoadBalancer/src folder.
In addition, There are 2 privileged places you can go to: