Hi Stuart,

On Mon, Oct 13, 2014 at 9:48 AM, Levy, Stuart A <salevy@illinois.edu> wrote:
Hello yt developers!

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").


This sounds really cool!  I'm looking forward to hearing more about this.
 
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.


So the question(s) are,
    does yt itself already use zeromq?   (if so, then it sounds as though new communications stuff should use it too)

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.
 
   If yt doesn't, then any advice on choosing which path to take?  

   If we roll our own with a poll-for-message in yt's main loop somewhere,

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.

Others will likely have more detailed feedback here, but I thought I'd jump in and answer what I know off-hand.
 
       then where in the yt source tree is that main loop's code?
   

_______________________________________________
yt-dev mailing list
yt-dev@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org