[zeromq-dev] how to integrate zmq to normal epoll web server
techweb2k at gmail.com
Wed Nov 17 05:04:10 CET 2010
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
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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev