Version 18

    Client side HA design

     

    Main Concept

     

    The point of client HA is to copy the recreate the current message objects on the server.

    For each Connection,Session, Browser or Consumer, we will recreate every object on the new connection.

     

    This will happen in some Remoting client event marking the connection as failled and calling ClientConnectionDelegate.faileOver(ClientConnectionDelegate newConnection) method.

     

    The method will navigate on the hierarchy shown at the diagrams specified on this page.

     

    For a connection we will:

     

    1. - Create a new connection with every single property. (Considering start, clientId...etc)

    2. - Replace the ID for the new connection ID

    3. - Replace the ID generator

    4. - Replace the RemotingConnection object under Connection

     

    For session:

    1. - Create a new session

    2. - Replace the ID

     

    For a MessageProducer

    1. - Create a new MessageProducer delegate (using the same properties existent prior to the fail even... including transactionState... etc)

    2. - Replace the IDs

     

    For a MessageConsumer

    1. - Create a new MessageConsumer delegate (using the same properties as before)

      1. For durable subscriptions this should trigger redeliveries of messages sent on the old node. We should ignore messages already sent

    2. - Take care of ACK. (We have to decide if we really need to send them to the server side, or always clean the list)

    3. - Replace the IDs

    4. - Unregister the CallbackManager using the old ID

    5. - Register back the CallbackManager using the new generated ID.

     

     

     

    For Browsers:

     

    • This will be probably very similar to Consumers, however this stil TBD after we have finished MessageConsumers

    Relationship on connections

    -


     

    The following figure shows the current relationships between Connection Objects on the client.

     

    JBossConnection is responsible of creating Sessions.

    Session is responsible of creating Consumers and Producers.

     

    JBossConnectionHA will be responsible for capturing creation events, storing then in a list and recreate its delegates when a Connection (RemotingConnection) is failed.

     

     

     

    State Hierarchy

    -


     

    We will use the Hierarchy described on the following diagram to discover connected objects.

     

     

     

     

    Referenced by: