Adaptive Grid demo
What does the sample do?
This sample dmeonstrates how a JPPF Grid can be grown or shrunk dynamically based on the current workload.
To achieve this, the demo will adjust two components of the grid topology:
The calculations for the number of client connections and the number of nodes are done as follows in a client queue listener:
The demo itself will start with a single connection and a single node, then run a sequence of job batches, where the number of batches and the number of jobs in each batch are also configurable. It will display a message each tile the size of the connection pool or the number of nodes is changed.
How do I run it?
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.
To run the demo, in a command prompt or shell console, type "./run.sh" on Linux or "run.bat" on Windows. You will then see a number of meesages like these while the demo is running:
It is also possible to specify how many jobs can be sent concurrently by the application, by setting the following in config/jppf.properties:
**** submitting jobs batch #2 ***** increasing the number of server connections to 2 increasing the number of server connections to 3 increasing the number of server connections to 4 increasing the number of server connections to 5 increasing the number of nodes to 3 increasing the number of nodes to 4 job 'Job 11 - batch 2 (1/20)' result: execution successful job 'Job 12 - batch 2 (2/20)' result: execution successful job 'Job 13 - batch 2 (3/20)' result: execution successful ...
It is also interesting to monitor the grid with the amdinistration console: the topology view will show the slave nodes that are started and stopped, and the job data view will show more or less jobs in the server quueue, depending on the client connection pool size.
You can also play with the parameters of the demo that are configurable in the config/jppf.properties file:
# the maximum allowed connection pool size maxAllowedPoolSize = 10 # the maximum allowed number of nodes maxAllowedNodes = 10 # defines the number of job batches and their sizes jobBatches = 1 20 50 10 # duration of each task in millis taskDuration = 1500
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:
|Copyright © 2005-2015 JPPF.org||Tweet|