feat: migrate decision store to MongoDB for improved write throughput…#20
feat: migrate decision store to MongoDB for improved write throughput…#20decispher wants to merge 1 commit into
Conversation
… and flexible schema - Replace PostgreSQL context-store with MongoDB for core decision storage - Use MongoDB Atlas vector search for embedding similarity queries - Add mongodb dependency - Better performance for high-write scenarios in the core pipeline
🔍 Decispher Lens — 5 relevant decisions found🟠 HIGH — Migrate core decision store from PostgreSQL to MongoDB (confidence: 84%)This change aligns with our decision to migrate the core decision store to MongoDB, which we adopted specifically to handle higher write volumes and provide the schema flexibility that PostgreSQL couldn't support. By implementing this, you're directly moving away from the relational model we previously rejected for failing to scale with our evolving pipeline. Explicitly rejected: Keep PostgreSQL context-store Signals matched: 🟠 HIGH — Standardize on PostgreSQL with pgvector for primary storage and vector search (confidence: 81%)
Why: PostgreSQL with pgvector provides the ability to manage both SQL-based relational data and vector search capabilities within a single system, simplifying the architecture compared to managing separate databases. Explicitly rejected: MongoDB, CockroachDB Origin: Slack engineering-general · Apr 22, 2026 🟠 HIGH — Use MongoDB for Analytics Events Pipeline (confidence: 80%)
Why: MongoDB offers 10x the write throughput compared to PostgreSQL for high-cardinality event data, which is essential to meet the current scale requirements. The previous constraint was established before these new scale demands emerged. Explicitly rejected: PostgreSQL Origin: Slack decispher-test-1 · Apr 18, 2026 🟡 MEDIUM — Implement Redis Semantic Caching for LLM Embedding Calls (confidence: 79%)
Why: Redis was a natural extension since it is already in use for BullMQ and session caching. This implementation reduced redundant embedding calls by approximately 40% in tests. Origin: Slack decispher-test-1 · Apr 18, 2026 🟠 HIGH — Use MongoDB Atlas for schemaless analytics webhook storage (confidence: 79%)
Why: MongoDB Atlas provides the necessary horizontal sharding and schemaless structure to handle the required 50k write operations per second, whereas PostgreSQL performance degrades under this load. Explicitly rejected: PostgreSQL JSONB Origin: Slack decispher-test-1 · Apr 19, 2026 Context look wrong? 👎 Dismiss · This is different · Powered by Decispher |
|
@decispher help |
🧠 Decispher — Available Commands
🤖 Decispher — Learn more |
✅ Decision accepted and recorded in Decispher. |
|
@decispher new decision: we are going to use RFC 307895 for validation JSON files present in assets/theme folder so that incorrect json doesn't break our system |
✅ New decision captured: we are going to use RFC 307895 for validation JSON files ... |
… and flexible schema