D
D
Dmitry Kunin2013-12-16 22:22:32
JavaScript
Dmitry Kunin, 2013-12-16 22:22:32

How to display charts in real time using Node.js and Socket.io?

Greetings!
The situation is that data is transmitted to the Node.js server in binary form - an array of numbers and dates (to be precise, seismic data, that is, there are paired arrays in the array - point / date). It comes with a little processing, after which a large piece of data is sent to the client via socket.io. The amount of data is about 9 arrays, 4000 points each. On the client, data is distributed across flot charts ( people.iola.dk/olau/flot/examples/). The client has a counter that updates the charts every 3 seconds.
Problem- the performance of this design is rather low, the maximum is how often you can update the charts - as indicated 3 seconds - otherwise the ui hangs on deaf. If you try to transfer not the entire array, but only a piece of it, sagging may occur when gluing the array at the front. At the same time, after 10 minutes of work, the graphics begin to lag far behind the received data in time - and if the data stream is cut off, then the data continues to flow, as if they were stuck in a queue and just broke through.
I would be glad for any advice on how to more optimally configure the data transfer, it is possible to change the chart library to a more optimal one (unfortunately, the transfer of the finished generated image is not suitable - since a tooltip is generated on the charts at the front).
Thank you in advance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question