JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   Forums 

Fibonacci Fork/Join demo

What does the sample do?

This demo demonstrates a node add-on which replaces the standard node processing thread pool with a fork/join thread pool. This allows JPPF tasks to locally (in the node) spawn ForkJoinTask (or any of its subclasses) instances and have them processed as expected for a ForkJoinPool. The use of this fork/join executor is illustrated with a Fibonacci computation demo.

How do I run it?

Before running this sample application, you must have a JPPF server and at least one node running.
For information on how to set up a node and server, please refer to the JPPF documentation.
  1. For a node to use the fork/join executor add-on, you need to add the following property to its configuration file:
    jppf.thread.manager.class = org.jppf.execute.ThreadManagerForkJoin
  2. Once this is done, start the server and the node(s)
  3. From a command prompt, type: "run.bat" (on Windows) or "./run.sh" (on Linux/Unix)

How do I use it?

This sample doesn't have a graphical user interface, however you can modify some of the parameters in the JPPF configuration file:

  1. open the file "config/jppf.properties" in a text editor
  2. at the top of the file, you will see the following properties:
    # number of Fibonacci computation tasks to execute
    fib.fj.nbTasks = 10
    # order of Fibonacci number to compute
    fib.fj.N = 10
  3. "fib.fj.nbTasks" allows you change the number of tasks in the submitted job, and thusto simulate various workloads on the grid and especially on the nodes
  4. "fib.fj.N" is the Fibonacci order, the higher it is the larger the number of spawned fork/join tasks will be

How can I build the sample?

To compile the source code, from a command prompt type: "ant compile"
To generate the Javadoc, from a command prompt type: "ant javadoc"

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 source, or have a look at the API documentation.

In addition, There are 2 privileged places you can go to:


JPPF Copyright © 2005-2017 JPPF.org Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads