Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Raspberry as data aggregator node, transfer to database if Raspberry is online

$
0
0

I have never used SQL and currently I do read and watch various turorials and the manual of PostgreSQL. I would appreciate if someone could give me a brief overview how an experienced user would set up such a system:

I do use a Raspberry Pi to store data from different sensors locally (currently file based). The next step is to store the data in a database (e.g. PostgreSQL) on a webserver. I would like to use this data for further statistical analysis and online plotting (e.g bokeh and django). Data will be sampled at 2 Hz for several hours (e.g during a sports match). Afterwards, there will be long periods (weeks) without any data being collected. I expect to have 5 to 10 Raspberries connected to the database (a table for each Raspberry) at the same time.

As far as I understood, I could use replication to synchronize my master database (on the Raspberry) with some other servers. However, my Raspberry is not a server and not always online. I do not want to use an external hard disk because the Raspberry is battery powered and power consumption should be low. Additionally, the data is of no use on the raspberry because computational power is too low.

In essence I would like to write the newly gathered data to my web based database upon an external trigger (e.g. if a button is pressed and an Internet connection is available) and delete it on the Raspberry if it becomes too large.

Would you use a database on the Raspberry to store the sensor values and their timestamps upon insertion, or would you stick with file based storage ?

If you would use a local database, what kind of replication mechanism would you use ? As far as I understood the documentation right, Slony might be suitable. However, I am not sure if this is an overkill.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>