Skip to content

Instantly share code, notes, and snippets.

View emcee21's full-sized avatar

Michael Cervantes emcee21

  • San Francisco, CA
View GitHub Profile
@emcee21
emcee21 / 2way.md
Last active January 19, 2026 03:05
Reference Implementation of 2QAY

2WAY Reference Implementation Design (Corrected)

Overview

This plan outlines a modular Rust reference implementation of the 2WAY protocol based on the actual specification. 2WAY is an integrated enforcement kernel built from managers with a single mutation pipeline, with services sitting above it, and apps defining schemas that the kernel enforces. The system is transport-agnostic and defines correctness at the state and validation layer, not at the transport layer.

Core Architecture Principles

  1. Enforcement Kernel: Central kernel with managers that enforce schemas defined by apps
  2. Single Mutation Pipeline: Ordered, append-only write pipeline with global_seq for convergence