ZMQ - ZeroMQ as a http server
If you don't know ZMQ, you really should.
take a look:
http://zguide.zeromq.org/page:all
And yes, it is all that!
You can use any language to use it.
But for me let's stay fast and use C.
You know, just download, build and install like any autotools compliant tool.
For message queue there are a plenty of samples in manual. Then I will not talk about it. But in our web world, we need something to listen HTTP then it allow us to elaborate something like a sync/assync gateway that convert synchronous http request in assynchronous distributed by MQ tasks.
This seems to be complex, but not in ZMQ.
I very busy these days, so just a bit of code for now:
// Minimal HTTP server in 0MQ #include "zhelpers.h" int main (void) { int rc; // Set-up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); // Start our server listening void *server = zmq_socket (ctx, ZMQ_STREAM); zmq_bind (server, "tcp://*:8080&…
And yes, it is all that!
You can use any language to use it.
But for me let's stay fast and use C.
You know, just download, build and install like any autotools compliant tool.
For message queue there are a plenty of samples in manual. Then I will not talk about it. But in our web world, we need something to listen HTTP then it allow us to elaborate something like a sync/assync gateway that convert synchronous http request in assynchronous distributed by MQ tasks.
This seems to be complex, but not in ZMQ.
I very busy these days, so just a bit of code for now:
// Minimal HTTP server in 0MQ #include "zhelpers.h" int main (void) { int rc; // Set-up our context and sockets void *ctx = zmq_ctx_new (); assert (ctx); // Start our server listening void *server = zmq_socket (ctx, ZMQ_STREAM); zmq_bind (server, "tcp://*:8080&…