<div dir="ltr">Hi Ashlesh<div><br></div><div>I don't known PyNDN so I cannot answer the specific question.</div><div>The answer below is applicable to library design in general.</div><div><br></div><div>A client library can choose what to do when the forwarder has crashed.</div>

<div>In most cases, the library would crash or raise an error if the connection to the server is lost. This is common among popular client libraries such as libmysql.</div><div>ndn-cxx chooses to have this behavior, because ndn-cxx developers believe that an application is useless when the forwarder is down.<br>

</div><div>This means, when NFD is closing, all ndn-cxx applications connected to NFD will crash as well.</div><div>An external monitoring script can detect this, and restart NFD, followed by applications.</div><div>This behavior is acceptable on servers for those applications that don't have much internal states.</div>

<div><br></div><div>However, it's undesirable to let a user-facing application crash when NFD is closing.</div><div>The application can catch the error raised by the library, and periodically attempt to connect the Face until a new connection is established, and then register the prefixes.<br>

</div><div>Alternatively, the library can choose to detect the problem, and attempt to recover. If a library chooses to do this, it should still inform the application through the event or callback system when forwarder becomes unavailable and available again.</div>

<div>In both cases, the application may need to recover network-visible states after forwarder recovery (eg. ChronoSync entity may need to rejoin the sync-group).</div><div><br></div><div><div class="gmail_extra">Yours, Junxiao<br>

<br><div class="gmail_quote">On Tue, Sep 2, 2014 at 5:08 PM, Ashlesh Gawande (agawande) <span dir="ltr"><<a href="mailto:agawande@memphis.edu" target="_blank">agawande@memphis.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi<br>
<br>
I was working with PyNDN2 library which uses NFD.<br>
<br>
In PyNDN2 Is there a way to check if NFD has gone down (or should there be a way to that in the library) ?<br>
If so how can it be done?<br>
<br>
(I have added the conversation I had with Jeff T)<br>
<br>
Thanks<br>
Ashlesh<br>
<br></blockquote></div></div></div></div>