Skip to content
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

[FEAT] Offer FerretDB as an alternative to MongoDB #56

Closed
1 task done
stevekerrison opened this issue Jan 11, 2024 · 3 comments
Closed
1 task done

[FEAT] Offer FerretDB as an alternative to MongoDB #56

stevekerrison opened this issue Jan 11, 2024 · 3 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@stevekerrison
Copy link

stevekerrison commented Jan 11, 2024

Is this a new feature request?

  • I have searched the existing issues

Wanted change

To de-couple the Unifi Controller from its dependency on MongoDB 4.x, provide a configuration that supports FerretDB, which is protocol-compatible with MongoDB clients, but implements the database as either SQLite or PoestgreSQL.

Reason for change

This removes a dependency on a version of Mongo that will not be supported much longer (Feb 2024 for MongoDB 4.4). Newer versions are not officially supported by Ubiquity, and it's possible they never will be due to licensing changes. Additionally, newer Mongo versions require CPU instruction extensions not present on some devices (Raspberry Pi, Atom/Celeron) that may be in use by users of this container. Building a version of Mongo without this requirement is possible, but the licensing disparity remains.

FerretDB would allow use of the established architecture to continue without the above issues, provided it can provide feature-equivalence for the unifi controller client and suitable performance.

It's not clear what approach Ubiquity will take to solve this issue, if any, so this is an attempt to solve this issue regardless of what they may or may not release in the future.

Proposed code change

Introduce configuration options and examples for using a FerretDB backend instead of MongoDB, and do testing to ensure reliability and indicate performance expectations.

I have started this myself with an experimental fork of this project, but wish to seek input via a feature issue before crafting a branch suitable for a PR. My changes are not yet aligned with the PR requirements, but you can compare to see the fundamental changes which are mainly in environment variable handling.

So far I have successfully instantiated a controller against SQLite and PostgreSQL backends with FerretDB, and restored backup configuration and telemetry into said backends and verified operation through the unifi dashboard. However, I have not yet switched over control of my APs to any of these instantiations, and I have noted that performance with SQLite may be problematic.

@stevekerrison stevekerrison added the enhancement New feature or request label Jan 11, 2024
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@drizuid
Copy link
Member

drizuid commented Feb 1, 2024

Users are welcome to use whatever they like, that is why we split mongo out from unifi in the first place. However, we will not modify the readme to encompass this as we do not wish to carry the support burden. Internally we've tested all versions of mongo and that is what we'll support. If users wish to use other things, they are more than welcome to as long as they support themselves.

As a side note, thank you for the well written and detailed posting, I'm going to lock this, but not close it yet, because I'd like the team to internally discuss pinning this. Although we won't support it, for users with no avx that want a non-eol mongo (but dont care about ubnt's support stance) this is good guidance.

@drizuid drizuid added the wontfix This will not be worked on label Feb 1, 2024
@linuxserver linuxserver locked as resolved and limited conversation to collaborators Feb 1, 2024
@drizuid
Copy link
Member

drizuid commented Feb 1, 2024

NOTE, this is not a setup endorsed or supported by linuxserver.io, however, the information is considered valuable enough for certain user bases that we are pinning this.

@drizuid drizuid pinned this issue Feb 1, 2024
@drizuid drizuid closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
Archived in project
Development

No branches or pull requests

2 participants