https://github.com/ckampfe/rex
A little crappy implementation of Redis
https://github.com/ckampfe/rex
elixir elixir-lang key-value redis
Last synced: about 2 months ago
JSON representation
A little crappy implementation of Redis
- Host: GitHub
- URL: https://github.com/ckampfe/rex
- Owner: ckampfe
- License: bsd-3-clause
- Created: 2025-06-08T05:23:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-14T17:49:38.000Z (11 months ago)
- Last Synced: 2025-07-14T22:37:47.468Z (11 months ago)
- Topics: elixir, elixir-lang, key-value, redis
- Language: Elixir
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rex
A little crappy implementation of Redis
[](https://github.com/ckampfe/rex/actions/workflows/elixir.yml)
## Run
start the server:
```sh
$ iex -S mix
```
connect to it:
```sh
$ redis-cli
```
## supported operations
#### Strings
- GET
- SET
#### Hashes
- HGET
- HSET
- HGETALL
- HLEN
- HDEL
- HKEYS
- HMGET
- HEXISTS
- HINCRBY
#### Lists
- LPUSH
- RPUSH
- LPOP
- RPOP
- LLEN
- BLPOP
- BRPOP
#### Sets
- SADD
- SMEMBERS
- SISMEMBER
#### Misc
- PING
## design
Strings (`GET`, `SET`) are partitioned across N servers where N = `System.schedulers_online()`.
Each hash and list gets its own server, so operations on hash/list `a` and hash/list `b` happen concurrently.
Uses [Thousand Island](https://hexdocs.pm/thousand_island/ThousandIsland.html) for TCP connection pooling.