D
D
Dmitry Tsirulnikov2015-08-03 13:21:48
MongoDB
Dmitry Tsirulnikov, 2015-08-03 13:21:48

How to properly organize getting data from mongo?

Good afternoon, there is a task when updating data in the database to send them via websocket to the client.
The difficulty lies in the fact that the data is filled with a separate script.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JRazor, 2015-08-03
@JRazor

You don't have many options:
1) Send sockets at the end of your script execution;
2) Save information, for example, with the value {"use": False}, check for updates by the server side and then send it to the client side.

L
lega, 2015-08-03
@lega

Make an asynchronous worker on asyncio / tornado / gevent, run zmq there to receive messages from the script and websocket to communicate with the client, you can also send messages to the client from the web application. There will be something like:
Script --(zmq)--> async_server --(ws)--> Client

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question