feat: support OceanBase for relational, vector, and graph storage
Pre-submission checklist | 提交前检查
- [x] I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
- [x] I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
- [x] This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题
Problem Statement | 问题陈述
MemOS currently uses different storage backends for different data types: SQLite/MySQL for relational data such as users, cubes, and scheduler state; Qdrant/Milvus for vector search; and Neo4j, PolarDB, or PostgreSQL for Tree Memory graph data.
This design provides flexibility, but enabling the complete feature set may require users to operate multiple services, connection configurations, dependencies, and backup procedures. A single memory operation may also write to several backends without a shared transaction boundary.
I noticed that MemOS already supports a PostgreSQL + pgvector graph backend. It stores nodes and edges in relational tables, properties in JSONB, queries graph relationships with SQL, and uses pgvector for node vector search. This implementation shows that graph data can be represented as a logical graph without requiring a native graph database.
OceanBase provides relational transactions, JSON, vector types and indexes, and recursive SQL queries. It could therefore be used as a single optional backend for:
- relational data such as users, cubes, and scheduler state;
- embeddings, vector search, and metadata filters;
- Tree Memory nodes, edges, properties, and path queries.
The deployment model could be:
- OceanBase Database for production;
- OceanBase's embedded version, seekdb, for local deployments.
The implementation could reuse the existing User/Scheduler, BaseVecDB, and BaseGraphDB interfaces. It would be introduced as an optional provider without removing existing backends or changing the defaults. If the maintainers are open to this direction, I can start by adding the Vector DB and Graph DB providers, validate them against OceanBase and local seekdb, and then decide based on the results whether to extend the backend to the remaining relational data.
Willingness to Implement | 实现意愿
- [x] I'm willing to implement this myself | 我愿意自己解决
- [x] I would like someone else to implement this | 我希望其他人来解决
I've worked on a similar storage consolidation before, bringing three separate databases into one. Our team also did similar work in Dify, unifying its relational and vector data on the same OceanBase backend; the integration was released as part of Dify 1.10.1. Having worked through these migrations is one reason I'm particularly interested in this direction for MemOS. If the maintainers are open to it, I'd be happy to contribute to the design, implementation, and validation of an OceanBase/seekdb backend.
Thanks for sharing your relevant experience. We’re open to this direction and have assigned this issue to you.
Thank you for your reply. Our team is happy to do this. If there are any subsequent discussions regarding technical compatibility, should we discuss them under this issue, create a new discussion, or discuss them under the initial PR submission?
This issue has been automatically marked as stale due to inactivity.
This issue has been automatically closed due to inactivity.