Real time data on third party apps

I have a customer who has an IoT system running on Influxdb and I’m not an expert on the influx and its features, that’s why I need some consultant.

In order to explain the situation briefly, I’m a web developer creating a cloud portal for an IoT project where you can trigger values, monitor the data and etc.
The problem is that our customer is looking for real-time data on the portal, and our first approach was querying influx in a period of time repeatedly, for example, every 10 seconds and check if we had a new data in the past 10seconds, if there was a new data then we inform our front side to automatically update the value. but as it’s obvious this approach is not optimized at all.

So what I’m seeking right now is a way to inform our portal by influx itself whenever a new value is inserted in the tables (by the way, not all the tables just some specific ones that I need), for example, an API on our side which receives the data containing the table name and the updated row data.
I’ve seen some features in influx itself, some other on telegraph and also kapacitor and it was confusing a bit.
Either way, what I really want to avoid, is querying, and checking influx every x seconds. so if you could help me with that I would really appreciate it.

P.s: influx version is 1.1.1

Best regards

@Ali_Derakhshanian - Welcome to the community! For a portal that is designed for human consumption, I would use queries on demand. Generally, on demand queries are a better use of resources than querying when no one is available to view the results. If your use case needs to respond to data shape, I would recommend looking at Kapacitor and Chronograf alerts. These can automatically cause actions based on changes in your data. You could use Kapacitor to signal that your portal should refresh the results.

Let us know what you decide on! It would be helpful to the community.


1 Like