Last 12 weeks · 30 commits
2 of 6 standards met
Adds KV Connect protocol version 4: a multiplexed watch channel. Today every call opens its own long-lived streaming request, so a client watching many key sets holds many concurrent streams, and every reconnect re-delivers state the client already has. Version 4 multiplexes all watches for a database over one WebSocket connection: Keys are added/removed in-band (), so the watched set changes without new connections. The message carries an optional baseline (last seen versionstamp, or "absent"); the server only sends state that differs from it. Re-adding all keys with their baselines after a reconnect makes resumption lossless and duplicate-free. Server messages are key-tagged and sparse (only changed keys), unlike the positional v3 . gains optional WebSocket support via defaulted methods, so this is semver-compatible: existing transports keep compiling, keep advertising , and keep the per-watch v3 path. Only transports that implement negotiate v4. Nothing changes for any current consumer until its transport opts in. The server gains the endpoint (axum ws) behind the same auth, diffs updates against per-client known state, enforces a per-channel key cap (1024, close code 1008), and pings every 5s. Metadata negotiation now prefers v4. The stream contract is identical under both protocols: first item is a full snapshot, later items mark untouched keys , in request key order — covered by integration tests that exercise the channel path (shared channel across watches, initial snapshots, per-key updates, re-subscription) next to the existing v3 test. Spec for the new endpoint and messages is in ("Watch Channel (version 4)").
I am exploring if I can use the self hosted Deno KV. At least at the moment we cannot use Deno Deploy, we have our own kubernetes clusters. I would like to use Deno + Deno KV in a new microservice. However, there are some concerns how to scale Deno KV. (I should add that it is a high traffic, read heavy use case) How do other approach this? Would it be possible to have Deno KV running in several pods that are backed with a NFS, e.g., CephFS?
This adds the missing AtomicOperation.mutate() type. Also, it moves the referenced KvMutation type to the same file and adds missing docs. Not sure if this is right. The prose for the docs are copied from the official docs for KvMutation and AtomicOperation.mutate(). However, there's no exported type so can't link to it with - similar references in other methods like seem to be removed. Also, couldn't figure out how to replicate the same prose wrap formatting. Fixes #121.
Repository: denoland/denokv. Description: A self-hosted backend for Deno KV Stars: 653, Forks: 35. Primary language: TypeScript. Languages: TypeScript (53.7%), Rust (45.9%), Shell (0.3%), Dockerfile (0.1%). License: MIT. Homepage: https://deno.com/kv Topics: database, deno, kv, sqlite. Latest release: 0.14.0 (2mo ago). Open PRs: 1, open issues: 29. Last activity: 2mo ago. Community health: 37%. Top contributors: piscisaureus, lucacasonato, losfair, johnspurlock-skymethod, bartlomieju, littledivy, arnauorriols, crowlKats, mmastrac, devsnek and others.