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,

  1. clients established connection server via full-duplex websocket.
  2. all clients should act rabbitmq's consumer after initial websocket handshake, updates when client gets message.
  3. 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.

http://haridas.in.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -