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 
November 18, 2019, 07:16:33 AM *
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: deployment question on multi server in different network section  (Read 3838 times)

jerome_tan

  • Guest

We are investigating in JPPF framework to build a grid computing, we met a question in deploying multi server in different network section, the server strucuture is:
One client on 192.168.102.145
Two servers: server A --> 192.168.102.145; server B --> 192.168.100.250
Two nodes: node A --> 192.168.102.145; node B --> 192.168.100.250

We connect two servers use driver config:
jppf.peers = server_1 server_2
 
# connection to server_1
jppf.peer.server_1.server.host = 192.168.102.145
class.peer.server_1.server.port = 11111
node.peer.server_1.server.port = 11113
 
# connection to server_2
jppf.peer.server_2.server.host = 192.168.100.250
class.peer.server_2.server.port = 11111
node.peer.server_2.server.port = 11113

and turned "jppf.peer.discovery.enabled = false"

When the two server are live, the system runs properly, but when server B shut down, node B can not find server A automatically.

How can I let node B find server A automatically when server B is down?

Thanks,
Jerome.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
Re: deployment question on multi server in different network section
« Reply #1 on: June 15, 2011, 10:26:48 AM »

Hello Jerome,

Unfortunately, what you want to achieve cannot be done with just a static configuration.
However, there is an approach that will allow you to do it by dynamically modifying the JPPF node configuration when it is disconnected from a driver.
The idea is to implement a node lfe cycle listener which, when receiving a node disconnection event, will change the server connection properties so that the node will connect to another server.
Basically, the goal is to setup a different server connection configuration between the time the node is disconnected and the time when it attempts to recdonnect.
I have implemented a working sample, which you can download here: http://www.jppf.org/private/NodeConnectionListener.zip
The file contains a Readme.txt with instructions on how to use it.

Can you give it a try and let us know if this resolves the problem?

Thanks,
-Laurent
Logged

jerome_tan

  • Guest
Re: deployment question on multi server in different network section
« Reply #2 on: June 16, 2011, 09:25:16 AM »

Hi lolo,

Thank you very much! It works! :) But there is a little problem, the node should implement a listener/interface to be aware of that a new server joined the server pool. Since JPPF2.5 involve HazelCast in, it is a pretty good distributed memory system in terms of performance and stability without master node, and considering in most production env, it is required that servers and nodes are dynamic pool, are we able to implement the dynamic add/remove server/node by HazelCast?
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site
Re: deployment question on multi server in different network section
« Reply #3 on: June 20, 2011, 09:03:37 AM »

Hi Jerome,

Thank you for the suggestion. I reworked the sample to make it use Hazelcast for dynamic server discovery, instead of using a static configuration. This should work with any number of JPPF server and nodes.
Basically, I added a server startup class that causes each server to store its connection information in a Hazelcast distributed map, and the nodes now listen to this map to find the servers.
I uploaded the new version at http://www.jppf.org/private/NodeConnectionListener.zip.

Let us know if this works for you.

Sincerely,
-Laurent
Logged

jerome_tan

  • Guest
Re: deployment question on multi server in different network section
« Reply #4 on: June 24, 2011, 10:00:31 AM »

It's great, thank you a lot!
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