官术网_书友最值得收藏!

Session replication demo

Once the application is deployed, perform the following steps:

  1. Open the application link from node13 http://localhost:8380/beosbank-web/.
  2. Fill the money transfer details and click on Next to select the payment options:
    • Sender Country: France
    • Receiver Country: Cameroon
    • Amount to send: 100
    • Sender: Noe Nono
    • Receiver: Michele Bertille
  1. Click on the Next button to reach the Payment Infos tab:

  • Fill the credit card number field with the value: 000-1111-2222 3333
  • Click on the Next button.
  • Try to open the application URL from the second node of the group (host2:node23) in another tab of your browser--http://localhost:8780/beosbank-web/:

You will automatically arrive on the first tab with data entered from the node13 session:

  • Sender Country: France
  • Receiver Country: Cameroon
  • Amount to send: 100
  • Sender: Noe Nono
  • Receiver: Michele Bertille

The session you started on node13 session has been replicated on node23; if you shut down one node, the caller can still find this data from the other node:

[domain@127.0.0.1:9999 /] /host=host1/server=node13:stop
{"outcome" => "success",
"result" => "STOPPING"
}

http://localhost:8380/beosbank-web/ => KO

http://localhost:8780/beosbank-web/ => OK

With this configuration, in order avoid request failures, the caller has to implement a failover process to automatically switch to a running node when the current node goes down. This approach makes the client code become strongly coupled to the server instance URLs.

主站蜘蛛池模板: 吴桥县| 固镇县| 阳东县| 安平县| 屏东县| 明光市| 松原市| 南昌县| 迭部县| 工布江达县| 收藏| 竹山县| 乳山市| 西畴县| 双江| 合水县| 安阳县| 平果县| 紫阳县| 宝应县| 左云县| 山东| 抚松县| 武功县| 湖州市| 瓮安县| 仁寿县| 全椒县| 永善县| 涪陵区| 正镶白旗| 中山市| 祁阳县| 彰武县| 淄博市| 安化县| 安多县| 台安县| 贡嘎县| 英吉沙县| 龙泉市|