Changelog and roadmap

Watcher, UDP, replication and roles

Entries D37 to D41: the watcher, UDP transport, faster logins, synchronous replication, replication v0, write-through WAL, roles.

Unreleased version (Stage 0), section Added. Newest first.

  • raftdb-watch (D41): checks the server every few seconds (login, ping, canary write, status page, disk, other nodes), opens an incident only after several bad rounds, restarts or runs the cleanup command when that is basic and safe (restart budget, cooldown, verification, never touches data), and reports every step to a file, a command and a plain-HTTP webhook; status page; --once for cron. Client::connect_limited. 21 tests + a real systemd test on test server A.
  • UDP v2 (D40): messages up to 16 datagrams (about 22 KB) both ways with selective re-sending (NACK), parallel reply lanes, SHA-256 with the CPU's SHA extensions (portable code is the reference), 4 MB socket buffers, TCP+UDP port-pair search for port 0. With 1,024 clients UDP is 1.1-1.56x TCP with 2-3x lower p99 (test server A loopback); 0.75-1.0x with 1-8 clients. 12 more tests. portable feature on raftdb-proto / raftdb-server.
  • UDP transport v1 (D40): --udp, authenticated datagram sessions (raftdb_proto::udp, raftdb_proto::sha moved from raftdb-server), UdpClient and the hybrid Conn with automatic TCP fallback, UdpSession request, TOO_BIG error; raftdb-bench closed can run over TCP or UDP with any client count. 10 tests. Not yet faster than TCP on loopback (see D40).
  • Faster logins: PBKDF2 with precomputed HMAC pad states (about 2x) and a fast-auth cache of recently verified credentials (a reconnect no longer costs about 255 ms of CPU); passwordChecks in GET /v1/server. 1 test.
  • Benchmark runner targets raftdb-test server B and postgres-test server B (servers hosted on test server B, client on this PC through SSH tunnels).
  • Synchronous replication (D39): --sync-replicas N, --sync-timeout-ms, request Ack, sync object in GET /v1/server; p50 write latency 143 -> 304 us with one replica. 2 tests + 1 measurement.
  • Replication v0 (D38): --replica-of, log shipping per shard (Follow/Log/Resync, Catalog), read-only replicas with byte-identical logs, resync after a primary checkpoint, POST /v1/promote, error code 12; Table::apply_replicated, Wal::wait_durable_beyond, tail_crc. 7 tests.
  • JSON reader accepts UTF-16 surrogate pairs in \uXXXX escapes (found by the C# connector); unpaired surrogates are refused. 1 test.
  • Connectors: specification and conformance scenarios, conformance driver; raftdb-client crate extracted from raftdb-server with scan/scan_sql iterators and connect_str. 1 test. Python, PHP, Node.js, Go, Java and C# connectors.
  • Protocol request GetJson (0x0E): read a row as JSON text over the binary protocol; Client::get_json. YCSB binding for the binary protocol. 1 test.
  • raftdb-bench closed: YCSB-shaped closed loop (8 clients, one request in flight, ten 100-byte fields, durable writes) over the binary protocol.
  • Windows write-through WAL (D37): durable inserts in the closed loop 8.7k -> 30.8k ops/s, p50 825 -> 252 us; open_log_file, Wal::open_with, Wal::open_storage_through, Table::open_storage_through. 2 tests.
  • SQL column lists (SELECT a, b.c), raftdb_exec::json::{write, project}. 2 tests.
  • Roles: --user NAME:PASSWORD:readonly|readwrite|admin[@DATABASE], enforced over HTTP and the binary protocol (FORBIDDEN = 11), listings filtered per account, whoami grants. 2 tests.
  • Server checkpoints: logs that are mostly history are rewritten at start (--checkpoint-min-mb, default 8), and POST .../tables/{t}/checkpoint does it on demand; Table::log_bytes/live_bytes/checkpoint_if_wasteful. 2 tests.
  • Drop and rename databases and tables (HTTP), with a required confirm of the exact name for drops; per-table thread ownership so files are closed before deleting or renaming; main and main.documents protected. 1 test.