This document describes the high-level architecture of OtterDB.
OtterDB is a locally distributed key-value database. It's not replicated across nodes, as the main goal is not duplication. It's a hobby project aimed at learning the basic underlying workings of databases. Its aim is not to be a production-ready database.
graph TD;
Client->>+OtterDB: SET `key` `value`
Client->>+OtterDB: GET `key`
OtterDB->>-Client: `value`
On a high level OtterDB is a simple key-value store. The client can perform typical commands like GET
and SET
on the instance.
Keys are string
while the values can be anything, OtterDB will manage the value type internally.
A more detailed but still high-level flow would be:
The cluster
is the component managing multiple nodes. It has a public facing API which allows the clients to perform
actions without worrying about the underlying nodes.
A node receives inputs from the cluster and perform the actual actions, like writing data to the disk.
Executables for public-facing features, including the API and the REPL.
Includes code used internally, like the core data structures.
Includes code that should be exposed to anyone importing the library.
While performance is not a core objective, everything is done also thinking about that.
Benchmarks cover every part of the application and they're tracked to avoid regressions.