{"id":20732865,"url":"https://github.com/montyanderson/kavy","last_synced_at":"2025-08-04T12:07:45.867Z","repository":{"id":69223927,"uuid":"115118978","full_name":"montyanderson/kavy","owner":"montyanderson","description":"🗄️ Networked in-memory key-value store.","archived":false,"fork":false,"pushed_at":"2018-01-02T23:13:55.000Z","size":18,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-24T21:44:32.845Z","etag":null,"topics":["c","cache","database","event-loop","key-value","protocol","redis","store"],"latest_commit_sha":null,"homepage":"","language":"C","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/montyanderson.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":"2017-12-22T13:44:46.000Z","updated_at":"2025-01-20T00:47:27.000Z","dependencies_parsed_at":"2023-09-15T09:03:12.866Z","dependency_job_id":null,"html_url":"https://github.com/montyanderson/kavy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/montyanderson/kavy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montyanderson%2Fkavy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montyanderson%2Fkavy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montyanderson%2Fkavy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montyanderson%2Fkavy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/montyanderson","download_url":"https://codeload.github.com/montyanderson/kavy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/montyanderson%2Fkavy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268693764,"owners_count":24291673,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","cache","database","event-loop","key-value","protocol","redis","store"],"created_at":"2024-11-17T05:22:09.645Z","updated_at":"2025-08-04T12:07:45.830Z","avatar_url":"https://github.com/montyanderson.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kavy\nNetworked in-memory key-value store, written in pure C.\n\n## How does Kavy work?\n\nKavy runs on an event-loop architecture, which works as follows\n\n* The server [waits until any clients are readable or writable](https://github.com/montyanderson/kavy/blob/576d2b1acc307cc50aae65022ccfff08f7f6fa59/src/server.c#L55), checking each one\n\t* [If there is input](https://github.com/montyanderson/kavy/blob/576d2b1acc307cc50aae65022ccfff08f7f6fa59/src/server.c#L84), the server [reads and appends to `client-\u003einput`](https://github.com/montyanderson/kavy/blob/576d2b1acc307cc50aae65022ccfff08f7f6fa59/src/client.c#L91)\n\t* If there's enough data to run commands it does so, appending the output to `client-\u003eoutput`\n\t* If there is data in `client-\u003eoutput`, the server sends as much as possible, shifting the sent data from the beginning of the output buffer\n\n## What makes Kavy different from Redis?\n\n* Binary protocol - speed is prioritised here, rather than compatibility\n* Static hash table with a fixed amount of buckets (1024^2 by default, which takes up only 8MB on a 64-bit system)\n* Literally only two features - `set` and `get`\n\n## What's the performance like?\n\nIn my synthetic benchmarks, Kavy was up to *10 times faster* than Redis - likely due to it's pure simplicity and lack of logging and client-specific error handling.\n\n## Protocol\n\nAll values are big-endian.\n\n### `set`\n\n#### Request\n`uint8 1` `uint32 key_length` `uint32 value_length` `char[] key` `char[] value`\n\n#### Response\n\n`uint8 0`\nor\n`uint8 1` for fail/success respectively\n\n### `get`\n\n#### Request\n`uint8 2` `uint32 key_length` `char key[]`\n\n#### Response\n\n`uint8 0`\n\nor\n\n`uint8 2` `uint32 value_length` `char[] value`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmontyanderson%2Fkavy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmontyanderson%2Fkavy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmontyanderson%2Fkavy/lists"}