signalk-to-mongodb version 2.1.1

signalk-to-mongodb version 2.1.1 NPM Github - Added support for db and collection names - Added documentation - Enhanced plugin code and added inline documentation - Enchance debug and error logging
9 Replies
Matti Airas
Matti Airas3mo ago
This is very interesting! With InfluxDB being a bit wobbly about their future plans, I had mostly assumed TimeScale would be the only viable option. Had completely forgotten about MongoDB. Could you give a short biased & opinionated assessment of Mongo's suitability for SK time series data storage?
LinnJS
LinnJS3mo ago
I went through some problems where I was not storing data correctly by its type. I recently re-wrote the plugin so it stores dates correctly that was probably the biggest hoop. I was planning on making another plugin that integrates InfluxDB with MongoDB and then does a diff between the data and post it up to mongo. The main problem is when you loose connection to the internet since it grabs data form signalk you can lose some data here and there the boat I am working with has Starlink so data loss isnt that bad but still happens. The mongo plugin has connection retries so if you lose connection it will restart when you get back online. Would be nice to use Influx so there is zero data loss. My biggest compliment to mongo is its developer expirence I am building an app off of it and I am using React with Prisma as a ORM and tRPC as the backend very nice workflow. Also nice to use Prisma Studio as a data viewer. Overall its not bad at all I am storing 1.3Million records and having a pretty good experience overall. Using Railway and using MongoDB docker image it is costing us around $10/month for 1.3 million records not bad . If you have any specific questions let me know.
Matti Airas
Matti Airas3mo ago
Ahh, is this solution designed to be an on-shore DB rather than a replacement for embedded InfluxDB?
LinnJS
LinnJS3mo ago
We are using it on-shore and off-shore its just a stop gap solution till I can get mongo integrated with influxdb unfortunately mongo wont run on a pi directly does not support ARM. Since we have starlink the bet is we will always have some sort of connection but I will be making a infux to mongo plugin next and will do diff logic to make sure all data is on the cloud mongodb. My primary goal was to use a db that supported prisma for app dev.
Roger
Roger2mo ago
https://www.mongodb.com/developer/products/mongodb/mongodb-on-raspberry-pi/ It does seem like it's now possible to install mongodb on a 64bit RPi
Matti Airas
Matti Airas2mo ago
Looking a bit closer, even Docker's official images support arm64... https://hub.docker.com/_/mongo/tags
mongo Tags | Docker Hub
MongoDB document databases provide high availability and easy scalability.
Roger
Roger2mo ago
I suspect that it was a 32 bit issue
Matti Airas
Matti Airas2mo ago
Quite possible.