{"id":20144291,"url":"https://github.com/viveknathani/retain","last_synced_at":"2026-05-10T18:59:48.290Z","repository":{"id":57647853,"uuid":"443058852","full_name":"viveknathani/retain","owner":"viveknathani","description":"Your friendly neighborhood key-value store. 👜","archived":false,"fork":false,"pushed_at":"2022-01-02T11:32:25.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T10:50:15.307Z","etag":null,"topics":["cache","golang","key-value","redis","resp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viveknathani.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":"2021-12-30T11:46:33.000Z","updated_at":"2023-03-04T09:19:53.000Z","dependencies_parsed_at":"2022-08-25T10:11:17.348Z","dependency_job_id":null,"html_url":"https://github.com/viveknathani/retain","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viveknathani%2Fretain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viveknathani%2Fretain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viveknathani%2Fretain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viveknathani%2Fretain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viveknathani","download_url":"https://codeload.github.com/viveknathani/retain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587914,"owners_count":19986627,"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":["cache","golang","key-value","redis","resp"],"created_at":"2024-11-13T22:09:32.973Z","updated_at":"2025-11-27T18:02:41.081Z","avatar_url":"https://github.com/viveknathani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# retain\n\nretain is a key-value store. It is inspired by [Redis](https://redis.io/) and hence the client-server interaction is based on [RESP](https://redis.io/topics/protocol) over TCP. It implements a subset of commands supported by Redis.  \n\n[![Go Report Card](https://goreportcard.com/badge/github.com/viveknathani/retain)](https://goreportcard.com/report/github.com/viveknathani/retain) [![Maintainability](https://api.codeclimate.com/v1/badges/3a88100c22a2b6e20df9/maintainability)](https://codeclimate.com/github/viveknathani/retain/maintainability) [![test](https://github.com/viveknathani/retain/actions/workflows/test.yaml/badge.svg)](https://github.com/viveknathani/retain/actions/workflows/test.yaml) ![release](https://img.shields.io/github/v/release/viveknathani/retain)\n\u003cimg src='./screenshot.PNG'\u003e \n\n## motivation\n\nI wrote this as a learning exercise. Redis or any key-value store in general excites me. The kind of things that you can do while implementing such a store are pretty abundant, if not limitless. You can ponder in different layers of this system with questions based on \"how\". Eg: how do you hold the data in memory? How do you handle concurrent access? What protocols do you use between the client and the server? If you want to persist data, how do you manage the pages to ensure efficient data reads/writes? If you want to make it distributed, what consensus algorithm do you bring in? You probably get the idea. \n  \nWith that being said, it should be noted that this is not a production grade system and I maintain it at my free will. Don't use it for anything serious. \n  \n## commands\n\nBelow is a list of the supported commands. It takes heavy inspiration from [here](https://redis.io/commands/).\n- ECHO message\n- PING [message]\n- GET key\n- SET key value\n- DEL key\n- MGET key [key ...]\n- MSET key value [key value ...] \n- SAVE\n\n## architecture\n\n- `cmd/` directory contains the client and server programs that can be built and run.\n- `protocol` package implements [RESP](https://redis.io/topics/protocol).\n- `store` package provides an API for interacting with the underlying map.\n\n## build\n\n```\n$ make build\n```\n\nAfter this, you can find the binaries under `./bin/`. \n\n## contributing\n\nPRs and discussions are welcome. It would be better if you open an issue before raising a PR. \n\n## license\n\n[MIT](./LICENSE) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviveknathani%2Fretain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviveknathani%2Fretain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviveknathani%2Fretain/lists"}