Answer the question
In order to leave comments, you need to log in
What technology to choose for asynchronous data transfer?
There is a task - to receive the data from the server asynchronously.
The idea is this - a person logs into the system and starts receiving some charts (trends or current indicators from a certain sensor or several). Data from devices is written to the database (PostgreSQL). The interface where the user logs in to the system, configures the binding of sensors to his account and other settings are written in Django (well, as they are written, this is a work in progress).
According to my plan, a person logs in and sees an interface in front of him - a separate frame for permanent data output + all sorts of buttons for settings.
So the question is - what to read, what technology to choose for permanent display?
I must say right away that there are hundreds of sensors, dozens of people, relationships - many to many, from one sensor ten signals per second.
I would be glad for any advice (before this project, I only had C++ experience)
Answer the question
In order to leave comments, you need to log in
I will support about tornadoes, but I recommend even more to look at cyclone.io
This is a tornado rewritten under twisted, which is the best fit for you (I'm talking about https://twistedmatrix.com/ ). This is how the system works for me, all processing is done in twisted, and I give it through cyclone via ajax (alas, I don’t have web sockets on clients :-( )
And the technology is called comet. It is implemented in different versions that have pros and cons. The point is that the browser in one way or another (comet, websocket, ajax, ajaxp, longframe, longpooling, etc.) connects to the server and waits for an event from the server to arrive.The event itself can contain a bunch of data that has been updated.
I would recommend doing it like this. Install a queue server like rabbitmq, and connect to the queue via ajax/ajaxp and/or websockets via tornado/cyclone.
Well, if you just need to listen to message queues (without tricky processing on the web server), then you can just get by with rabbitmq-stomp.
Basically, there are several examples in cyclone:
- https://github.com/fiorix/cyclone/tree/master/demo... - redis based queues
- https://github.com/fiorix/cyclone/tree/ master/demo... - websocket proper
- https://github.com/fiorix/cyclone/tree/master/demo... = pure ajax
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question