RabbitMQ with Websocket and Gevent -
i'm looking forward develop realtime api web application using websocket. i'm using rabbitmq broker , backend based on python (gevent + websocket),and pika/puka rabbitmq client.
the problem i'm facing here that, how can use websocket connect rabbitmq. after initial websocket connection establishment, socket object wait new messages client, , in case of rabbitmq, need setup consumer it, process message when receive one. can take in way,
- clients established connection server via full-duplex websocket.
- all clients should act rabbitmq's consumer after initial websocket handshake, updates when client gets message.
- when new message arrives @ websocket, client send rabbitmq, @ time client act publisher.
the problem websocket wait new message, , rabbitmq consumer wait new message on channel, i'm failed link these 2 cases.
i'm not sure whether wrong method ...
i'm unable find method implement scenario.if i'm going wrong way or there alternate method ?, please me fix this.
thank you,
haridas n.
i implemented similar requirement tornado + websocket + rabbitmq + pika.
i think known method. here git repo web chat application.
https://github.com/haridas/rabbitchat
it seems difficult similar thing gevent/twisted because rabbitmq clients couldn't supporting event loops of gevent/twisted.
the pika has tornado adapter, makes easy setup. pika development team working on twisted adapter also. hope release soon.
thanks,
haridas n.
Comments
Post a Comment