Use MongoDB as an alternative storage solution #345

Open
opened 2023-03-27 16:35:50 +00:00 by lmauromb · 3 comments
lmauromb commented 2023-03-27 16:35:50 +00:00 (Migrated from gitlab.com)

Hello Conduit Team, here at the federation team at Rocket.Chat are evaluating the use of Conduit as our matrix homeserver for our federation capabilities, so we wanted to reach out to ask if it would be possible to contribute back with some changes that we need to do to achieve the integration.

Describe the solution you'd like

Since our application relies on MongoDB for our storage we wanted to know if it would be architecturally possible to add Mongo as an alternative solution for the Conduit storage.

I don't know if for Conduit you still need to have an embedded database, so we wanted to check first if it is possible to add the Mongo abstraction similar to what you have for RocksDB/SQLite.

### Is your feature request related to a problem? Please describe. Hello Conduit Team, here at the federation team at Rocket.Chat are evaluating the use of Conduit as our matrix homeserver for our federation capabilities, so we wanted to reach out to ask if it would be possible to contribute back with some changes that we need to do to achieve the integration. ### Describe the solution you'd like Since our application relies on MongoDB for our storage we wanted to know if it would be architecturally possible to add Mongo as an alternative solution for the Conduit storage. I don't know if for Conduit you still need to have an embedded database, so we wanted to check first if it is possible to add the Mongo abstraction similar to what you have for RocksDB/SQLite.
timokoesters commented 2023-05-21 07:48:50 +00:00 (Migrated from gitlab.com)

Hello, thanks for offering your help! We currently only support key-value databases, but there is a lot of interest in Postgres and other relational databases. Last year I rewrote some of the core code to make this more simple:

Each "service" defines the set of database interaction it needs, see for example src/service/users/data.rs. These interactions can have multiple implementations. Currently we just have an implementation for key value databases, see for example src/database/key_value/users.rs

In the future we can extend this to src/database/relational/users.rs to support proper SQL databases.

If you want to combine efforts on this, send me a message on Matrix or an email.

Hello, thanks for offering your help! We currently only support key-value databases, but there is a lot of interest in Postgres and other relational databases. Last year I rewrote some of the core code to make this more simple: Each "service" defines the set of database interaction it needs, see for example `src/service/users/data.rs`. These interactions can have multiple implementations. Currently we just have an implementation for key value databases, see for example `src/database/key_value/users.rs` In the future we can extend this to `src/database/relational/users.rs` to support proper SQL databases. If you want to combine efforts on this, send me a message on Matrix or an email.
erlend-sh commented 2024-02-12 08:24:33 +00:00 (Migrated from gitlab.com)

Possible avenue: https://www.ferretdb.com/

FerretDB is an open-source proxy, converting the MongoDB 5.0+ wire protocol queries to SQL - using PostgreSQL or SQLite as a database engine.

Possible avenue: https://www.ferretdb.com/ > FerretDB is an open-source proxy, converting the MongoDB 5.0+ wire protocol queries to SQL - using PostgreSQL or SQLite as a database engine.
avdb13 commented 2024-02-12 08:44:47 +00:00 (Migrated from gitlab.com)

This could work but I doubt OP is gonna have a great time with Conduit unless they find a way to convert a data (which is gonna be painful in case the objects even differ slightly). MongoDB created more problems than it solved for my uses. Handy tool though!

This could work but I doubt OP is gonna have a great time with Conduit unless they find a way to convert a data (which is gonna be painful in case the objects even differ slightly). MongoDB created more problems than it solved for my uses. Handy tool though!
Sign in to join this conversation.
No labels
Android
CS::needs customer feedback
CS::needs follow up
CS::needs on prem installation
CS::waiting
Chrome
Design:: Ready
Design:: in progress
Design::UX
E2EE
Edge
Firefox
GDPR
Iteration 13 IM
Linux
MacOS
Need::Discussion
Need::Steps to reproduce
Need::Upstream fix
Needs:: Planning
Needs::Dev-Team
Needs::More information
Needs::Priority
Needs::Product
Needs::Refinement
Needs::Severity
Priority::1-Critical
Priority::2-Max
Priority::3-Impending
Priority::4-High
Priority::5-Medium
Priority::6-Low
Priority::7-None
Progress::Backlog
Progress::Review
Progress::Started
Progress::Testing
Progress::Triage
Progress::Waiting
Reporter::Sentry
Safari
Target::Community
Target::Customer
Target::Internal
Target::PoC
Target::Security
Team:Customer-Success
Team:Design
Team:Infrastructure
Team:Instant-Messaging
Team:Product
Team:Workflows
Type::Bug
Type::Design
Type::Documentation
Type::Feature
Type::Improvement
Type::Support
Type::Tests
Windows
blocked
blocked-by-spec
cla-signed
conduit
contribution::advanced
contribution::easy
contribution::help needed
from::review
iOS
p::ti-tenant
performance
product::triage
proposal
refactor
release-blocker
s: dart_openapi_codegen
s::Famedly-Patient
s::Org-Directory
s::Passport-Generator
s::Requeuest
s:CRM
s:Famedly-App
s:Famedly-Web
s:Fhiroxide
s:Fhiroxide-cli
s:Fhiroxide-client
s:Fhirs
s:Hedwig
s:LISA
s:Matrix-Dart-SDK
s:Role-Manager
s:Synapse
s:User-Directory
s:WFS-Matrix
s:Workflow Engine
s:dtls
s:famedly-error
s:fcm-shared-isolate
s:matrix-api-lite
s:multiple-tab-detector
s:native-imaging
severity::1
severity::2
severity::3
severity::4
technical-debt
voip
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Matthias/conduit#345
No description provided.