Production of the project Freetdb 2.0 was recently presented, offering users the option to replace the proprietary MongoDB DBMS with a fully open software stack based on PostgreSQL, without requiring changes to the application code. The code, written in Go, is distributed under the Apache 2.0 license, making it suitable for working implementations.
The main target audience for Ferretdb are MongoDB users looking to utilize a fully open software stack. Ferretdb supports a subset of MongoDB capabilities commonly used in typical applications. This solution may become necessary due to MongoDB transitioning to a non-free SSPL license, which contains a discriminatory requirement of supplying under the license the initial texts of all components involved in providing cloud service.
MongoDB fills a niche between quick and scalable key/value systems and relational DBMSs. It supports storing documents in a JSON-like format, offers a flexible query language, can create various indices, effectively stores large binary objects, supports journaling operations, works with the MAP/REDUCE paradigm, and supports replication and fault-resistant configurations.
The key change in Ferretdb 2.0 is the move to using Documentb, an open-source addon by Microsoft for PostgreSQL that allows storing data in a JSON-like BSON format compatible with MongoDB. Initially, FerretDB translated MongoDB queries to PostgreSQL SQL. With the switch to DocumentB, performance significantly increased for certain loads. Other improvements in Ferretdb 2.0 include enhanced compatibility with MongoDB, replication capabilities, and support for vector search.