hubofthings / raspberry-pi-recipes

Overcast recipe for the Raspberry Pi.
11 stars 3 forks source link

Add MongoDB Script #7

Open TotallyInformation opened 9 years ago

TotallyInformation commented 9 years ago

MongoDB is a commonly used NoSQL DB for IoT but has no pre-build version for the Pi, it would be great to have a script to do it the best way.

https://groups.google.com/forum/#!topic/node-red/3RaXeI4-xZg

garnold commented 9 years ago

Thanks for the request, @TotallyInformation !

Doesn't look like there are a lot of good options out there. Most tutorials reference the mongo-nonx86 repo, which is far behind master. We'll continue to investigate on our end.

screenshot 2015-04-08 15 28 57

garnold commented 9 years ago

Looks like official ARM support for Mongo is under development: https://jira.mongodb.org/browse/SERVER-1811

TotallyInformation commented 9 years ago

true but no update since August last year. I hadn't realised that the nonx86 version was so far behind!

May be a long wait then. That's sad since MongoDB seems such a good fit for IoT work. Maybe I need to look elsewhere for my ideal, cross-platform (including Windows and ARM), no-sql document database.

garnold commented 9 years ago

@TotallyInformation You might consider a hosted MongoDB solution. MongoLab has a free tier which might be enough for your application: https://mongolab.com/plans/

Alternatively, I'm a big fan of Redis, which is officially supported on the Raspberry Pi and Node-RED. Would you be interested in us adding support for Redis to this repo?

TotallyInformation commented 9 years ago

Hi @garnold, many thanks for the info. I will look into Redis, thanks. I've not used it really so I'm not familiar with it. However, I'm aware that it is very popular and it does work with the tools I'm developing with right now (Pi2, Node-Red, Mosca) so yes, that would indeed be helpful.

Unfortunately, I can't use a hosted MDB for this project as the data it contains is sensitive. Containing as it does information regarding automation of my house. The advantage to me of MDB is its ability to handle JSON documents nicely. I can store and retrieve JSON, embed javascript functions and reshape output directly with simple queries. Not sure if I can do all that from Redis, I'll have to investigate.

I don't really want to run both MDB and Redis due to the overheads but I may have to. With MDB running, as it is now, on my NAS (ATOM based Synology) instead of the Pi. and Redis on the Pi for local use.