Replacing MongoDB with PostgreSQL in OpenIAP Stack

Hi,

I’m using OpenIAP with MongoDB as the database. However, I also need some of the same tables in a PostgreSQL database, so right now I’m synchronizing data between them. I’m not fully confident this is the best solution, and I feel like having a single database would be cleaner and more reliable.

Is it possible to use PostgreSQL instead of MongoDB with OpenIAP? If so, would I only need to modify the OpenIAP code, or would other components also require changes? My current stack includes OpenRPA, OpenIAP, OpenFlow, Node-RED, and RabbitMQ.

Would you recommend making this transition, or do you think it could be risky? I would really appreciate hearing about your experiences or advice.

Everything in OpenFlow/OpenCore is heavily dependent on MongoDB. So, there is no way to use Postgres as a drop-in replacement.

I know there are a few attempts to make a database that understands MongoDB, which potentially could be used if the goal is to avoid using MongoDB.

FerretDB - I had high hopes for this a few years ago, but they still do not support change streams, and this is needed.

Azure Cosmos DB for MongoDB does support change streams, but then you are vendor-locked into Azure and using the cloud.

Amazon DocumentDB does support change streams, but then you are vendor-locked into Amazon and using the cloud.

If the goal is to support more traditional SQL queries while using a single database, you could also look into the MongoDB BI Connector, which allows using MongoDB as a traditional RDBMS database.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.