1 |
mojays |
2 |
package appl.parallel.server; |
2 |
|
|
|
3 |
|
|
import java.rmi.RemoteException; |
4 |
|
|
import java.util.HashMap; |
5 |
|
|
import java.util.Vector; |
6 |
|
|
|
7 |
|
|
import appl.parallel.ComputingResource; |
8 |
|
|
import appl.parallel.spmd.SPMDClientController; |
9 |
|
|
import appl.parallel.spmd.SPMDTask; |
10 |
|
|
import appl.parallel.spmd.split.SinglePartitionInfo; |
11 |
|
|
import appl.parallel.spmd.split.SplitMap; |
12 |
|
|
|
13 |
|
|
/** |
14 |
|
|
* The resources participating in a SPMD computation need to implement this |
15 |
|
|
* interface. |
16 |
|
|
* |
17 |
|
|
* @author Dominik Appl |
18 |
|
|
*/ |
19 |
|
|
public interface SPMDResource extends ComputingResource { |
20 |
|
|
|
21 |
|
|
/** |
22 |
|
|
* Executes the given Task. |
23 |
|
|
* |
24 |
|
|
* @param SPMDTaskName |
25 |
|
|
* name of the taskclass to be executed |
26 |
|
|
* @param referenceID |
27 |
|
|
* the ID of the Grid which should be the reference resource |
28 |
|
|
* @param parameters |
29 |
|
|
* parameters for the given Task |
30 |
|
|
* @return an object array containing the results for possibly multiple |
31 |
|
|
* executions (when using multithreading with multi-core cpus) |
32 |
|
|
* @throws RemoteException |
33 |
|
|
* if the connection fails |
34 |
|
|
* @see SPMDClientController#setReferenceResource(Object) |
35 |
|
|
*/ |
36 |
|
|
|
37 |
|
|
public Object[] runSPMDModelTask(String SPMDTaskName, int referenceID, |
38 |
|
|
Object... parameters) throws RemoteException; |
39 |
|
|
|
40 |
|
|
/** |
41 |
|
|
* @param IPs |
42 |
|
|
* the IP addresses of all other participating servers. They MUST |
43 |
|
|
* have the same index as their according partition in the |
44 |
|
|
* {@link SplitMap} has. |
45 |
|
|
* @return creates a new {@link PartitionDataServer} on this resource and |
46 |
|
|
* returns it |
47 |
|
|
*/ |
48 |
|
|
public PartitionDataServer createDataServer(String[] IPs) |
49 |
|
|
throws RemoteException; |
50 |
|
|
|
51 |
|
|
} |