[zeromq-dev] how to integrate zmq to normal epoll web server

Brian Granger ellisonbg at gmail.com
Wed Nov 17 05:18:11 CET 2010

I know you may be tied to C++, but the Python bindings have a nice event
loop that is integrates with the Tornado web server.



On Tue, Nov 16, 2010 at 8:04 PM, technical issue <techweb2k at gmail.com>wrote:

> Hello all,
> I am a newbie of ZMQ.
> I want to write a web server in C++ that use ZMQ to transfer the job to
> worker and receive the respone from the worker.
> The web server using epoll runs in a process separated from the worker
> process.
> In the web server process we have 1 main thread and two child threads.
> when initializing, the main thread creates two child threads: one for
> transferring the jobs to the PUSH queue (called C1), one for receive the
> response from the SUB queue (like Mongrel2),called C2.
> the main thread uses epoll to accept the connection from the client, parses
> HTTP header and then pushes the job to a queue then the C1 gets job from
> internal queue and push to ZMQ PUSH queue.
> My question is:
> - Is this architect OK?
> - Sholud I use 1 or 2 ZMQ I/O thread for C1 and C2 ?
> - Because ZMQ does not support HTTP, is there any way to integrate HTTP
> socket accepted from epoll into ZMQ polling ?
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101116/a4e3b15c/attachment.htm>

More information about the zeromq-dev mailing list