<div dir="ltr">Hi Stuart,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 13, 2014 at 9:48 AM, Levy, Stuart A <span dir="ltr"><<a href="mailto:salevy@illinois.edu" target="_blank">salevy@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div>Hello yt developers!<br>
<br>
In thinking about adding communications plumbing to yt, so that it could listen & respond to requests made over the network somehow (e.g. "using currently loaded dataset, render an image from the following viewpoint").<br>
<br></div></div></blockquote><div><br></div><div>This sounds really cool!  I'm looking forward to hearing more about this.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
We could roll our own using low-level socket stuff, and a select() or something in the main loop - that wouldn't be too bad.  But I see that the zeromq messaging library is already among the dependencies of yt.   At least, ipython depends on zeromq.<br> <br></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<br>
So the question(s) are,<br>
    does yt itself already use zeromq?   (if so, then it sounds as though new communications stuff should use it too)<br></div></div></blockquote><div><br></div><div>yt does use zeromq in a few places, but only to talk to IPython. We only list zeromq as an indirect dependency to support the IPython notebook.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
   If yt doesn't, then any advice on choosing which path to take?   <br>
<br>
   If we roll our own with a poll-for-message in yt's main loop somewhere,<br></div></div></blockquote><br></div><div class="gmail_quote">Right now yt doesn't have any sort of event loop.  You would need to create your own main loop, I think.  You might be interested in looking at the yt-enzo bridge, which embeds yt in the Enzo simulation code's event loop.<br></div><div class="gmail_quote"><div><br></div><div>Others will likely have more detailed feedback here, but I thought I'd jump in and answer what I know off-hand.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
       then where in the yt source tree is that main loop's code?<br>
    <br>
</div>
</div>

<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div></div>