eclipse-archived / unide

Eclipse Public License 1.0
29 stars 17 forks source link

REST Server db index #20

Closed ameinhardt closed 6 years ago

ameinhardt commented 6 years ago

In order to save measurements with identical deviceId and timestamp but different device property names, add such tag() https://github.com/eclipse/unide/blob/2a12a7b94215ac795c7222cc82671e476eb69cba/servers/rest/src/main/java/server/persistency/dao/MeasurementDAO.java#L102-L103

also for process shutoffvalues: https://github.com/eclipse/unide/blob/2a12a7b94215ac795c7222cc82671e476eb69cba/servers/rest/src/main/java/server/persistency/dao/ProcessDAO.java#L182-L186 and special values: https://github.com/eclipse/unide/blob/2a12a7b94215ac795c7222cc82671e476eb69cba/servers/rest/src/main/java/server/persistency/dao/ProcessDAO.java#L229-L232

if measurements() always hold the deviceId, do we need another tag deviceId? in ProcessDao, MachineMessageDao and MeasurementDao

davidgs commented 6 years ago

The Device ID should not be the Measurement, but a Tag on the measurement.

ameinhardt commented 6 years ago

@davidgs: thanks, that's how we did it now! The DAOs are now called [Comsumer](https://github.com/eclipse/unide/tree/master/servers/rest/src/main/java/server/receiver/influxdb). The documentation for the influx mapping has been documented in documentation - InfluxDB Schema Design Example: https://github.com/eclipse/unide/blob/d0cba44ac7528df58ffc2632e8daa1684901373c/servers/rest/src/main/java/server/receiver/influxdb/MachineMessageConsumer.java#L50-L53