{"id":15031360,"url":"https://github.com/bytestorage/flydb","last_synced_at":"2025-04-12T12:39:48.863Z","repository":{"id":153148180,"uuid":"622050087","full_name":"ByteStorage/FlyDB","owner":"ByteStorage","description":"The high-performance kv storage engine based on bitcask paper made in golang","archived":false,"fork":false,"pushed_at":"2024-12-18T10:40:36.000Z","size":1743,"stargazers_count":1293,"open_issues_count":37,"forks_count":102,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-05T10:05:04.066Z","etag":null,"topics":["database","flydb","go","golang","key-value","kv-store","raft","redis"],"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/ByteStorage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2023-04-01T01:30:37.000Z","updated_at":"2025-03-12T03:11:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e06c29d5-2b08-4bb1-88e1-74daf4e4d2f4","html_url":"https://github.com/ByteStorage/FlyDB","commit_stats":{"total_commits":557,"total_committers":15,"mean_commits":37.13333333333333,"dds":0.578096947935368,"last_synced_commit":"acd97fb1c4ed27c2cb92c5e501017263a110c8cb"},"previous_names":["bytestorage/flydb","qishenonly/flydb"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteStorage%2FFlyDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteStorage%2FFlyDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteStorage%2FFlyDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteStorage%2FFlyDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ByteStorage","download_url":"https://codeload.github.com/ByteStorage/FlyDB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248568273,"owners_count":21125996,"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":["database","flydb","go","golang","key-value","kv-store","raft","redis"],"created_at":"2024-09-24T20:15:31.040Z","updated_at":"2025-04-12T12:39:48.833Z","avatar_url":"https://github.com/ByteStorage.png","language":"Go","readme":"\u003cimg src=\"./assets/FlyDB-logo.png\" alt=\"FlyDB-logo\" style=\"display: block; margin: 0 auto; width: 45%;\" /\u003e\n\n\n\n![GitHub top language](https://img.shields.io/github/languages/top/ByteStorage/flydb)   [![Go Reference](https://pkg.go.dev/badge/github.com/ByteStorage/flydb)](https://pkg.go.dev/github.com/ByteStorage/flydb)   ![LICENSE](https://img.shields.io/github/license/ByteStorage/flydb)   ![GitHub stars](https://img.shields.io/github/stars/ByteStorage/flydb)   ![GitHub forks](https://img.shields.io/github/forks/ByteStorage/flydb)   [![Go Report Card](https://goreportcard.com/badge/github.com/qishenonly/flydb)](https://goreportcard.com/report/github.com/qishenonly/flydb) ![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/ByteStorage/FlyDB)![GitHub contributors](https://img.shields.io/github/contributors/ByteStorage/FlyDB)\n\nEnglish | [简体中文](https://github.com/ByteStorage/flydb/blob/master/README_CN.md)\n\n\n**FlyDB** aims to serve as an alternative to in-memory key-value storage (such as **Redis**) in some cases, aiming to strike a balance between performance and storage cost. It does this by optimizing resource allocation and using cost-effective storage media. By intelligently managing data, **FlyDB** ensures efficient operations while minimizing storage costs. It provides a reliable solution for scenarios that require a balance between performance and storage costs.\n\n## 📚 What is FlyDB ?\n\n**FlyDB** is a high-performance key-value (KV) storage engine based on the efficient bitcask model. It offers fast and reliable data retrieval and storage capabilities. By leveraging the simplicity and effectiveness of the bitcask model, **FlyDB** ensures efficient read and write operations, resulting in improved overall performance. It provides a streamlined approach to storing and accessing key-value pairs, making it an excellent choice for scenarios that require fast and responsive data access. **FlyDB's** focus on speed and simplicity makes it a valuable alternative for applications that prioritize performance while balancing storage costs. \n\n## 🏁  Fast Start: FlyDB \n\nYou can install FlyDB using the Go command line tool:\n\n```GO\ngo get github.com/ByteStorage/FlyDB@v1.1.0\n```\n\nOr clone this project from github:\n\n```bash\ngit clone https://github.com/ByteStorage/FlyDB.git\n```\n\n## 🖥 How to use FlyDB ?\n\n### Used by Golang SDK\n\nHere is a simple example of how to use the Linux version:\n\n\u003e See flydb/examples for details.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/ByteStorage/FlyDB/flydb\"\n\t\"github.com/ByteStorage/FlyDB/config\"\n)\n\nfunc main() {\n    \toptions := config.DefaultOptions\n\toptions.DirPath = \"/tmp/flydb\"\n\tdb, _ := flydb.NewFlyDB(options)\n\n    \terr := db.Put([]byte(\"name\"), []byte(\"flydb-example\"))\n    \tif err != nil {\n        \tfmt.Println(\"Put Error =\u003e \", err)\n    \t}\n\n\n\tval, err := db.Get([]byte(\"name\"))\n\tif err != nil {\n\t\tfmt.Println(\"Get Error =\u003e \", err)\n\t}\n    \tfmt.Println(\"name value =\u003e \", string(val))\n    \n    \n    \terr := db.Delete([]byte(\"name\"))\n    \tif err != nil {\n        \tfmt.Println(\"Delete Error =\u003e \", err)\n    \t}\n}\n```\n### Used By Shell Command\n\n```shell\n./build.sh\n```\n\n### Used By Docker\n\n```shell\ndocker run -d --name flydb-server --network=host -p 8999:8999 bytestorage/flydb:v1.0\n```\n\n### Used By Kubernetes\n\n```shell\nkubectl apply -f kubernetes/flydb-namespace.yaml\nkubectl apply -f kubernetes/flydb-deployment.yaml\nkubectl apply -f kubernetes/flydb-service.yaml\nkubectl wait --for=condition=ready pod -l app=flydb -n flydb-system\nkubectl port-forward svc/flydb-service -n flydb-system 8999:8999\n```\n\n**When install flydb server by shell/docker/kubernetes, you can use the flydb-cli to connect the flydb server.**\n\n```shell\n./bin/flydb-client 127.0.0.1:8999\"\n```\n\n## 🚀 Performance test\n\nWe did a simple performance test of the V1.0.4 version of FlyDB. This test mainly focused on reading and writing large-scale data, and we selected 500,000 random data for testing.\n\nThrough testing, we found that in V1.0.4, with 500,000 data:\n\n#### BTree Index\n\nPUT performance: 572.265968ms\n\nGET performance: 355.943926ms\n\n\u003cimg src=\"./assets/v1.0.4-btree\" alt=\"v1.0.4-btree\" style=\"width: 33%;\"  /\u003e\n\n#### ARTree Index\n\nPUT performance: 569.610614ms\n\nGET performance: 297.781977ms\n\n\u003cimg src=\"./assets/v1.0.4--art\" alt=\"v1.0.4-art\" style=\"width: 33%;\"  /\u003e\n\n\n\nIf you have a better way to optimize read and write performance, please submit your 'pr'.\n\n## 📢 Benchmark test\n\nWe compared the results of a benchmark test using FlyDB V1.0.4 with other kv databases written in golang on the market and found that the read/write performance test results exceeded most open source kv databases.\n\n\u003e See in detail: https://github.com/ByteStorage/contrast-benchmark\n\n```\ngoos: linux\ngoarch: amd64\npkg: contrast-benchmark\ncpu: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz\n\nBenchmark_PutValue_FlyDB\nBenchmark_PutValue_FlyDB-16        \t   95023\t     13763 ns/op\t    2904 B/op\t      16 allocs/op\nBenchmark_GetValue_FlyDB\nBenchmark_GetValue_FlyDB-16    \t \t 2710143\t     463.5 ns/op\t     259 B/op\t       5 allocs/op\nBenchmark_PutValue_Badger\nBenchmark_PutValue_Badger-16       \t   59331\t     22711 ns/op\t    6006 B/op\t      48 allocs/op\nBenchmark_GetValue_Badger\nBenchmark_GetValue_Badger-16       \t  158686\t      7686 ns/op\t   10844 B/op\t      42 allocs/op\nBenchmark_PutValue_BoltDB\nBenchmark_PutValue_BoltDB-16       \t   32637\t     56519 ns/op\t   21009 B/op\t     123 allocs/op\nBenchmark_GetValue_BoltDB\nBenchmark_GetValue_BoltDB-16       \t  655971\t     24327 ns/op\t     723 B/op\t      26 allocs/op \nBenchmark_PutValue_GoLevelDB\nBenchmark_PutValue_GoLevelDB-16    \t   71931\t     14709 ns/op\t    2226 B/op\t      12 allocs/op\nBenchmark_GetValue_GoLevelDB\nBenchmark_GetValue_GoLevelDB-16    \t  500736\t      2520 ns/op\t    1278 B/op\t      15 allocs/op\nBenchmark_PutValue_NutsDB\nBenchmark_PutValue_NutsDB-16       \t   78801\t     13582 ns/op\t    3242 B/op\t      22 allocs/op\nBenchmark_GetValue_NutsDB\nBenchmark_GetValue_NutsDB-16       \t  373124\t      5702 ns/op\t    1392 B/op\t      14 allocs/op\nBenchmark_PutValue_RoseDB\nBenchmark_PutValue_RoseDB-16       \t   69776\t     19166 ns/op\t    6242 B/op\t      59 allocs/op\nBenchmark_GetValue_RoseDB\nBenchmark_GetValue_RoseDB-16       \t 4155183\t     298.0 ns/op\t     167 B/op\t       4 allocs/op\nBenchmark_PutValue_Pebble\nBenchmark_PutValue_Pebble-16       \t   91304\t     21877 ns/op\t    2720 B/op\t       8 allocs/op\nBenchmark_GetValue_Pebble\nBenchmark_GetValue_Pebble-16       \t   66135\t     15837 ns/op\t   17193 B/op\t      22 allocs/op\nPASS\n```\n\n## 🔮 How to contact us ?\n\nIf you have any questions and want to contact us, you can contact our developer team, we will reply to your email:\n\nTeam Email: bytestoragecommunity@gmail.com\n\nOr add my wechat, invite you to enter the project community, and code masters together to exchange learning.\n\n\u003e Add wechat please comment Github\n\n\u003cimg src=\"./assets/vx.png\" alt=\"vx\" style=\"width: 33%;\"  /\u003e\n\n## ✅ TODO List\n\n- [ ] Extended data structure support: including but not limited to string, list, hash, set, etc.\n- [ ] Compatible with Redis protocols and commands.\n- [x] Support http services.\n- [x] Support tcp services.\n- [x] Log aggregation\n- [ ] Data backup\n- [ ] Distributed cluster model.\n\n## 📜 Version update doc\n\n\u003e See in detail: [Version-update-document](https://github.com/ByteStorage/FlyDB/blob/master/docs/version_update.md)\n\n## 👀 Contributor\n\n\u003ca href=\"https://github.com/ByteStorage/FlyDB/graphs/contributors\"\u003e\n\n\u003cimg src=\"https://contrib.rocks/image?repo=ByteStorage/FlyDB\" /\u003e \n\u003c/a\u003e\n\n## 📝 How to contribute ?\n\nIf you have any ideas or suggestions for FlyDB, please feel free to submit 'issues' or' pr 'on GitHub. We welcome your contributions!\n\n\u003e Please refer to the complete specification procedure：[CONTRIBUTEING](https://github.com/ByteStorage/flydb/blob/master/CONTRIBUTING.md)\n\n## 📋 Licence\n\nFlyDB is released under the Apache license. For details, see LICENSE file.\n\n## Thanks To JetBrains\n\n\u003e Thanks to `JetBrains` for the free open source license.  \n\n\u003cimg src=\"./assets/thanks-jetbrains.png\" alt=\"FlyDB-logo\" style=\"display: block; margin: 0 auto; width: 30%;\" /\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytestorage%2Fflydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytestorage%2Fflydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytestorage%2Fflydb/lists"}