Skip to content

feat: migrate decision store to MongoDB for improved write throughput…#20

Open
decispher wants to merge 1 commit into
mainfrom
feat/decision-store-mongodb
Open

feat: migrate decision store to MongoDB for improved write throughput…#20
decispher wants to merge 1 commit into
mainfrom
feat/decision-store-mongodb

Conversation

@decispher

Copy link
Copy Markdown
Contributor

… 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

… 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

decispher Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

🔍 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: mongodb


🟠 HIGH — Standardize on PostgreSQL with pgvector for primary storage and vector search (confidence: 81%)

Use PostgreSQL with pgvector and HNSW indexes as the standard solution for primary datastore and vector search operations.

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
Signals matched: mongodb, vector-search


🟠 HIGH — Use MongoDB for Analytics Events Pipeline (confidence: 80%)

We will use MongoDB for the analytics events pipeline, provisioning a MongoDB Atlas cluster to handle the data.

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
Signals matched: mongodb


🟡 MEDIUM — Implement Redis Semantic Caching for LLM Embedding Calls (confidence: 79%)

Implemented Redis semantic caching for LLM embedding calls. The cache key is a hash of the input text, model, and provider. The cache entries have a Time-To-Live (TTL) of 1 hour.

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
Signals matched: embeddings


🟠 HIGH — Use MongoDB Atlas for schemaless analytics webhook storage (confidence: 79%)

Use MongoDB Atlas specifically for the analytics event ingestion pipeline, while keeping all other core application data in PostgreSQL.

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
Signals matched: mongodb

Context look wrong? 👎 Dismiss · This is different · Powered by Decispher

@decispher

Copy link
Copy Markdown
Contributor Author

@decispher help

@decispher

decispher Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Re: comment

🧠 Decispher — Available Commands

Command Action
@decispher accept decision Capture the code diff + PR description as a new decision, archive conflicting old rules
@decispher new decision: <text> Capture provided text as a new decision (code diff included as context)
@decispher dismiss Mark the Lens match as a false positive
@decispher help Show this help message

🤖 Decispher — Learn more

@decispher

decispher Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Re: comment

✅ Decision accepted and recorded in Decispher.

@decispher

Copy link
Copy Markdown
Contributor Author

@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

@decispher

decispher Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Re: comment

✅ New decision captured: we are going to use RFC 307895 for validation JSON files ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant