Dear list,<div><br></div><div>I have a 2-layer architecture where:</div><div><ul><li>the first layer is handling the socket connections to the outside world clients</li><li>the second layer is performing computations related to the connected clients (i.e. the core application)</li>
</ul><div>It is built in this way so that we can make the socket handlers very stupid. Therefore, crashes on the first layer are less likely to occur, and in case of crashes of the second layer (the core application) we don't have all the clients trying to reconnect at the same time: they'll still be connected (even though receiving a 'service unavailable' message of some kind).</div>
</div><div><br></div><div>For every single process handling a socket connection on the first layer I therefore need to have a 'twin' process on the second layer, strictly connected to its socket manager counterpart.</div>
<div><br></div><div>I'm fishing for best practices here:</div><div><ul><li>how can I assure that if the second layer goes down (VM crash, server hit by an angry sysadmin), the first layer socket processes know that their twin process is down (and the other way around)?</li>
<li>what is the best way to handle the creation of the twin processes?</li></ul><div>Any input welcome. ^^_</div></div><div><br></div><div>r.</div>