{"id":50216039,"url":"https://github.com/devvspaces/bitcask-go","last_synced_at":"2026-05-26T09:03:15.625Z","repository":{"id":354079283,"uuid":"1221322332","full_name":"devvspaces/bitcask-go","owner":"devvspaces","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-27T02:14:37.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-27T04:17:57.511Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devvspaces.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-04-26T03:33:10.000Z","updated_at":"2026-04-27T02:14:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/devvspaces/bitcask-go","commit_stats":null,"previous_names":["devvspaces/bitcask-go"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devvspaces/bitcask-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvspaces%2Fbitcask-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvspaces%2Fbitcask-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvspaces%2Fbitcask-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvspaces%2Fbitcask-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devvspaces","download_url":"https://codeload.github.com/devvspaces/bitcask-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devvspaces%2Fbitcask-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33512333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"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":[],"created_at":"2026-05-26T09:03:11.948Z","updated_at":"2026-05-26T09:03:15.619Z","avatar_url":"https://github.com/devvspaces.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitcask Simple Key-Value Store database in Golang\n\nhttps://riak.com/assets/bitcask-intro.pdf\n\n## Goals\n\n1. DB Write - store data in file\n2. DB Read - be able to read data\n3. Handle file compaction\n4. Handle segment merging\n5. frequently writing hashmap into disk for faster reloading when database restarts\n\n## Socket communication protocol\n\n### Operations\n\n1. get key\n2. put key=value\n3. delete key\n\nformat:\n`[OPCODE][KEY SIZE][KEY][VALUE SIZE][VALUE]`\n`[1][1][2][any size max 65,535 bytes]`\n\n### OPCODE\n\nWe could represent op codes with 1 byte\n\n1. GET -\u003e 0\n2. PUT -\u003e 1\n3. DELETE -\u003e 2\n\n### KEY SIZE\n\nWe would represent our key size with 1 byte giving us a maximum of key size of 255 bytes\n\n### VALUE SIZE\n\nWe would represent our data length with 2 bytes giving us a maximum of approximately 64KiB of single data write\n\n1 Byte = 8 bits\n2 Byte = 16 bits\n(2^16 - 1) = 0 - 65,535\n\n### VALUE\n\nwe can read this based on the data length\n\nNote: we can improve this protocol later\n\n## Database File Format\n\nSEGMENT would be in binary to save space and for easy write\n\nSEGMENT FILE:\ntstamp|key_size|value_sz|key|value\n\nMEM MAP: Memory map\nkey -\u003e file_id|tstamp|value_sz|value_pos\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevvspaces%2Fbitcask-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevvspaces%2Fbitcask-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevvspaces%2Fbitcask-go/lists"}