I
I
Ilyas2018-09-03 15:06:23
Python
Ilyas, 2018-09-03 15:06:23

What is better to use for websocket server in Python?

Hello, what would you recommend to use to organize a websocket server in python? From the requirements, so that the solution can receive messages in a separate thread and send data to the client from other threads.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2018-09-03
@sergey-gornostaev

I can advise not to use streams. Use asynchronous aiohttp .

V
vikholodov, 2018-09-03
@vikholodov

asyncio and websockets, here you can peep https://github.com/Bearle/django-private-chat
I did a chat and a notification system, the flight is normal, celery may also be needed.

J
JRazor, 2018-09-04
@JRazor

Did Tornado + SockJS - normal flight. Ordinary sockets did not suit me for some reason, and Tornado perfectly suited as an asynchronous server.
As an example: https://github.com/mrjoes/sockjs-tornado/blob/mast...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question