BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Open Source MongoDB Alternative FerretDB Now Generally Available

Open Source MongoDB Alternative FerretDB Now Generally Available

FerretDB, an open-source MongoDB alternative database, recently announced its general availability. Released under the Apache 2.0 license, the project allows developers to use existing PostgreSQL infra to run MongoDB workloads.

FerretDB works as a proxy that translates MongoDB wire protocol queries to SQL, with PostgreSQL as the database backend. Started as an open-source alternative to MongoDB, FerretDB provides the same MongoDB APIs without developers needing to learn a new language or command. Peter Farkas, co-founder and CEO of FerretDB, explains:

We are creating a new standard for document databases with MongoDB compatibility. FerretDB is a drop-in replacement for MongoDB, but it also aims to set a new standard that not only brings easy-to-use document databases back to its open-source roots but also enables different database engines to run document database workloads using a standardized interface.

While FerretDB is built on PostgreSQL, the database is designed with a pluggable architecture to support other backends, with projects for Tigris, SAP HANA, and SQLite currently in the working. Written in Go, the project was originally started as the Server Side Public License (SSPL) that MongoDB adopted in 2018 does not meet all criteria for open-source software set by the Open Source Initiative. The team behind FerretDB writes:

Initially built as open-source software, MongoDB was a game-changer for many developers, enabling them to build fast and robust applications. Its ease of use and extensive documentation made it a top choice for many developers looking for an open-source database. However, all this changed when they switched to an SSPL license, moving away from their open-source roots.

According to Farkas, popular database management tools such as mongosh, MongoDB Compass, NoSQL Booster, and Mingo are already compatible with the current feature set of FerretDB. The Free Software Foundation comments in their monthly news digest:

For those who have been rightfully concerned over MongoDB's change of license conditions in 2018, this is welcome news indeed.

In the 1.0 release, FerretDB added support to the createIndexes command, while version 1.1.0 includes the addition of renameCollection, support for projection field assignments, and the $project pipeline aggregation stage, as well as create and drop commands in the SAP HANA handler.

The general availability of a drop-in replacement for MongoDB received mixed feedback on Reddit, with some users supporting the abstraction layer and others not considering FerretDB a "real" database. Franck Pachot, developer advocate at YugabyteDB and AWS Data Hero, recently wrote an article on how to enable a MongoDB-compatible API on YugabyteDB:

Want a MongoDB-compatible API on top of your Distributed SQL database? Easy to connect FerretDB to YugabyteDB and all is open source.

FerretDB is not the only alternative to MongoDB: other schemaless document-based databases supporting MongoDB APIs are Amazon DocumentDB, Azure CosmosDB, and MariaDB MaxScale. In a recent webinar, David Murphy, principal database reliability engineer at Udemy, compares CosmosDB, DocumentDB, MongoDB, and FerretDB as document databases.

The FerretDB project and the roadmap are available on GitHub, with Docker images and RPM and DEB packages.

About the Author

Rate this Article

Adoption
Style

BT