<div dir="ltr">So, one (webserver) process sends code to the node.js process to evaluate. But there are multiple instances of the webserver, and a pool of node.js processes, so every time the pairing is different.<div><br></div><div>I believe we weren't seeing read return at all, otherwise I think that might have worked.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 13, 2015 at 5:04 AM, Pavel Emelyanov <span dir="ltr"><<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05/12/2015 09:59 PM, Ross Boucher wrote:<br>
</span><span class="">> In order to get support working in my application, I've resorted to a hack that works but<br>
> is almost certainly not the best way to do things. I'm interested if anyone has suggestions<br>
> for a better way. First, let me explain how it works.<br>
><br>
> The process I'm checkpointing is a node.js process that opens a socket, and waits for a connection<br>
> on that socket. Once established, the connecting process sends code for the node.js process to<br>
> evaluate, in a loop. The node process is checkpointed between every message containing new code<br>
> to evaluate.<br>
><br>
> Now, when we restore, it is always a completely new process sending code to the node.js process,<br>
<br>
</span>Wait a second, I understood from the previous paragraph that the node.js is the process you<br>
checkpoint and restore, isn't it? So why the code-sending process is "new" here?<br>
<span class=""><br>
> so the built in tcp socket restoration won't work. We had lots of difficulty figuring out how to<br>
> detect that the socket connection had been broken.<br>
<br>
</span>Is read() from socket returning 0 not enough? Or poll()-ing the socket for read and once it's<br>
read-ready when it shouldn't it's closed.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
-- Pavel<br>
<br>
</font></span></blockquote></div><br></div>