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   On Github   Forums 
June 03, 2023, 05:22:14 PM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: JPPF Node Disconnect from one driver, connect to another?  (Read 3450 times)

benlawry

  • Guest
JPPF Node Disconnect from one driver, connect to another?
« on: February 07, 2009, 12:43:46 AM »

Sorry if this is a noobish question, but I'm pretty new to JPPF.  I'm working on some software that will allow the user to remotely launch nodes on any machine participating in a common distributed computing environment, and then control which drivers the nodes correspond to (that way, the user can choose what machine and how many nodes he/she wants to run for a specific task).

My question is this - is there any way to disconnect a node from the driver it is connected to and reconnect it to a different one?  Keep in mind, drivers in this system are dedicated to a single task.  When that task completes, it will probably be more advantageous to move the nodes that were running that task to a different driver, rather than kill those nodes, spawn new ones in their place, and THEN attach the new nodes to a different driver.

Does that make sense?  Let me know if things are unclear and I'll try to clarify.  Thanks!
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
JPPF Node Disconnect from one driver, connect to another?
« Reply #1 on: February 07, 2009, 06:09:32 AM »

Hello,

Yes, your question makes a lot of sense. Unfortunately, this capability does not exist yet in JPPF, however I have registered a feature request for it: 2575515 - Control which driver a node connects to

Currently, I believe the functionality you are looking for could be implemented in a different way, using a single driver for all the nodes, some manipulation of the nodes' configuration and execution policies for the jobs you submit.

The approach would be as follows:
  • using a single driver, with all the nodes connected to this driver
  • each node would have a "jobID" property in its configuration
  • when you submit a job, you associate it with an execution policy, such as:
Code: [Select]
<ExecutionPolicy>
  <Equal>
    <Property>jobID</Property>
    <Value>myJobID</Value>
  </Equal>
</ExecutionPolicy>

This way you ensure that the job is executed only on the nodes with a matching jobID.
  • now the issue is how to tell each node to switch to another jobID. The first thing is to modify the jobID in the node's configuration. This can be done by sending it a task that will do a JPPFConfiguration.getProperties().setProperty("jobID", "myNewJobID"). The second problem to solve is how to ensure that this task is sent to the right node?

For this you will need a unique identifier for each node, that you can use in an execution policy. Let's say that we use the node's IP address as an identifier. We could write an execution policy such as:
Code: [Select]
<ExecutionPolicy>
  <Contains ignoreCase="true">
    <Property>ipv4.addresses</Property>
    <Value>my.node.ip.address</Value>
  </Contains>
</ExecutionPolicy>

Then, what you can do is, for each of the nodes involved, send a job that contains only one task that modifies the jobID in the node's configuration, associated with this execution policy.
[/list]I understand this is a little on the heavy side, but I believe it will do the job.

I hope this helps,
-Laurent
Logged

benlawry

  • Guest
JPPF Node Disconnect from one driver, connect to another?
« Reply #2 on: February 09, 2009, 08:42:55 PM »

Laurent,

Thanks so much for your quick response, I sure appreciate it!

Ben
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads