{"id":37124404,"url":"https://github.com/berylyvos/yojoudb","last_synced_at":"2026-01-14T14:23:01.070Z","repository":{"id":168253212,"uuid":"643839622","full_name":"berylyvos/yojoudb","owner":"berylyvos","description":"An embeddable, fast and persistent key-value storage engine based on Bitcask.","archived":false,"fork":false,"pushed_at":"2024-03-20T13:44:22.000Z","size":173,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-03-20T14:51:54.161Z","etag":null,"topics":["bitcask","database","embeddable-database","golang","kv-store","log-structured","write-ahead-log"],"latest_commit_sha":null,"homepage":"","language":"Go","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/berylyvos.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}},"created_at":"2023-05-22T09:07:39.000Z","updated_at":"2023-10-04T15:59:08.000Z","dependencies_parsed_at":"2024-03-13T16:52:57.464Z","dependency_job_id":null,"html_url":"https://github.com/berylyvos/yojoudb","commit_stats":null,"previous_names":["berylyvos/yojoudb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/berylyvos/yojoudb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berylyvos%2Fyojoudb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berylyvos%2Fyojoudb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berylyvos%2Fyojoudb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berylyvos%2Fyojoudb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berylyvos","download_url":"https://codeload.github.com/berylyvos/yojoudb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berylyvos%2Fyojoudb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28422815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bitcask","database","embeddable-database","golang","kv-store","log-structured","write-ahead-log"],"created_at":"2026-01-14T14:23:00.163Z","updated_at":"2026-01-14T14:23:01.027Z","avatar_url":"https://github.com/berylyvos.png","language":"Go","readme":"# yojoudb\nAn embeddable, fast and persistent key-value storage engine based on Bitcask.\n\n## Getting Started\n\n### Basic Example\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/berylyvos/yojoudb\"\n)\n\nfunc main() {\n\t// specify the options\n\toptions := yojoudb.DefaultOptions\n\n\t// open a database\n\tdb, err := yojoudb.Open(options)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer func() {\n\t\t_ = db.Close()\n\t}()\n\n\t// put a key\n\tkey := []byte(\"hello\")\n\tif err = db.Put(key, []byte(\"yojoudb\")); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// get a key\n\tval, err := db.Get(key)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tprintln(string(val))\n\n\t// delete a key\n\tif err = db.Delete(key); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// create a batch\n\tbatch := db.NewBatch(yojoudb.DefaultBatchOptions)\n\n\t// batch put keys/values\n\tfor i := 0; i \u003c 100; i++ {\n\t\t_ = batch.Put([]byte(fmt.Sprintf(\"#%d\", i)), []byte(fmt.Sprintf(\"yojoudb-%d\", i)))\n\t}\n\n\t// commit the batch\n\t_ = batch.Commit()\n\n\t// create an iterator\n\titer := db.NewIterator(yojoudb.DefaultIteratorOptions)\n\tdefer iter.Close()\n\t// iterate over all data\n\tfor ; iter.Valid(); iter.Next() {\n\t\tv, _ := iter.Value()\n\t\tprintln(string(v))\n\t}\n}\n```\n\n## Benchmarks\n\nWe compared how well yojoudb performs in **random writes** and **random point lookups** against several high-performing Golang-based key-value stores using the benchmarking tool [pogreb-bench](https://github.com/akrylysov/pogreb-bench).\n\n### Performance Metrics\n\n| Engine                                           | PUT                                | GET                                 | put + get | file size | peak sys mem |\n|--------------------------------------------------|------------------------------------|-------------------------------------|-----------|-----------|--------------|\n| [yojoudb](https://github.com/berylyvos/yojoudb)  | 13.771s  \u0026nbsp;\u0026nbsp; 145229 ops/s | 2.163s \u0026nbsp;\u0026nbsp;   924817 ops/s  | 15.934s   | 782.15MB  | 1.31GB       |\n| [badger](https://github.com/dgraph-io/badger)    | 8.813s   \u0026nbsp;\u0026nbsp; 226930 ops/s | 4.939s  \u0026nbsp;\u0026nbsp;   404921 ops/s | 13.752s   | 250.95MB  | 3.60GB       |\n| [pebble](https://github.com/cockroachdb/pebble)  | 13.594s  \u0026nbsp;\u0026nbsp; 147125 ops/s | 4.844s  \u0026nbsp;\u0026nbsp;   412882 ops/s | 18.438s   | 229.16MB  | 446.60MB     |\n| [goleveldb](https://github.com/syndtr/goleveldb) | 25.199s  \u0026nbsp;\u0026nbsp;  79367 ops/s | 6.956s \u0026nbsp;\u0026nbsp;   287539 ops/s  | 32.155s   | 714.31MB  | 529.79MB     |\n| [bbolt](https://github.com/etcd-io/bbolt)        | 84.245s  \u0026nbsp;\u0026nbsp;  23740 ops/s | 1.555s \u0026nbsp;\u0026nbsp;   1286247 ops/s | 85.800s   | 1.03GB    | 481.17MB     |\n\n### Parameters\n\n| key nums  | key size | val size  | concurrency |\n|-----------|----------|-----------|-------------|\n| 2000000   | 16 ~ 64  | 128 ~ 512 | 5           |\n\n## In-memory Table\n\nFor yojoudb, we use [ART](https://github.com/plar/go-adaptive-radix-tree)(Adaptive Radix Tree) as the default in-memory table. Alternatively, other index types (B-tree, skiplist) can be specified by `yojoudb.DefaultOptions.IndexType` (`IndexBTree`, `IndexART`, `IndexSKL`).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberylyvos%2Fyojoudb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberylyvos%2Fyojoudb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberylyvos%2Fyojoudb/lists"}