[General] Active/Passive Components

rnaudin roland.naudin at ebmwebsourcing.com
Wed Mar 16 10:20:38 CET 2011


If you want to handle a server crash, my idea is to create an agent ( a script) that ping the PEtALS nodes.
This agent have an algorithm that elect a pinged node as the host of your component, then trigger the installation with proper ant tasks.
When the ping failed, the agent reelect a new node to install the component.

The PEtALS domain is configured with a distributed JNDI.
The first time the BC component is started, it creates an identifier set it in the JNDI and persist it in its installation directory.

If the container that has crashed is restarted, the BC component is recovered, the BC component checks if its identifier is the JNDI context. If this identifier is not its own but another one, it means that another component has been started in another container, so it doesn't start the connection.

The agent still ping the nodes and elect the restarted node as a "pinged node". It knows that a BC component has been previously installed on it but is not active; it uninstalls it with the proper ant tasks.

 [Exclamation] The problem on that if is that if there is network problem between the agent and the remote PEtALS nodes, the agent can assume a crash on a PEtALS node although the node is still running.

 [Idea] Maybe this mechanism can inspire you.




-------------------- m2f --------------------

Unsuscribe/Suscribe Petals forum notification
Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=1570#1570

-------------------- m2f --------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/general/attachments/20110316/cd313966/attachment.htm>


More information about the General mailing list