An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Rex

A little crappy implementation of Redis

[![Elixir CI](https://github.com/ckampfe/rex/actions/workflows/elixir.yml/badge.svg)](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.