{"id":16931210,"url":"https://github.com/schmichael/db09","last_synced_at":"2025-03-21T03:26:24.525Z","repository":{"id":25160478,"uuid":"28583337","full_name":"schmichael/db09","owner":"schmichael","description":"2009 \u003e 9000","archived":false,"fork":false,"pushed_at":"2015-04-20T16:52:23.000Z","size":272,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T00:13:12.280Z","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/schmichael.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}},"created_at":"2014-12-29T06:54:25.000Z","updated_at":"2015-04-20T16:52:25.000Z","dependencies_parsed_at":"2022-08-23T22:00:21.693Z","dependency_job_id":null,"html_url":"https://github.com/schmichael/db09","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/schmichael%2Fdb09","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fdb09/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fdb09/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmichael%2Fdb09/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schmichael","download_url":"https://codeload.github.com/schmichael/db09/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244730156,"owners_count":20500372,"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":[],"created_at":"2024-10-13T20:43:28.215Z","updated_at":"2025-03-21T03:26:24.496Z","avatar_url":"https://github.com/schmichael.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# db09\n\nThe dumbest possible distributed key/value store.\n\n* Eventually consistent via read repairs\n* Timestamp based versioning (LWW - last write wins)\n* Token ring (configurable)\n* Configurable replication level (RL)\n* Max useful nodes = (Tokens ⨉ RL)\n\n## wat\n\n2009 was a great year in open source distributed databases. Facebook had tossed\nCassandra over the wall a year earlier into the feeding frenzy caused by\nAmazon's Dynamo paper back in 2007. The first version of Riak was released just\nin time to save those people who had learned Erlang because of CouchDB to dodge\nCassandra and stay safely in Erlang's loving embrace (since staying on CouchDB\nobviously wasn't going to work.) MongoDB's initial release was in 2009 as well\nwhich promised web scale with secondary indexes and documents and memory maps\nand benchmarks.\n\n**2009 was great.** You no longer had to employ one-operator-per-node to run a\nHadoop cluster in order to be Web Scale\u003csup\u003etm\u003c/sup\u003e.\n\nOf course none of it worked well, but that was all part of the fun! Everyone\ngot to spend endless hours tuning the JVM, debugging vector clocks, cursing\ncompactions, discovering what \"durability\" meant, and becoming heros in their\nchosen kingdoms.\n\nNow the startups those heros worked for are acquired, failed, or just flailing.\nThe databases are almost following through on the promises they were making\nback then. All the action is in Java Script or containers or service\norchestration.\n\n**Enter db09.**\n\n## Weaknesses\n\nBasically everything. This is a toy. Never use it for anything you care about.\n\nHere are some specific gotchas:\n\n* Tokens are generated using a FNV-1a hash\u003csup\u003e1\u003c/sup\u003e which is a\n  non-cryptographic hash.  Attackers can trivially DoS a node by generating\n  keys which hash to the same token.\n* The \"backend\" is currently an in-memory map (lol @ \"mmap\") so there's 0\n  durability.\n* You really need to bring up 1 node at a time to avoid ring ownership\n  conficts... I mean it may not work at all either way so do what you want.\n* No tests. Or maybe I'll add some and forget to remove this, but I doubt it.\n* No tunables. To be fully 2009 compliant there should be dozens of poorly\n  documented knobs which must be configured precisely for anything to work at\n  all. Defaults should be provided and completely wrong for all use cases.\n\n### Footnotes\n\n1. After years of research, decades of of benchmarking, and centuries of\n   microoptimizing assembly for every known CPU, I chose FNV-1a because it was\n   in the Go standard library and sounded more professional than \"CRC32\". I\n   also chop it in half which probably doubles the security.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmichael%2Fdb09","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschmichael%2Fdb09","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmichael%2Fdb09/lists"}