Archived

This forum has been archived. Please start a new discussion on GitHub.

Seeking solution for master/slave redundancy mode of applications

My task is to setup a prototype of a distributed system, the architecture of this system is described as following:

There are N nodes, every node has two PC(PC1,PC2) and two applications run on them for redundancy. One application runs as Master mode on PC1, the other on run as Slaver mode on PC2. these two applications provide the same function and Master APP will exchange data with Slave APP to keep states synchronized. all invocations comes from clients will go to The Master mode first, if the Master mode application fail, then the invocation will transfer to Slaver mode application on another PC transparently.

After look into the documents of ICE, I found that it seems the replication of adapter may fill my requirement, but In the document of adapter replication, it describes that when a invocation to a replica adapter, it will randomly chose a adapter in this replica, if it fails then will try the other adapter. it is not what I want.

Is anyone knows how to acheive this architecture by using ICE's facilities?

Thanks in advance and best regards,

Dorian

Comments

  • For the more requirement :

    1. Applications on Master PC(PC1) and Slaver PC(PC2) can change running mode, if PC1 down, application on PC2 become Master Mode, or mannully assign the running mode to application.

    2. All the Invocations go to Master Mode application.

    In another word, an invocation can be delivery to the correct application according to the running mode.
  • benoit
    benoit Rennes, France
    Hi,

    If you plan to use IceGrid replica groups, you can configure the replica group load balancing strategy to "Ordered" if you want the replicas to be contacted in order (first the master and then the slave).

    With Ice 3.6, it's also possible to implement your own replica group load balancing strategy by implementing a replica group filter (as a C++ plugin installed with the IceGrid registry).

    See https://doc.zeroc.com/display/Ice36/Load+Balancing for more information on this.

    Cheers,
    Benoit.
  • benoit wrote: »
    Hi,

    If you plan to use IceGrid replica groups, you can configure the replica group load balancing strategy to "Ordered" if you want the replicas to be contacted in order (first the master and then the slave).

    With Ice 3.6, it's also possible to implement your own replica group load balancing strategy by implementing a replica group filter (as a C++ plugin installed with the IceGrid registry).

    See https://doc.zeroc.com/display/Ice36/Load+Balancing for more information on this.

    Cheers,
    Benoit.

    Hi Benoit,
    Thanks a lot for your reply, I have looked in to the example of replica group filter , I found that the filter is based on the "Currencies", which is a Adapter Property configured in the xml file, but my requirement is that the filter is based on the "Running Mode", which could be dynamically changed at run time, so how could I filter the adapter at run time according to the dynamic "Running mode"

    thanks,
    Dorian
  • benoit
    benoit Rennes, France
    Hi,

    Where will this running mode be stored? The implementation of the filter will need to retrieve the running mode if you want the load balancing to be based on it. If this running mode is stored on the servers themselves, your replica group filter implementation could call on the servers to retrieve the mode.

    Cheers,
    Benoit.
  • benoit wrote: »
    Hi,

    Where will this running mode be stored? The implementation of the filter will need to retrieve the running mode if you want the load balancing to be based on it. If this running mode is stored on the servers themselves, your replica group filter implementation could call on the servers to retrieve the mode.

    Cheers,
    Benoit.

    Yes, the running mode is hold by the applications on both server. I wonder if there is a way to update the "Running mode" state changes to the replica group, so that when a invocation comes to the replica, I can directly use the "Running mode" info to filter the correct adapter and no need to call the servers to get the running mode information in the replica group filter.

    Thanks a lot,
    Dorian.
  • benoit
    benoit Rennes, France
    Hi,

    You need to make this information available to the replica group filter implementation, this is something you need to implement. Either the servers communicate it to the replica group filter through an observer mechanism (the replica group filter implementation subscribes to the servers to receive the "running mode updates") or the replica group filter pulls the information from the servers each time it needs it or on a regular basis.

    Cheers,
    Benoit.