-
Notifications
You must be signed in to change notification settings - Fork 71.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clarification][Compatibility]: MongoDB x FerretDB #8279
Comments
From what I know Nightscout uses basic features of Mongo and Ferret translation most probably covers all that's needed. The issue I've seen with this is FerretDB requires another cloud service that results as an extra cost for most PaaS. If you run your own VPS, I'm not sure of the added value. It would for sure be obvious if we could find a free DB larger than Atlas. You did check this, right? https://github.com/3timeslazy/nightscout-ferretdb/tree/main/all-on-one |
Hello @psonnera
FerretDB can be deployed to translate into SQLite for example. Thinking with heroku-like in mind indeed ddo not have much advantage, but for a single VPS as example, sqlite will be lighter than a MongoDB database (For coincidence this is more or less my case). In fact, FerretDB may increase the database support, since adds SQLite, PostgreSQL and in future, MySQL support. If we can confirm any of FerretDB limitations is being used here, may Nightscout officially support it in future. For now, I just want check if something bad may happen with some specific register or condition. Another suggestion is to add FerretDB to testing alongside with MongoDB testing. |
I really disagree on s6 usage - all the more using docker-compose. My approach is just running ferretdb and nightscout in different services at same docker-compose - and it works very well. Aside, this avoid the lose of updates from both projects due to misleading with all-in-one container CI builds. About Atlas, at least for me, heath data being inside my infrastructure - or being controlled by me at least - is a must to. Also, a setup with Nightscout + FerretDB + SQLite + Rpi + Zerotier (as example) would fit better than running MongoDB in such small device. |
Just for reference, my docker-compose file:
|
@leleobhz this is a very smart choice but I'm not sure it adds so much value over running an older Mongo version (I use 4.4 in my VPS with great satisfaction) but as I've been looking forever for free Mongo alternatives to Atlas (and the result of my search is exactly the opposite of free), having the possibility of finding other free Posgres/SQLite databases available would be fantastic. How would you modify this yml to have an external Postgres/SQLite database on a different server? |
@psonnera For use FerretDB with Postgres, just replace the POSTGRES_ variables in the environment - as in the example at https://docs.ferretdb.io/quickstart-guide/docker/#postgresql-setup-with-docker-compose - and add a postgres service if you need it. About Old Mongo x Ferret, MongoDB have some requirements that may hit very small environments. MongoDB does not behave very well with slow storage (In any version for anything) - and since probably you VPS is a SSD ones, MongoDB works well. Also, In SoC like Rpi, MongoDB may suffer with low bandwidth bus and some CPU congestion for I/O. The scenario with RPI or even weaker SoCs may be better with FerretDB, allowing reducing price for on premisses/own hardware solution. |
Nightscout formally only supports MongoDB. I bring up a testing instance using FerretDB (As their description, "FerretDB is an open-source proxy that translates MongoDB wire protocol queries to SQL, with PostgreSQL or SQLite as the database engine.") to test if NightScout behaves properly and until now - without much data it behaves normally.
That said, considering the FerretDB Differences from MongoDB, does FerretDB misses something Nightscout uses (Or plans to use)?
The text was updated successfully, but these errors were encountered: