Messenger Archive & Semantic Search
Search text and transcribed audio by meaning in a private message archive.
Independent personal project. The diagram describes software components and contains no example messages or account records.
Engineering details
- Engineering Context
- A personal project that separates message import, transcription and indexing so each step can be retried.
- Architecture
- Rust loads message records through MTProto into PostgreSQL, where workers claim Whisper transcription jobs using row-level locks (FOR UPDATE SKIP LOCKED). A Rust indexer upserts embeddings to Qdrant under deterministic UUIDv5 IDs before advancing checkpoints, and a read-only MCP server exposes semantic search to AI clients.
- Technical Challenges
- Parallel workers can encounter jobs that another worker already claims.
- The vector store and the indexing checkpoint are separate systems.
- Design Decisions
- Coordinate concurrent workers with PostgreSQL row-level locks (FOR UPDATE SKIP LOCKED) so workers skip claimed jobs without blocking.
- Derive deterministic UUIDv5 vector point IDs and advance the checkpoint only after Qdrant upsert succeeds for replay safety on failure.
- Explicitly separate side-effect retry policies so vector re-writes stay idempotent without duplicating external actions.
- Reliability Considerations
- Deterministic vector updates ensure retries write to the same Qdrant point ID, while unrelated side effects keep separate retry and deduplication policies.
- Crashes between import, transcription, and indexing replay safely from the last committed PostgreSQL checkpoint.
- What the project does
- Combines message and transcript search in an MCP interface.
- Rust
- Python
- MTProto
- PostgreSQL
- Whisper
- Qdrant
- MCP