Open avalmas-programize opened 3 years ago
Right now we have the following sources:
At the moment we have that noaa
, gfs
and spotter
data are strictly reef
data (do not have poiId specified) and hobo
data are poi
data.
However this is not restricted by anything. So if, in the future, more than one spotter can exist in the same reef (as a reef specific and a poi specific) the poi data endpoint (since it is fetching both specified poi and reef data) will mix the data from the two spotters together.
Right now we can add an extra layer of grouping in the spotter source based on the id of the spotter which will solve the conflict.
For example:
{
"spotter": {
"SPOT-4321": { "metric": ...data },
"SPOT-1234": { "metric": ...data }
}
}
Currently the time-series API is implemented as follows: GET
/time-series/reefs/:reefId/pois/:poiId
: Get all poi data plus all reef data (poi = poiId orNULL
) GET/time-series/reefs/:reefId
: Get all reef data (poi is NULL)However the above assumes that there would be no conflicts between
reef
specific sensor andPOI
specific sensor, i.e. there won't exist two sensors, one on thereef
and one on aPOI
of thereef
, that will log the same metric under the same source For example two spotters, one loggingreef
specific data and one loggingPOI
specific data of the same reef.In a case of the conflict data would get scrabbled as the implementation will group data of different sensors into one stream of data.