base on Super fast drop-in replacement of the in memory key-value store Redis, made in Golang <div align="center"> <!-- logo --> <img src = "assets/icon.png" width="300"> <h1 align="center">Radish</h1> <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /><br> Super fast drop-in replacement of the in memory key-value store redis in golang </div> --- [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md) [Try it out instantly](#installation) ## šŸ‘€ What is this? Why? `Radish` is a super fast drop-in replacement of the in memory key-value store redis, built with golang. Why? Redis recently (Last week, as of Mar 25 2024) changed their license to a [dual 'source-available' license](https://news.ycombinator.com/item?id=39772562) - which means that it can't be used for commercial purposes without paying for a license. Everyone hated it. This is a problem for many companies and developers who use redis in their projects. And, I was kinda bored and wanted to learn golang properly, so I built this. Should you use this in production? Probably, probably not. It's not battle tested yet, but i (as a single person team) have tried to do my best to make it as reliable as possible. I even made a cute mascot (Godis crushing Redis) Annddd all i ask in return is a little ⭐ so that i dont have to rely on twitter for my dopamine hit. ![Godis](assets/godis.png) ## šŸ“œ Features | Feature | Redis | Radish | | ------------------------- | ----- | ------ | | In-memory key-value store | āœ… | āœ… | | Strings | āœ… | āœ… | | Lists | āœ… | āœ… | | Sets | āœ… | āœ… | | Sorted sets | āœ… | āœ… | | Hashes | āœ… | āœ… | | Streams | āœ… | āŒ | | HyperLogLogs | āœ… | āŒ | | Bitmaps | āœ… | āŒ | | Persistence | āœ… | āœ… | | Pub/Sub | āœ… | āœ… | | Transactions | āœ… | āœ… | | Lua scripting | āœ… | āŒ | | LRU eviction | āœ… | āŒ | | TTL | āœ… | āŒ | | Clustering | āœ… | āŒ | | Auth | āœ… | āŒ | ### Available commands For now, these commands are available (more to come) #### MISC `INFO` `PING` `FLUSHALL` `SHUTDOWN` `SAVE` `BGSAVE` #### Keys `DEL` `EXISTS` `KEYS` `EXPIRE` `TTL` #### Strings `SET` `GET` `APPEND` `INCR` `INCRBY` `DECR` `DECRBY` `MSET` `MGET` #### Lists `LPUSH` `LPOP` `RPUSH` `RPOP` `LRANGE` `LLEN` #### Hashes `HSET` `HGET` `HMSET` `HMGET` `HGETALL` `HDEL` #### Sets `SADD` `SMEMBERS` `SISMEMBER` `SREM` #### Sorted Sets `ZADD` `ZRANGE` `ZREM` #### Pub/Sub `SUBSCRIBE` `PUBLISH` `UNSUBSCRIBE` #### Transactions `MULTI` `EXEC` `DISCARD` ## Installation ### Using `docker` To get it up and running instantly, you can use the docker image ``` docker run -d -p 6379:6379 dhravyashah/radish ``` ### Using `go` ``` go install github.com/dhravya/radish@latest && radish ``` and then just build and run the binary ### Using the binary Download the binary executables from `./bin/radish`. Click here to get it [instantly](https://github.com/dhrvyashah/radish/releases/download/v0.1.0/radish-0.1.0-linux-amd64.tar.gz). ## Having fun This IS compatible with the existing redis tooling and client libraries! Try it out with some of them. For eg. ``` npm i -g redis-cli ``` (make sure the server is running - docker is the easiest and fastest way) ``` āÆ rdcli 127.0.0.1:6379> incr mycounter (integer) 1 127.0.0.1:6379> incr mycounter (integer) 2 127.0.0.1:6379> set foo bar OK 127.0.0.1:6379> get foo bar 127.0.0.1:6379> get bar (nil) ``` ## Contributing radish is _completely_ open source. If you want to contribute, please create an issue on the repo and I will assign the task to someone (or you). Steps to contribute: 1. Clone the repo ``` git clone https://github.com/dhravya/radish ``` 2. Create a new branch 3. Make sure to build and test the code before creating a PR ``` go build -o ./bin ``` 4. Create a PR ## Help and the community If you need any help, or want to ask questions, or suggest features, please feel free to DM me on twitter - [https://dm.new/dhravya](https://dm.new/dhravya) or create an issue on the repo. You can also join our [Discord server](https://discord.gg/z7MZYhmx6w) where we have a community of developers ready to help you out. ## License Unlike redis, radish is licensed under the MIT license. You can use it for commercial purposes without any restrictions. Go wild! ", Assign "at most 3 tags" to the expected json: {"id":"9653","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"