I am building a monitoring system for an irrigation pump and the connected pipeline. So far I have completed the sensor network. Everything connects to a micro-controller board (actually 4 Teensy 3.0 boards) and the board is programmed to output a string of formatted data (the readings) at predetermined intervals.
What I want to do is connect the board via USB-serial to a RaspberryPI (or some other SBC) and have the computer send the readings it receives from the sensor board to a remote server for logging.
The options I have considered are:
1 - Syslog... It struck me early on as a possibility because it seems to offer pretty much everything I need. The complexity scares me though.
2 - REST... Have the RaspberryPI POST the data, line by line, over the net to CouchDB on the server.
3 - HTTP... Keep an open HTTP connection with node.js and "write" the lines of data. It will of course need to be received by a second node.js script for storing in the DB.
Now to the requirements:
~ It needs to be lightweight and relatively fast. There will be a lot of data (1s intervals) and the RaspberryPI is no powerhouse.
~ I would very much like the option for a compressed string. The uplink is via 3G and I hope to go with a "small" monthly plan.
~ Encryption will be nice, but not mandatory. Paranoia is strong with the rednecks...
~ I really need this to be as K.I.S.S. as possible.
To cut a long story short, I have though of this as some kind of over-the-net serial connection, where a computer feeds line after line to another computer.
So, whitch of the options I have here is preferable? Or even better, has anyone a better idea?
I am honestly open to editing and even reposting the question if someone has a good point to make.
All comments and answers so far have been appreciated and considered.
Syslog is really great, but I really need to avoid the complexity and overhead. Also, after some testing RaspberryPI seems to grind to a halt shortly after starting rsyslog.
By now it has been decided that the DBMS is going to be CouchDB.
The obvious option would be to use curl or a vestigial node.js server to make the REST calls to the DB server immediately as soon as the data arrives. This, although simple and effective, is for a number of reasons not preferable. Security is also a concern; I do not like the idea of a miniature PC in a field making direct calls to the DBMS.
The reason I am starting a bounty is that I hope someone can suggest an idea along the following lines: "Some kind of persistent connection between the remote miniature PC and the DBMS. Data will be formatted by some kind of protocol and forwarded through this connection in order to be received at the opposite end. This connection needs to be as lightweight as possible, with the least possible amount of overhead".