influxdata / influxdata/influxdb
Historical data assist for low power devices
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Proposal:__
Return the automatic timestamp in the HTTP response so clients with low power needs can cache data, send the most recent point, get the timestamp from that and then calculate historical timestamps for their remaining cached data.
Especially on low power devices firing up the Wifi or running a real time clock costs battery power. Be great if we can cache 24 hours of data on our device. Send our most recent point with influx automatically entering the time stamp, then if the post request can return the timestamp allocated (maybe with a request parameter to turn on this feature) we can calculate the relative time for all our cached measurements and send them up without having to resort to clocks or fire up wifi to grab NTP etc.
__Current behavior:__
The response to a POST is currently empty.
__Desired behavior:__
POST request gets a parameter &ts=true and if set the response returns the timestamp allocated to the measurement
__Alternatives considered:__
Intermediate scripts to receive the cached data and forward - complex
Running real time clock on the device - draws power from battery operated sensors
Querying NTP time on the battery powered sensor - also draws battery switching on wifi
__Use case:__
Allows low power sensor devices to save the environment since the battery will last much longer.
Contributor guide
Research direction
The issue identifies no files, tests, or entry points. Start by locating the POST handler for measurements and determine how its automatically allocated timestamp can be exposed when the ts=true parameter is supplied; done means the default response remains unchanged and opted-in requests return that timestamp.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100