How to route data to influxDB from Sensors #18
Replies: 2 comments
-
It depends if we want to keep InfluxDB in the picture or not. I started working on a Golioth -> Pubsub -> BigQuery approach, based on the data model document. But that implies not going to InfluxDB at all, and not having a solution where we have v3 and v4 sensors data in the same place. |
Beta Was this translation helpful? Give feedback.
-
I updated the diagram here for how I solved this here: I decided that the best way to solve this would be to use a serverless function like Google Cloud Functions to route the data from Golioth using Webhooks and then push it to InfluxDB. The serverless function I used is shown below:
|
Beta Was this translation helpful? Give feedback.
-
@damz @akhilgupta1093 and @abhinavtripathy, there is one big architectural decision we have to make regarding the Frog Software for now. I think this will be a relatively short term solution as we will very soon after develop a proper API for data write, etc for frogs.
The question is how should data end up in our database: influxDB?
In previous sensor versions, we used the influxDB Python Client to send the data directly to the cloud hosted DB. This is very simple to implement and would probably work well with our micro-python implementation now. The main downside to this approach is that the devices have to have the write API key on the device, which is a bit of a security / abuse risk, though I think not much given the scale of the project.
The other easy short term solution would be to the route the data through Golioth's LightDB Stream service and then push it to Influx via Webhooks. The data chain would then be frog_sensor -> golioth LightDB -> InfluxDB. This would be nice because we could hide the InfluxDB key in the LightDB backend, removing it from the devices. However, it does introduce an additional system in the loop, which adds complexity.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions