{"id":15655453,"url":"https://github.com/healeycodes/bitcask-lite","last_synced_at":"2025-08-29T17:26:01.679Z","repository":{"id":65264153,"uuid":"523105353","full_name":"healeycodes/bitcask-lite","owner":"healeycodes","description":"📚 A log-structured hash table database. Speedy K/V store for datasets larger than memory.","archived":false,"fork":false,"pushed_at":"2022-08-14T21:50:48.000Z","size":58,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T14:52:14.581Z","etag":null,"topics":["bitcask","database","log-structured","riak"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/healeycodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-09T20:52:49.000Z","updated_at":"2024-12-10T05:48:02.000Z","dependencies_parsed_at":"2023-01-16T01:31:07.040Z","dependency_job_id":null,"html_url":"https://github.com/healeycodes/bitcask-lite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/healeycodes/bitcask-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fbitcask-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fbitcask-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fbitcask-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fbitcask-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/healeycodes","download_url":"https://codeload.github.com/healeycodes/bitcask-lite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fbitcask-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272732491,"owners_count":24984171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bitcask","database","log-structured","riak"],"created_at":"2024-10-03T12:59:17.470Z","updated_at":"2025-08-29T17:26:01.609Z","avatar_url":"https://github.com/healeycodes.png","language":"Go","readme":"# bitcask-lite\n\u003e My blog post: [Implementing Bitcask, a Log-Structured Hash Table](https://healeycodes.com/implementing-bitcask-a-log-structured-hash-table/)\n\nA key/value database and server. Partial implementation of the Bitcask paper: https://riak.com/assets/bitcask-intro.pdf\n\n- Low latency per item read or written\n- Handles datasets larger than RAM\n- Human readable data format\n- Small specification\n- Human-readable data format\n- Just uses the Go standard library\n\n## Spec\n\nKeys are kept in-memory and point to values in log files. Log files are append-only and contain any number of adjacent items with the schema: `expire, keySize, valueSize, key, value,`.\n\nAn item with a key of `a` and a value of `b` that expires on 10 Aug 2022 looks like this in a log file:\n\n```text\n1759300313415,1,1,a,b,\n```\n\nNot yet implemented: checksums, log file merging, hintfiles.\n\n### HTTP API\n\n- GET: `/get?key=a`\n- POST: `/set?key=b\u0026expire=1759300313415`\n  - HTTP body is read as the value\n  - `expire` is optional (default is infinite)\n- DELETE: `/delete?key=c`\n\n## Performance\n\nThe key store is a concurrent map with locking map shards.\n\nReading a value requires a single disk seek.\n\nOnly one goroutine may write to the the active log file at a time so read-heavy workloads are ideal.\n\n## Tests\n\nTests perform real I/O to disk and generate new files every run.\n\n```bash\npip install -r requirements.txt # (it just uses the requests library)\npython e2e.py # run e2e tests covering the main function\ngo test ./... # unit tests\n```\n\n## Deployment\n\nAs this is fairly standard Go application: set `PORT`, `DATABASE_DIR`, and run.\n\nIt deploys to `railway.app` with zero configuration (presumably most platforms-as-a-service as well).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fbitcask-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhealeycodes%2Fbitcask-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fbitcask-lite/lists"}