This is great.<div><br></div><div>There are a few additional functionalities I need on top of this, that I have added to the message spec I use in my parallel code.</div><div><br></div><div>I have multiple clients,and need unique message ids, so clearly ints are inadequate.  I switched msg_id to also be a uuid. I could certainly generate unique msg ids in the controller by combining the msg id and the session id, which should be unique.</div>

<div><br></div><div>Since I need to inspect messages on the way, and don't want to have to unpack the content of the message, I can't send the whole message as one json object. For this, I split it, such that the headers and content are sent separately. msg_type is added to the header for this.</div>

<div><br></div><div>I need to be able to send data without copying, and for that I added a 'buffers' element at the top level of a message.  I also added an apply_message type, for using Brian's apply model. I will write up how the apply stuff works later (I expect there will be some discussion and rearrangement of some of it).</div>

<div><br></div><div>I also added, but no longer use, a subheader, which allows senders of messages to extend the header.  I needed this when the Controller parses a message destined for an engine, it shouldn't unpack the content of the message, only the header. Since the routing is now handled purely in zmq, I don't currently have a need for the subheader, but I can certainly imagine it being useful.  This is not so much a part of the root message format as it is a part of the session.send() api.</div>

<div><br></div><div><br><div class="gmail_quote">On Tue, Aug 10, 2010 at 01:02, Fernando Perez <span dir="ltr"><<a href="http://fperez.net">fperez.net</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi folks,<br>
<br>
here:<br>
<br>
<a href="http://github.com/ipython/ipython/blob/106bc2e0587d315db67988c1803b8574fc54463a/docs/source/development/messaging.txt" target="_blank">http://github.com/ipython/ipython/blob/106bc2e0587d315db67988c1803b8574fc54463a/docs/source/development/messaging.txt</a><br>


<br>
is a more fleshed out message spec document for feedback.  I'd<br>
especially like to hear from Omar and Gerardo if you notice any<br>
important point missing, since you've been thinking a fair bit about<br>
this.<br>
<br>
For the stdin socket I changed a little bit things from how Omar implemented it:<br>
<br>
<a href="http://github.com/omazapa/ipython/blob/master/IPython/zmq/kernel.py#L496" target="_blank">http://github.com/omazapa/ipython/blob/master/IPython/zmq/kernel.py#L496</a><br>
<br>
so that we have full message headers in here as well, but it's the same idea.<br>
<br>
This document is still in evolution, but we think we're starting to<br>
have a decent specification of the protocol, so now any and all<br>
comments are valid.  If we've missed anything important, forgotten<br>
something or misdesigned anything at this level, speak up :)<br>
<div class="im"><br>
Cheers,<br>
<br>
f<br>
_______________________________________________<br>
IPython-dev mailing list<br>
</div><a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div><br></div>