{"id":22488698,"url":"https://github.com/Qovery/RedisLess","last_synced_at":"2025-08-02T21:31:37.397Z","repository":{"id":47690830,"uuid":"361267521","full_name":"Qovery/RedisLess","owner":"Qovery","description":"RedisLess is a fast, lightweight, embedded and scalable in-memory Key/Value store library compatible with the Redis API.","archived":true,"fork":false,"pushed_at":"2021-08-18T08:21:32.000Z","size":2013,"stargazers_count":149,"open_issues_count":16,"forks_count":16,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-29T03:49:39.472Z","etag":null,"topics":["database","golang-library","java-library","node-library","python","python-library","redis","redis-api","redis-server","resp","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Qovery.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-04-24T21:10:48.000Z","updated_at":"2024-11-28T16:34:59.000Z","dependencies_parsed_at":"2022-08-23T14:10:44.008Z","dependency_job_id":null,"html_url":"https://github.com/Qovery/RedisLess","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2FRedisLess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2FRedisLess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2FRedisLess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2FRedisLess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qovery","download_url":"https://codeload.github.com/Qovery/RedisLess/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500219,"owners_count":17930019,"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","golang-library","java-library","node-library","python","python-library","redis","redis-api","redis-server","resp","rust"],"created_at":"2024-12-06T17:18:27.389Z","updated_at":"2024-12-06T17:20:39.761Z","avatar_url":"https://github.com/Qovery.png","language":"Rust","readme":"RedisLess\n===========\n\n[![Discord](https://img.shields.io/discord/688766934917185556?label=discord)](https://discord.qovery.com) [![Test and Build](https://github.com/Qovery/RedisLess/workflows/Test%20and%20Build/badge.svg?branch=main)](https://github.com/Qovery/RedisLess/actions?query=workflow%3A%22Test+and+Build%22)\n\n---------\n\n**THIS PROJECT IS TESTABLE, BUT NOT PRODUCTION READY YET!!**\n\n---------\n\n**RedisLess is a fast, lightweight, embedded and scalable in-memory Key/Value store library compatible with\nthe [Redis](https://redis.io/topics/introduction) API.**\n\n\u003e RedisLess is the concatenation of Redis and Serverless.\n\n# Motivation\n\n\u003e As a backend developer, I mostly work on providing web API for frontend developers and backend developers. Redis is part of my toolset - especially when I share data and sync states between my backend apps. For those simple use cases, I don't want to have to spawn a Redis server.\n\n\u003e So, imagine a world where your Redis instance is nothing more than a lib in your app. Imagine that this lib can sync the data with other neighborhood instances?\n\n\u003e That's the idea behind RedisLess, a lightweight, embedded, and scalable in-memory Key/Value store library compatible with the Redis API.\n\n\u003e [Follow me on Twitter](https://twitter.com/rophilogene) 🙋‍♂️\n\nRead more about RedisLess:\n* May 13 2021: [How I imagine the future of databases in the Cloud](https://www.heapstack.sh/how-i-imagine-the-future-of-databases-in-the-cloud)\n* May 03 2021: [Interesting discussion about RedisLess](https://www.reddit.com/r/rust/comments/n3d1zw/i_am_building_a_serverless_version_of_redis/) on Reddit.\n* Apr 28 2021: The RedisLess project was initially announced [here](https://www.heapstack.sh/redisless-blazingly-fast-serverless-redis).\n\n# How to use it?\n\nTo use RedisLess, you only need to:\n\n1. Install RedisLess library for your favorite language (see supported clients below).\n2. Connect your favorite Redis client to `redis://localhost:16379`.\n3. You don't need to change your code - RedisLess is Redis API compatible. (see [supported Redis commands](REDIS_FEATURES.md))\n\nUnder the hood, the RedisLess library starts a local Redis API compatible instance on port `16739` (you can change the port).\n\n## NodeJS client\n\n### Install\n\n```bash\n# RedisLess library with Python binding\nnpm install redisless\n\n# redis client\nnpm install async-redis\n```\n\n### Usage\n\n```js\nconst {RedisLess} = require('redisless');\nconst redis = require('async-redis');\n\nconst port = 16379;\nconst redisless = new RedisLess(port);\n\nredisless.start();\n\nconst r = redis.createClient({host: 'localhost', port: port});\n\nawait r.set('foo', 'bar');\nawait r.get('foo'); // return 'bar'\nawait r.del('foo'); // delete key 'foo'\n\nredisless.stop();\n```\n\n## Python client\n\n### Install\n\n```bash\n# RedisLess library with Python binding\npip install redisless\n\n# redis client\npip install redis\n```\n\n### Usage\n\n```python\nfrom redisless import RedisLess\nimport redis\n\nredisless = RedisLess()\n\n# start RedisLess embedded instance\nredisless.start()\n\n# Connect to RedisLess on localhost:16379\nredis = redis.Redis(host='localhost', port=16379)\n\nredis.set('foo', 'bar')\nredis.get('foo')  # return bar \nredis.delete('foo')  # return 1 \n\n# stop RedisLess embedded instance\nredisless.stop()\n```\n\n# What is RedisLess\n\n* Embedded in-memory. (No Redis server required!).\n* Compatible with the Redis API (RESP).\n* Not intrusive: you don't need to modify you code to use RedisLess!\n* Built with DX and performance in mind.\n* Cloud native friendly.\n\nWhat RedisLess is not:\n\n* Production ready yet.\n* 1:1 Redis implementation.\n\n# Use cases\n\nThe goal of RedisLess is not to remove the need of Redis server for heavy workload. **If you consider to store more than 2 GB of data in RedisLess you are better to use Redis**. There is no hard limit, but RedisLess is designed to manage and share small dataset between apps.\n\n✅ Good use cases:\n\n- Distributed lock between your apps.\n- Share data (lower than 2 GB) between your apps.\n- Cache where reads are more important than writes.\n\n❌ Bad use cases:\n\n- Store more than 2 GB of data.\n- Cache where writes are more important than reads.\n\n# Planned features\n\n- [ ] Redis API ([see implemented features](https://github.com/Qovery/RedisLess/issues/38))\n- [ ] Cluster mode\n- [ ] Auto-discovery\n- [ ] Disk persistence\n\n# Planned supported clients\n\n- [x] [NodeJS](clients/nodejs)\n- [x] [Golang](clients/golang)\n- [x] [Python](clients/python)\n- [ ] Java\n\n# Expected performance\n\nStrong attention to performance and code cleanliness is given when designing RedisLess. It aims to be crash-free, super-fast and put a\nminimum strain on your server resources. \n\nRedisLess is written in Rust and export functions through FFI (Foreign Function Interface), making it usable from any language. We provide\nclients for NodeJS, Python, Golang, Java, and Rust. Supporting a new language can be done in 5 minutes. Look at [Python](clients/python)\nand [NodeJS](clients/nodejs) clients implementation for inspiration.\n\n# Contribution welcome!\n\nIt is never too soon to contribute to a great project. If you are interested in contributing, please join us\non [Discord](https://discord.qovery.com), then we can discuss. The project is in its early days, but we are serious about building a solid\nlibrary to help thousands of developers.\n\n## Set up MacOSX development environment\n\n### Pre-requisites\n1. Install [Xcode](https://developer.apple.com/xcode/)\n2. Install [Brew](https://brew.sh/)   \n3. Install [Rust](https://www.rust-lang.org/tools/install)\n4. Run `brew install mingw-w64` to cross build for Windows\n5. Run `brew install FiloSottile/musl-cross/musl-cross` to cross build for Linux \n6. Run `brew tap SergioBenitez/osxct \u0026\u0026 brew install x86_64-unknown-linux-gnu` # to cross build for Linux\n\n### Build clients\n\nTo build NodeJS, Python, Golang and other libs you need to run:\n\n```bash\ncd scripts \u0026\u0026 ./build-for-mac.sh \u0026\u0026 cd ..\n```\n\n### Use clients\n\nOnce the libs built, you are ready to use the clients into the [clients](clients) folder.\n\n# Contributors\n\nThanks to our contributors ❤️\n\n\u003ca href=\"https://github.com/Qovery/RedisLess/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=Qovery/RedisLess\" /\u003e\n\u003c/a\u003e\n\n# References\n\n- Redis Internals: [Free e-book](https://redislabs.com/ebook)\n- [Redis Protocol Specification](https://redis.io/topics/protocol) (RESP)\n- [Sonic](https://github.com/valeriansaliou/sonic): fast and lightweight Elasticsearch alternative\n- [Mnesia](https://erlang.org/doc/man/mnesia.html): Erlang distributed DBMS\n- [Hazelcast](https://hazelcast.com): Java distributed in-memory datastructures\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQovery%2FRedisLess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQovery%2FRedisLess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQovery%2FRedisLess/lists"}