Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/wildonion/redis4

๐Ÿค a very simple implementation of redis based on sharded shared sate storage design pattern
https://github.com/wildonion/redis4

event-listener event-loop mutex-lock redis socket tokio-rs

Last synced: 7 days ago
JSON representation

๐Ÿค a very simple implementation of redis based on sharded shared sate storage design pattern

Awesome Lists containing this project

README

        

# ๐Ÿ‡ธ4 (Sharded Shared State Storage)

a very simple implementation of an in-memory data storage like redis which is based on sharded shared sate storage design pattern using standard `HashMap` as the shared data

# ๐Ÿงช Usage

```cargo run --bin s4```

# ๐Ÿ› ๏ธ Tools

* tokio select to receive data from jobq channels asyncly
* tokio spawn to handle incoming packets asyncly and concurrently
* tokio mutex to acquire the lock on the shared data between tokio green threads asyncly
* tokio jobq channels to move data between tokio green threads asyncly

* redis for streaming over pubsub channels

# ๐Ÿšง WIPs

* implement proper sharding and replication algorithms like assigning each data of a shard to a slot owned by a node by sending them through the threads using jobq channels