{"id":16797091,"url":"https://github.com/jdockerty/log-structured-db-engine","last_synced_at":"2025-03-17T03:44:33.748Z","repository":{"id":115787064,"uuid":"492307818","full_name":"jdockerty/log-structured-db-engine","owner":"jdockerty","description":"Toy implementation of a Log Structured Database Engine, inspired by DDIA.","archived":false,"fork":false,"pushed_at":"2022-07-24T15:25:53.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T13:29:23.569Z","etag":null,"topics":["ddia","log-structured","toy-project"],"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/jdockerty.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-14T19:30:33.000Z","updated_at":"2022-05-14T21:16:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c98e9432-8687-4513-84c6-1937b0faca07","html_url":"https://github.com/jdockerty/log-structured-db-engine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdockerty%2Flog-structured-db-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdockerty%2Flog-structured-db-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdockerty%2Flog-structured-db-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdockerty%2Flog-structured-db-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdockerty","download_url":"https://codeload.github.com/jdockerty/log-structured-db-engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971157,"owners_count":20376784,"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","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":["ddia","log-structured","toy-project"],"created_at":"2024-10-13T09:21:07.359Z","updated_at":"2025-03-17T03:44:33.721Z","avatar_url":"https://github.com/jdockerty.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Log Structured Database Engine\n\nA toy implementation of a log structured database engine, inspired from [Designing Data Intensive Applications](https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/) (DDIA) book by Martin Kleppmann.\n\n\nMartin shows that you can create the world's simplest database using the follow lines of `bash`\n\n```bash\ndb_set() {\n    echo \"$1,$2\" \u003e\u003e database\n}\n\ndb_get() {\n    grep \"^$1,\" database | sed -e \"s/^$1,//\" | tail -n 1\n}\n```\n\nThis is my own not-so-concise implementation in Go, used to solidify the concepts that Martin portrays. Comments are provided for explanation and understanding.\n\n### Example\n\nBuild using `go build cmd/db.go` and then run\n\n```bash\n./db --set \"1, foo\"\n./db --set \"2, bar\"\n./db --get \"1\" # outputs 'foo'\n./db --set \"1, bar\" # updates ID 1 to bar\n./db --get \"1\" # outputs 'bar'\n./db --disable-index --get \"1\" # also outputs 'bar', but with a full scan returning the latest record\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdockerty%2Flog-structured-db-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdockerty%2Flog-structured-db-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdockerty%2Flog-structured-db-engine/lists"}