would like to have your opinion about my design and technological choices to solve a problem.
I'm getting a continuos data feed (a speed value V) from a serial port of a computer connected to a speed sensor through a microcontroller (that sends the value each 30 seconds).
I want to do 2 things :
- store V and a timestamp to a MongoDB
- serve this speed to a webpage and draw a chart.
Storing V and timestamp is for processing this data and computing few metrics (not in realtime).
I choose Mongo as it's the choice I made for the rest of the app (web app)
(schema less, json, capped collections for my speed logs, realtime things ...)
I'm planning to go with nodejs and a spawn(cat /dev/ttyS0) to get my data feed, then, I can store it to a local MongoDB and serving it through an http server.
I just found https://github.com/voodootikigod/node-serialport that can be more powerful than my spawn (cat ...)
Would you do the same thing?
And, how would you sync the local MongoDB speed collection with a distant MongoDB database ?
Thanks for your help and ideas !
PS: I have 3 machines, 3 feeds with 3 different serial ports and 3 node servers / Local MongoDBs...