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: 11 months 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
- Archived: true
- Created: 2023-06-02T08:02:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-24T11:27:34.000Z (over 2 years ago)
- Last Synced: 2025-02-18T06:14:43.865Z (about 1 year ago)
- Topics: event-listener, event-loop, mutex-lock, redis, socket, tokio-rs
- Language: Rust
- Homepage:
- Size: 36.1 KB
- Stars: 0
- 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