Using P3
|
|
last-updated: September 5, 2004
This page provides a quick start guide of P3 and
you can experience P3 by following steps.
Table of Contents
Number of computers
You need 3 or more computers on a LAN / subnet,
on which all computers can receive broadcast traffic from other computers.
Multiple instances of P3 Hosts and Controllers can run on one computer
with an appropriate configuration of JXTA.
Limited use cases
- Though P3 work over different LANs / subnets and even on Internet,
this tutorial does not explain how to do it for simplicity.
- Similarly, the daemon program, Host works either
in GUI mode and GUI-less mode but this guide show only the usage in GUI mode.
-
Multiple Controllers can co-exist simultaneously but
the scenario in this guide has only one Controller.
On the first start-up of Host and Controller,
The "JXTA Configurator" window appears up (Fig. 1).
P3 uses JXTA as the communication library
and it requires a proper configuration along users' usage and environment.
Fig. 1: JXTA Configurator window
- On the [Basic settings] panel, which is the default panel shown up first,
put an arbitrary peer name on the [Peer Name] text box.
Note that this peer name is only an identifier for the human, not for computers
and multiple computers can have the same peer name.
- Click the [Advanced] button on the panel.
The [Experienced Users Only] panel appears (Fig. 2).
Fig. 2: Experienced Users Only panel
The first [Enabled] checkbox in "HTTP Settings" area is checked (enabled).
Click this checkbox and disable it.
- Click the [OK] button on the lower part of the window.
Now you completed JXTA configuration.
JXTA Configurator window does not appear on the next start-up and later.
The configuration was stored into the .jxta/ directory and
you can clear all configuration and cached information JXTA holds by
removing the .jxta/ directory.
Host is the daemon program which collectively hosts
P3 parallel processing applications.
A resource provider (PC contributor) runs this daemon program on their PCs.
On 2 or more computers, start Hosts.
In this guide, one of them will work as the master of master-worker style
distributed computation and others are workers.
On UNIX-like OS:
<somewhere>/megacomp/bin/mc-host.sh
On Windows:
<somewhere>\megacomp\bin\mc-host.bat
The <somewhere>
is the directory where
you install P3 into.
A Host window appears up (Fig. 3).
Fig. 3: Host window
Controller is the tool to submit computational jobs to Hosts
and control the jobs.
A resource user (PC user) uses this tool.
On a computer which does not run a Host, start a Controller.
On UNIX-like OS:
<somewhere>/megacomp/bin/mc-controller.sh
On Windows:
<somewhere>\megacomp\bin\mc-controller.bat
The <somewhere>
is the directory where
you install P3 into.
A Controller window appears up (Fig. 4).
Fig. 4: Controller window
Submit a job using the Controller.
You first create a Job Group (implemented as a peer group of JXTA)
and submit JAR files representing an application program.
- Click the [File] menu on the top-left part of the Controller window.
Choose the [Group] submenu.
Click the [Create Job Group] item on the pop-up menu.
Fig. 5: Create Job Group
- A [Job Group Name] dialog appears (Fig. 6).
Type an arbitrary job name and click the [OK] button.
We assume that you type "rc5 attack" here.
Fig. 6: Job Group Name dialog.
- You see the job name you typed in the left-side pane (Fig. 7).
In a short time, Hosts notice that the Job Group was created and
the name is shown on the Host windows.
Fig. 7: A Job Group was created.
- Click the job name ("rc5 attack") with the right button.
Click the [Join Job Group] item with the left button on the pop-up menu
(Fig. 8).
Fig. 8: Join Job Group.
- Once the Controller joined the Job Group,
"Peers" and "Files" lines appear on the left-side pane (Fig. 9).
Fig. 9: Controller after joined Job Group.
- Click the job name ("rc5 attack") with the right button.
Click the [Submit File] item with the left button (Fig. 10).
Fig. 10: Choose [Submit File] item.
- File dialog appears (Fig. 11).
Submit the <somewhere>/megacomp/dist/app/rc5attack.jar file
by choosing the file and click the [OK] button.
This JAR file representing an application program
which implements RC5 encryption key search.
Fig. 11: File dialog.
- You can see the name of the submitted JAR file (rc5attack.jar)
by double-clicking the "Files" line on the left-side pane (Fig. 12).
Fig. 11: A JAR file rc5attack.jar submitted.
Hosts join a discovered Job Group to participate in the job
which the Job Group represents.
The Host in a Job Group is under control of the Controller
which has submitted the job.
- Confirm that the name of the submitted Job Group is shown
on upper part of the Host window (Fig. 12).
If the name is not shown, wait for some time to see it.
Fig. 12: Job Group name on Host window.
-
Click the job name ("rc5 attack") with the right button.
Click the [Join Job Group] item with the left button on the pop-up menu
(Fig. 13).
The data and the time are shown on the right column of the job name.
Fig. 13: Join Job Group.
- On all Hosts you started, do the joining operation as written above.
Now a Controller and all Hosts are prepared to run a job.
You can control the job using the Controller.
- On the Controller window,
double-click the "Peers" line on the left-side pane.
All peers (Controller and Hosts) are listed under the "Peers" line
(Fig. 14).
If a peer remains having a not-green icon,
wait until all peers have green icons.
Fig. 14: Peers (Controller and Hosts) in Job Group.
- Click the JAR filename ("rc5attack.jar") with the right button and
you see the job operation menu (Fig. 15).
Click the [Start Application] item with the left button and
the Controller send job start messages to all Hosts.
Fig. 15: Job operation menu.
- All Hosts in the Job Group receive the job start message and
start the job.
Once the job starts, the icon on the left of the job name ("rc5 attack")
becomes red from orange.
-
Lower part of a Host window shows output from the job
(Fig. 16).
Fig. 16: Job output.
You can stop the job while it running.
You also have to stop the job to re-start it.
- On the Controller window,
Click the JAR filename ("rc5attack.jar") with the right button and
you see the job operation menu (Fig. 15).
Click the [Stop Application] item with the left button and
the Controller send job stop messages to all Hosts.
To stop Controller and Hosts,
click the [File] menu on the top-left part of the window
and choose the [Quit] item in the menu.
Return to Documents page
Return to P3 main page