{"id":40121477,"url":"https://github.com/aalhour/beachdb","last_synced_at":"2026-02-08T17:01:07.357Z","repository":{"id":331647396,"uuid":"1127968716","full_name":"aalhour/beachdb","owner":"aalhour","description":"🏖️ 🪨 Toy distributed NoSQL database in Go","archived":false,"fork":false,"pushed_at":"2026-01-25T12:58:09.000Z","size":4242,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-27T02:39:58.494Z","etag":null,"topics":["database","distributed","go","golang","nosql","raft","storage-engine"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aalhour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-04T23:51:04.000Z","updated_at":"2026-01-13T00:24:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aalhour/beachdb","commit_stats":null,"previous_names":["aalhour/beachdb"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aalhour/beachdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2Fbeachdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2Fbeachdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2Fbeachdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2Fbeachdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aalhour","download_url":"https://codeload.github.com/aalhour/beachdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalhour%2Fbeachdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29237070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T14:18:14.570Z","status":"ssl_error","status_checked_at":"2026-02-08T14:18:14.071Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","distributed","go","golang","nosql","raft","storage-engine"],"created_at":"2026-01-19T12:36:34.141Z","updated_at":"2026-02-08T17:01:07.352Z","avatar_url":"https://github.com/aalhour.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- # BeachDB 🏖️ 🪨 --\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"art/banner.png\"/\u003e\n\u003c/p\u003e\n\n**BeachDB is a toy distributed NoSQL database. Built for learning and education, not production.**\n\nIt starts life as a small, inspectable storage engine, then deliberately grows “real-system bones”: a server API, a failure model, and a Raft-replicated core. The point isn’t to win benchmarks — it’s to understand, measure, and explain what’s actually happening.\n\n### Backstory\n\nI’ve been fond of distributed systems and databases for a long time. I wrote my first Hadoop and Apache Spark pipeline back in 2016, then went on to solve hairy stream-processing problems at Shopify, and later worked on Apache HBase at HubSpot where I helped build and operate database infrastructure on top of Kubernetes at massive scale.\n\nBeachDB is my attempt to re-learn the fundamentals by building them from scratch in Go. I’m prioritizing **simplicity, clarity, and understanding** over scalability, speed, and micro-optimizations.\n\n## Architecture\n\n- **LSM storage engine** (WAL → memtable → SSTables → compaction)\n- **Single-node API** (server wrapper for Get/Put/Delete/Scan with timeouts + backpressure)\n- **Distributed replication with Raft** (single group: leader writes + leader reads; log entry == `WriteBatch`)\n- **Inspectability-first** (dump tools + crash tests as part of the architecture)\n\n## Key features (shipped as a checklist)\n\n\u003e This list is ordered to match the build + blog sequence. I’ll tick these off as they land.\n\n### Engine (storage truth)\n- [x] **Scope + semantics contract** (snapshots, iterators, durability), see: [intro blog post](https://aalhour.com/posts/building-beachdb/)\n- [x] **WAL v1**: checksums + deterministic crash recovery (**fsync per committed batch**), see: [durability blog post](https://aalhour.com/posts/beachdb-wal-v1-milestone/)\n- [ ] **Crash-loop harness**: kill mid-write, reopen, validate invariants\n- [ ] **Memtable v1**: sorted structure + tombstones\n- [ ] **Reference-model randomized tests** (model vs implementation)\n- [ ] **SSTables v1**: immutable sorted files + `sst_dump`\n- [ ] **Merge iterators** (memtable + SSTs) + **snapshot reads** (seqno-based)\n- [ ] **Manifest/versioning** + `manifest_dump` (startup reconstruction)\n- [ ] **Read path acceleration**: block index + bloom filters + benchmark evidence\n- [ ] **Compaction v1**: one strategy, minimal knobs + amplification measurements\n- [ ] **Adversarial testing**: fault injection + fuzzing (WAL/SST decode paths)\n\n### Server (systems truth)\n- [ ] **Binary protocol** (framed) + timeouts + backpressure\n- [ ] **Load generator** + p50/p99 latency reporting\n- [ ] **Metrics/tracing hooks** that make performance explainable\n\n### Replication (distributed truth)\n- [ ] **Raft (single group)** where a log entry == serialized `WriteBatch`\n- [ ] **Deterministic apply** + restart safety\n- [ ] **Snapshotting** for fast catch-up\n\n### Sequel teaser (maybe)\n- [ ] **Tables \u0026 Regions**: table-ish encoding + scans + key-range routing (minimal, no rabbit holes)\n\n## Non-goals (by design)\n\nTo keep BeachDB small and finishable, these are intentionally out of scope for Season 1:\n\n- Production readiness, multi-year maintenance guarantees, or compatibility promises\n- Multi-writer concurrency in the engine (single-writer early on)\n- Background compaction early on (added only after invariants are rock-solid)\n- SQL, query planner, joins, secondary indexes\n- Full transactions / serializable isolation\n- Auto sharding, region split/merge, rebalancing, quorum reads, gossip/repair\n\n\u003c!-- ## Start here\n- `docs/scope.md` — what BeachDB is (and is not)\n- `docs/principles.md` — guiding principles + API style\n- `docs/architecture.md` — components + invariants\n- `bench/workloads.md` — fixed workloads for repeatable experiments\n- `docs/articles.md` — Season 1 writing plan (≤ 12 posts)\n--\u003e\n\n## Philosophy\n\n\u003e Every chapter ends with evidence: a dump tool, a crash test, a benchmark, or a diagram.\n\nSee [docs/principles.md](docs/principles.md) to see how I'm keeping this project from turning into a second job :)\n\n## License\n\nApache 2.0 (see: [LICENSE](LICENSE))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalhour%2Fbeachdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faalhour%2Fbeachdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalhour%2Fbeachdb/lists"}