[IPython-dev] XREQ/XREP socets

Sean Ross-Ross srossross@gmail....
Wed Aug 31 10:41:31 CDT 2011


Thanks for the response Brian, I asked about avoiding the ZeroMQ layer because:

1) From the documentation It looks like the sending of JSON data across sockets is supposed to be technology independent. I this a correct assumption,  or is ZMQ a hard dependency?
2) The javascript server already implements an asynchronous sockets layer, it seems like an unnecessary step to install the zmq/javascript bindings.


On Aug 29, 2011, at 5:27 PM, Brian Granger wrote:

> IPython uses PyZMQ/ZeroMQ for its sockets, so you will need to
> download them here:
> 
> https://github.com/zeromq/pyzmq
> http://www.zeromq.org/intro:get-the-software
> 
> Cheers,
> 
> Brian
> 
> On Mon, Aug 29, 2011 at 11:18 AM, Sean Ross-Ross <srossross@gmail.com> wrote:
>> Hello, I've been playing around with the new socketed API and I have a few
>> questions.
>> My end goal is to create a simple javascript server. But for now I'm trying
>> to see if I understand how the sockets work.
>> In my testing I start an ipython kernel:
>> 
>> $ ipython qtconsole
>> [IPKernelApp] To connect another client to this kernel, use:
>> [IPKernelApp] --existing --shell=49785 --iopub=49786 --stdin=49787
>> --hb=49788
>> 
>> Then, in another terminal I try to send a command manually to the shell
>> socket (using python):
>> 
>> import socket
>> import json
>> shell_sock = socket.create_connection(('localhost',49785))
>> header = { 'msg_id' : 'uuid-123', 'username': 'sean', 'session': '??',
>> 'msg_type': 'connect_request', }
>> msg = dict(parent_header=parent_header, header=header, content=content)
>> msg_str = json.dumps(msg)
>> shell_sock.send(msg_str)
>> shell_sock.recv(1024**2)
>> 
>> This does not work, and I do not get any response. Why? I would use zmq but
>> the server is implemented in javascript.  I also can not use ajax or jquery
>> from the client-side html notebook app because this is on the server side.
>> Thanks in advance.
>> ~Sean
>> 
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>> 
>> 
> 
> 
> 
> -- 
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> bgranger@calpoly.edu and ellisonbg@gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20110831/d425685c/attachment.html 


More information about the IPython-dev mailing list