KOVA
Docs

Welcome

Kova stores documents, answers SQL, and searches text. One process, one port, the MongoDB wire.

You talk to Kova with a MongoDB driver. The listener speaks the MongoDB wire protocol on port 27018. Insert a document, find it, run a SQL string over the same rows, or search the text. The files on disk are the database. Restart the process and the documents are still there.

What you can do today

You want toYou use
Store and read documentsA MongoDB driver. Documents.
Filter, group, and join collectionsfind and aggregate. Find and aggregate.
Ask a SQL questiondb.runCommand({ sql }). SQL.
Search words, including a typo$text, or WHERE TEXT. Text search.
Speed up a field lookupcreateIndex. Indexes.
Name a saved pipelineA view. Views.
Number a field on insertautoincrement. Autoincrement.
Commit several writes togetherbeginTransaction. Transactions.
Require a user and a password[security]. Security.
Copy the database to a filekovadump. Backup and restore.
Open the data from a SQL clientThe ODBC driver. ODBC.
Keep a copy if a machine diesA replica set. Replica sets.
Split one collection across machinesShards and a router. Sharding.

How a write lands

A client sends a command. Kova appends that change to a log on disk, then updates the page that holds the document. The reply means the log has the change. A checkpoint later folds those pages into the data directory and shortens the log. If the process stops in between, startup replays the log and the document comes back.

RAM holds a cache of pages, called the buffer pool. A find that misses the cache reads the page from disk. The collection does not have to fit in memory.

One process, until you ask for more

The default kova.toml is one writable process. It stores every document you insert. Security is off, so a client connects and sends commands. Turn security on when you want a user and a password. Add a replica set when you want copies of the same data. Add shards when one machine cannot hold the collection or the writes.

A feed of committed writes, published to Apache Iggy, is planned. It is off. The shape of the record is on the Feed page. Today a program reads with find, or tails local.oplog.rs on a replica set.

Where the files are

PathWhat it is
kova.tomlPort, data directory, security, replication, sharding.
data/Pages, the write-ahead log, and replica logs for this process.
~/.local/bin/kovaThe server, after the install.
~/.local/bin/kovadumpBackup and restore. It talks to a server that is already running.
~/.local/lib/libkova.soThe ODBC driver on Linux.

The engineering notes stay in docs/ inside the repository. This site is the guide for people running the server.