Skip to content

Calmcore

Haifeng Liu edited this page Aug 6, 2024 · 8 revisions

Calmcore

Calmcore is the core engine of calmseek, built for persistent document storage and fast index lookup.

Calmcore = MDB + WAL + SDB, i.e., Memory Database (MDB) + Write-Ahead Logging (WAL) + Snapshot Database (SDB)

MDB

内存中的文档对象,倒排索引,以及向量索引

32bit唯一ID 标识文档,docid -> json object, token -> postinglist of docid, vector -> docid, ...

WAL

写操作日志,

log entry = [OP, encoded json object], OP = SET or DEL

WAL is just an append-only file, packed by log entries

SDB

快照 MDB + WAL offset

Clone this wiki locally