600SeriesAndroidUploader icon indicating copy to clipboard operation
600SeriesAndroidUploader copied to clipboard

Adding possibility to send data to an alternative database -> 2x Rest Api Upload

Open githubadas opened this issue 7 years ago • 3 comments

Hi all, I think it will be nice to have possibility to send data to two (or more) different databases (for example azure&heroku). We use free of charge setup, so there is also a hudge possibility of failure. If there will be an option to send all data to alternative base - just for backup - then after some any issue on one of them, we can simple quick switch on for example webbrowser to check still actual bg level. At this moment I use xDrip+ to share data to several databases, but the main problem is, that all treathments are sending by uploader only to main database. It will be excellent to have possibility catch all data to all databases. Thanks you all for this briliant tool!

githubadas avatar Feb 12 '18 08:02 githubadas

Short answer would be no as this would require major rework of many areas.

The likelihood of data loss is very very slim and this has never been reported by anyone that I know of across the NS eco-system. The cloud hosts can go down for short periods of time but online data is safe and the local data is always backfilled as soon as they are back up. Even if you lost your phone, uninstalled/cleared everything it would still get the last 3 months of data from the pump.

It's really hard to lose data. If host uptime is really important I would recommend paying for the service on Heroku as it's relatively cheap for small private use.

Pogman avatar Feb 12 '18 12:02 Pogman

I like having cgm-data at more than one site as well, but this is for testing setups, and looping algorithms. (cgm data is shared, but only one site has the treatment data for those treatments that really got applied, obviously) There are other ways of multiplying data. The one I have been using was to send the data "sideways" into xdrip as well, and have xdrip fill the other site via its mongodb upload. Another way would be to make regular backups of your data (highly recommended) and upload that to the other site if needed. I remember having read about a proxy to split the datastream to two sites, but right now I don't find the link to where I had found that information.

LongboatAline avatar Feb 20 '18 14:02 LongboatAline

An alternative solution is just to replicate the mongo collections with the data you want to the secondary database. Probably just the devicestatus, entries, treatments and profile collections would do it. There are command line tools that can do this such as https://github.com/reverb/wordnik-oss/tree/master/modules/mongo-admin-utils

shawnbissell avatar Feb 26 '19 18:02 shawnbissell