DistKV: A distributed no-master key-value store — DistKV 0.52.0 documentation

# DistKV: A distributed no-master key-value store

## Rationale

Any kind of distributed storage is subject to the CAP theorem (also called “Brewer’s theorem”): you can’t get all of (global) Consistency, Availability, and Partition tolerance. The problem is that you do want all three of these.

One way around this problem is to recognize that on most KV storage systems, any given record is rarely (if ever) changed by more than one entity at the same time. Thus, a simple gossip protocol is sufficient for distributing data.

DistKV is intended to be used in a mostly-RAM architecture. There is no disk-based storage backend; snapshots and event logs are used to restore a system, if necessary.

See Protocol Overview <overview.html> for details about DistKV’s choices.

## API

DistKV offers an efficient interface to access and change data.

## Status

DistKV is in production use as the backbone of the author’s home and office automation setup.

Note that as of DistKV 0.30, multi-word paths were replaced with dotted strings. Some pieces of documentation might still reflect the old style.

- Principles of operation
  - Storage
  - Record Deletion
- The DistKV tutorial
  - Installation
  - Start the server
  - Data commands
  - Persistent storage
  - Authorization
  - Access restrictions
  - Code execution
  - Errors
  - The Python API
  - Verification
  - Data mangling
  - Dynamic configuration
- Starting DistKV
- The DistKV command
  - distkv
- DistKV’s client protocol
  - Requests
  - Replies
  - Actions
  - Examples
- DistKV’s server protocol
  - Data types
  - Common items
  - Message types
  - Timing and concurrency
  - Message graphs
  - MsgPack encoding
  - YAML encoding
- DistKV and authentication
  - Included user auth methods
  - API
- Access control
  - ACLs
  - Association
  - Putting it all together
- Code in DistKV
  - Code
  - Modules
  - Runners
- Runner types
  - Single-node runner
  - Any-node runner
  - All-node runner
- Runner configuration
  - Variables
- CallAdmin
  - Messages
- Data Model
  - ACLs
  - Helper methods and classes
- Verifying and Translating Entries
  - Verification
  - Translation
- Fixing DistKV network problems
  - Missing data
- Extending DistKV
- Plugins and related software
  - Home Assistant
  - KNX
  - 1wire
  - Inventory Management
  - Akumuli
  - Binary I/O
  - Wago I/O controllers
- Open issues
- Release history

# Indices and tables

- Index

- Module Index

- Search Page

- Glossary