kolo docsbeta

Introduction

Kolo is a set of small Go libraries for building peer-to-peer apps. Peers find each other, connect directly and keep a signed log, with no server in between.

On this page

A kolo is a circle dance: equal people, hands joined, nobody in the middle. Kolo works the same way. Each peer has its own key, finds the others by topic, connects to them directly and keeps a signed log that anyone can check. No server sits in the path of your data.

Kolo is made by Ciranda.

New here? Start with the tutorial Build a chat in your terminal: two peers on your computer, step by step, in about ten minutes.

What is in the stack

A set of small libraries, each with one job. You can use one of them on its own, or put them together.

How the pieces fit

All steps

How the libraries fit

Each library has one job. The steps follow a peer from its key to its data on other peers.

  1. kolo-id gives each peer an Ed25519 key. The public key is the peer's identity.
  2. kolo-dht and kolo-swarm find the peers on a topic and connect to them. kolo-invite lets a new peer join a group with a code.
  3. kolo-transport carries QUIC connections and kolo-secure ties each one to the peer's key. kolo-relay forwards encrypted packets between two peers with no direct path, only when your app asks it to.
  4. kolo-log keeps a signed, append-only log, kolo-codec encodes its bytes and kolo-store keeps it on disk. kolo-blobs keeps encrypted files as entries of a log, and kolo-files adds names, folders and versions on top.
  5. kolo-sync copies a log from one peer to another, kolo-kv reads a log as a key-value store, and kolo-braid merges the logs of several members into one order.
  6. Two servers you can run: kolo-node, the bootstrap node new peers join through, and kolo-pin, a pinning peer that keeps logs online as ciphertext.
  7. Live data: kolo-moq publishes tracks and subscribes to them over those connections, and a relay shares one subscription among many subscribers. kolo-media adds a catalog, a clock and playout for encoded audio and video frames. kolo-audio records, plays and resamples audio and encodes it with Opus. kolo-video captures the camera and encodes and decodes video.
  • kolo-id gives a peer its Ed25519 key.
  • kolo-dht and kolo-swarm find the peers on a topic and connect to them, over kolo-transport and kolo-secure.
  • kolo-log keeps a signed, append-only log, and kolo-store keeps it on disk.
  • kolo-sync copies a log from one peer to another, and kolo-kv reads a log as a key-value store.
  • kolo-node runs the bootstrap server that new peers join through, and kolo-relay helps two peers that cannot reach each other, only if you turn it on.
  • kolo-pin runs a pinning peer that keeps your logs available while your devices are offline, as ciphertext it cannot read.
  • kolo-moq publishes and subscribes to live tracks over those connections, and a relay shares one subscription among many subscribers. kolo-media adds a catalog, a clock and playout for encoded audio and video frames. kolo-audio lists audio devices, records and plays, resamples, and encodes audio with Opus. kolo-video lists and opens cameras and encodes and decodes VP8 and VP9.

Where to start

Status

Version 0.1, experimental. The API may change before v1.0.0. Kolo uses IPv4 only. Every page here describes code that exists today; when something is missing, the page says so.