Creating a real-time chat with Python and websocket -
i'm writing python real-time chat feature embedded in web app. i'm little bit confused on real time implementation. need push real time message different users.
i plan use websocket i'm not quite sure how save sockets array once user send message server, server can find related socket , push message.
so idea this? or what's common way implement real time chat feature?
thanks in advance.
you need use websocket aware web server, tornado handle websocket traffic. multiplex chat messages between different chats , users, there solutions redis , zeromq can use message multiplexing.
however, sounds have 0 experience , starting point, starting working example better approach. please study existing real-time chat implementations python:
https://github.com/heroku-examples/python-websockets-chat
https://github.com/nellessen/tornado-redis-chat
https://github.com/tornadoweb/tornado/blob/master/demos/websocket/chatdemo.py
Comments
Post a Comment