{"id":38089011,"url":"https://github.com/nmezhenskyi/rcs","last_synced_at":"2026-01-16T20:56:07.098Z","repository":{"id":49364934,"uuid":"510522149","full_name":"nmezhenskyi/rcs","owner":"nmezhenskyi","description":"Remote Caching Server is a versatile key-value data store accessible through Native, gRPC, and HTTP APIs.","archived":false,"fork":false,"pushed_at":"2024-04-27T01:03:26.000Z","size":215,"stargazers_count":13,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T13:01:24.251Z","etag":null,"topics":["cache","cache-storage","go","golang","grpc","http"],"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/nmezhenskyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-07-04T22:50:17.000Z","updated_at":"2024-01-12T18:32:48.000Z","dependencies_parsed_at":"2024-06-21T11:49:25.995Z","dependency_job_id":"caf4da76-0737-495f-aa8d-851b9cc65dd2","html_url":"https://github.com/nmezhenskyi/rcs","commit_stats":{"total_commits":209,"total_committers":2,"mean_commits":104.5,"dds":0.02392344497607657,"last_synced_commit":"0ab9666272d08f6592d0049d51d430d3f204f184"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nmezhenskyi/rcs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmezhenskyi%2Frcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmezhenskyi%2Frcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmezhenskyi%2Frcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmezhenskyi%2Frcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmezhenskyi","download_url":"https://codeload.github.com/nmezhenskyi/rcs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmezhenskyi%2Frcs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["cache","cache-storage","go","golang","grpc","http"],"created_at":"2026-01-16T20:56:07.015Z","updated_at":"2026-01-16T20:56:07.074Z","avatar_url":"https://github.com/nmezhenskyi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n   \u003cimg src=\".github/assets/logo.png\" alt=\"drawing\" width=\"200\"/\u003e\n\u003c/h1\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/nmezhenskyi/rcs)](https://goreportcard.com/report/github.com/nmezhenskyi/rcs)\n![Build Workflow](https://github.com/nmezhenskyi/rcs/actions/workflows/ci.yml/badge.svg)\n[![codecov](https://codecov.io/gh/nmezhenskyi/rcs/branch/main/graph/badge.svg?token=LE8SBQR5NS)](https://codecov.io/gh/nmezhenskyi/rcs)\n[![Go Reference](https://pkg.go.dev/badge/github.com/nmezhenskyi/rcs.svg)](https://pkg.go.dev/github.com/nmezhenskyi/rcs)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/nmezhenskyi/rcs/blob/main/LICENSE.md)\n\nRCS, which stands for Remote Caching Server, is an in-memory key-value data store written in Go.\nIt is designed to be used in distributed systems. RCS prioritizes versatility over efficiency.\nIt provides three distinct APIs: Native, gRPC, and HTTP. This project was created out of curiosity\nas a learning exercise. Inspired by Memcached and Redis.\n\n## Features\n\n- Highly customizable in-memory cache (in-progress)\n- Exposes three APIs for versatility: Native, gRPC, HTTP\n- Supports SSL connections\n- Optional state snapshots to disk (in-progress)\n- Optional structured / unstructured logging\n- Packaged as a single binary file\n\n## API\n\nRCS exposes three distinct APIs: *Native*, *gRPC*, and *HTTP*.\n\n__Why?__ To allow for more flexibility when building a distributed system.\nWhen some performance overhead is not a dealbreaker, it may be easier to communicate\nwith the cache server over HTTP with JSON payloads. Likewise, if your project already uses gRPC\nto communicate between services, it would make sense to use it for RCS as well.\nIn a situation where you want to keep data communication minimalistic without unnecessary\ndependencies (i.e., in a network of Raspberry Pis), the Native API would be a good choice.\nMore importantly, you can use all three of these APIs simultaneously.  \n\nIn addition, you can disable APIs that you are not using. It is also possible to completely remove HTTP\nand/or gRPC APIs together with their related dependencies from the binary. To do this you need to use\nbuild tags `rmhttp` and/or `rmgrpc`.\n\n### Native\n\nNative API uses a custom application layer protocol (RCSP) built on top of TCP/IP. The complete\nspecification can be found [here](https://github.com/nmezhenskyi/rcs/blob/main/api/native/rcs.md).\nThe API supports and encourages long-living connections over one-off requests. There are no client\nlibraries for the RCSP yet, so you would have to implement one according to the specification.\nThe API supports SSL connections.\n\n### gRPC\n\ngRPC API uses `rcs.proto` file, which can be found\n[here](https://github.com/nmezhenskyi/rcs/blob/main/api/protobuf/rcs.proto),\nto generate the service and proto messages. You should use this file to generate client bindings with\n`protoc`. The API supports SSL connections.\n\n### HTTP\n\nHTTP API exposes HTTP end-points and communicates using JSON payloads. The OpenAPI specification can be\nfound [here](https://github.com/nmezhenskyi/rcs/blob/main/api/openapi/rcs.yaml). The API supports SSL connections.\n\n## Internals\n\nInternally, RCS uses a hash table with strings as keys and stores values in binary representation.\nIn future releases RCS will support multiple storage \u0026 eviction strategies, as well as cache serialization\nto disk storage.\n\n## Getting Started\n\n### Build from source\n\nPrerequisites:\n\n- Unix-like OS (tested on macOS and Ubuntu)\n- Go +1.18 compiler and tools\n- Protocol buffer compiler v3\n- Go plugins for protocol buffer compiler\n- GNU Make (optional)\n\nSteps:\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/nmezhenskyi/rcs.git\n   ```\n2. Generate protobuf and grpc files: \n   ```sh\n   mkdir -p internal/genproto\n   \n   protoc --proto_path=api/protobuf \\\n   --go_out=internal/genproto --go_opt=paths=source_relative \\\n   --go-grpc_out=internal/genproto --go-grpc_opt=paths=source_relative \\\n   rcs.proto\n   ```\n3. Build the source code:\n   ```sh\n   go build -o \u003cdestination\u003e ./cmd\n   ```\n\nAlternatively if you have Make installed:\n\n1. Clone the repository: `git clone https://github.com/nmezhenskyi/rcs.git`.\n2. Run `make build` command. This will generate protobuf and grpc files, build the project,\nand create the binary in the `./bin` directory.\n\n### Run\n\nTo run RCS you would need to provide it with the configuration file `rcs.json`. \nBy default, it looks for `./rcs.json` but you can specify a different path using `-c \u003cpath\u003e` switch.\n\n#### Example Configuration File:\n\n```json\n{\n   \"native\": {\n      \"activate\": true,\n      \"port\": 6121,\n      \"onLocalhost\": true,\n      \"tls\": false,\n      \"certFile\": \"\",\n      \"keyFile\": \"\"\n   },\n   \"grpc\": {\n      \"activate\": true,\n      \"port\": 6122,\n      \"onLocalhost\": true,\n      \"tls\": false,\n      \"certFile\": \"\",\n      \"keyFile\": \"\"\n   },\n   \"http\": {\n      \"activate\": true,\n      \"port\": 6123,\n      \"onLocalhost\": true,\n      \"tls\": false,\n      \"certFile\": \"\",\n      \"keyFile\": \"\"\n   },\n   \"verbosity\": \"dev\",\n\n   \"saveOnShutdown\": true\n}\n```\n\n### Containerize\n\nThere is a ready-to-use [Dockerfile](https://github.com/nmezhenskyi/rcs/blob/main/Dockerfile) based\non Alpine Linux. Also available on [Docker Hub](https://hub.docker.com/repository/docker/nmezhenskyi/rcs).\n\n## Contributing\n\nFeel free to create a pull request with new features and/or bug fixes.\nPlease address a single concern in a PR and provide unit tests and documentation.\nWhen commiting follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).\n\n## License\n\nThe project is licensed under MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmezhenskyi%2Frcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmezhenskyi%2Frcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmezhenskyi%2Frcs/lists"}