[zeromq-dev] some question about the eventloop in py-zmq
Sijia Xu
xsj.guagua at gmail.com
Mon Oct 31 09:03:07 CET 2011
Hi all:
I used to use Tornado to build TCP-server, it does a good job. recently i
consider using zeromq to implement a tcp-sever cluster, so I read the guild
book and the py-zmq source code, since i am really a newbie in zeromq, i
got some questions about py-zmq:
1. I notice the ioloop in py-zmp-eventloop is similar to tornado's ioloop.
the main difference is the poll function in py-zmp-eventloop support the
zmq socket and zmq-eventloop also use the zmqstream encapsulate the zmq
socket. but i notice the function in zmqstream(etc,on_receive,on_send)
do not manage a inner rece/send buffer which can be found in tornado's
iostream. basing on my understanding about zerpmq , I think it maybe manged
by zmq-socket itself. but in zmq-ioloop , the start function just pick the
ready fd-handle pairs return by Poller.poll() and start the flowering loop
to call each fd handle once.
since a single zmq-socket usually represent many native fd in OS,
if several event occur on one zmq-socket, each loop in start function only
can deal with one of that, it would seems less efficient.
2. it seems the core codes in py-zmq have being compiling as the DLL, is
there some way to see this source code?
best regard
sjXu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111031/7406446a/attachment.htm>
More information about the zeromq-dev
mailing list