I
I
Igor Statkevich2018-12-25 14:37:55
Python
Igor Statkevich, 2018-12-25 14:37:55

What to use as front + back?

Good afternoon. Point the right way, there are temperature/humidity sensors in the facility. I wrote a program for collecting data using the modbus protocol; I collect data and write to the mysql database. It is necessary to draw a web face for this, a kind of plant plan with real-time information display + a page with a graph for the elapsed time. There is an assumption that use flask for the front + charts.js for charts + synchronously or asynchronously pull data via modbus, or run a separate daemon process that pulls information and adds it to the database, and the server on flask runs in mysql and from there pulls the latest data for real time + time periods for plotting. Maybe there is some other alternative, advise what to choose for the implementation of this project.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-12-25
@NeiroNx

If you need to build graphs, then some process must poll the sensors after a given interval - this is a no-brainer. And there is no need to synchronize this process with the web. You may not visit the web for a week, but when they do, what to do, there is no data. Vobschem cutlets separately, flies separately. If instantaneous values ​​are needed, then request them from the web with a separate request - ajax. There is no need for page loading to slow down. To display a plant map, I would take OpenLayers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question