Home ยป Simulating PostgreSQL with Pongo API to mimic MongoDB.

Simulating PostgreSQL with Pongo API to mimic MongoDB.

Oskar Dudycz, a developer advocating for Event-Driven Architecture, has unveiled the Pongo library, designed to simulate MongoDB by connecting seamlessly to PostgreSQL instead.

The concept of using PostgreSQL in place of MongoDB is not new, with tools like FerretDB emulating MongoDB’s wire-protocol operations, allowing applications to connect to FerretDB, thinking it’s MongoDB, when in reality, it’s PostgreSQL. However, Pongo offers a different approach. The library acts as a client-side emulation of MongoDB API in JavaScript, but can connect to PostgreSQL as-is without any modifications.

Pongo simplifies the database structure by creating one table per collection, where each table contains only two fields: _id and data in JSONB format. Queries are then translated into filters within the data field. Transitioning from MongoDB to PostgreSQL requires adjusting client-side code.

Currently, Pongo is in its early stages and not all API functionalities are simulated.

Source: GitHub – event-driven-io/Pongo

TLDR: Oskar Dudycz introduces Pongo library, which emulates MongoDB but connects to PostgreSQL, offering a unique approach to database management.

More Reading

Post navigation

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *