Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/wildonion/redis4
- Owner: wildonion
- Created: 2023-06-02T08:02:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-13T09:14:40.000Z (about 1 year ago)
- Last Synced: 2023-09-13T17:58:52.249Z (about 1 year ago)
- Topics: event-listener, event-loop, mutex-lock, redis, socket, tokio-rs
- Language: Rust
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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