platform icon indicating copy to clipboard operation
platform copied to clipboard

enhancement request: make it easier to replace MongoDb

Open mingfang opened this issue 1 year ago • 4 comments

Currently Huly uses MongoDb for primary storage. Ideally the storage can be abstracted so that it can be replaced with a different database.

We use Postgres exclusively. To match the flexibility of MongoDb, we plan to use the Apache Age extension that turns Postgres into a Cypher graph database.

After a text search for mongo in the codebase, it seems like most of the references are in the server directory. References in pods are are configuration, understandably.

However there's a few in /packages/collaborator-client and /packages/text-editor that should be abstracted away.

mingfang avatar Feb 21 '24 13:02 mingfang

Thanks for feedback. We already have storage abstractions that should make it easier to use another storage. And indeed, collaboration and editor reference mongodb directly, but these references will be removed soon.

aonnikov avatar Feb 21 '24 15:02 aonnikov

Hi! Are there any updates on this? I'd like to use Postgres instead of MongoDB, due to issue #13.

If there's a guide for this already, please redirect me there. Thank you!

sypion avatar Jun 19 '24 23:06 sypion

Hey! We are planning to remove direct mongodb usages, there are only few places to change. On server side there is an abstraction layer so it should be possible to implement adapter for another database. We are not planning to add support for Postgres or any other database in nearest future, though.

aonnikov avatar Jun 20 '24 07:06 aonnikov

Denis Bykhov since now we have postgres adapter, can we consider this issue as resolved?

aonnikov avatar Sep 17 '24 06:09 aonnikov

Is the postgres adapter documented anywhere? Link would be helpful.

kbaegis avatar Apr 16 '25 01:04 kbaegis