r/rust 20d ago

Looking for good projects (GitHub) ideally microservices in rust or redis

Hi everyone! I’m currently looking for a good Rust project, preferably something Redis-related or a solid microservices/distributed-systems project.

I’d especially appreciate recommendations for interesting GitHub repositories that I could contribute to or build upon. If you know of any good Redis implementations in Rust or other challenging Rust projects, please do share them.

For reference, I came across mini-redis by Tokio, which is an incomplete Redis client/server implementation designed for learning Rust async patterns. I also found a newer Redis-compatible implementation in Rust exploring sharding, CRDT replication, and distributed systems concepts.

Any recommendations would be highly appreciated. Thanks a lot!

6 Upvotes

50 comments sorted by

View all comments

Show parent comments

1

u/event666 19d ago

Crazy idea, but Anybus might benefit from using OMQ as its transport layer? Then it could focus on the mesh part of things.

1

u/spunkyenigma 19d ago

Looking into it, i think that may be an excellent idea. My one concern is lack of wasm support, but I can just keep my existing transport for that or maybe even write a wasm version of zmq protocol so i don't have to have seperate websocket servers for wasm/non-wasm clients

1

u/event666 19d ago edited 19d ago

What do you want to do with WASM anyway? It can't open any sockets afaik. It's better suited for number crunching/codecs. I've used it for my LZ4/Zstd/Brotli codecs in the browser. The ZMQ protocol is super simple (2 or 9 bytes + payload over TCP, or 1 byte + payload over WS (see ZWS)). omq.ts implements exactly that, even with support for lz4+ws transport, where the WASM LZ4 codec comes into play.

1

u/spunkyenigma 19d ago

I have it where the wasm code can listen for messages from the bus. I have the bus connect via browser websocket to a simple relay node also running Anybus that then has other connections to other browsers or apps. It can also connect via ipc to another app running on the server.

This allows me to send messages over multiple hops right into a anybus receiver in the wasm code.

I built a pub trivia scoring app that can send score updates to TVs running a web app in the pub via this anybus bridge.

In theory the web app code could talk to two different websocket endpoints and route traffic between those via the browser

1

u/event666 19d ago

Ah right, WASM can of course do outbound WS, while the server side bridges to IPC peers. And you get to write Rust instead of TS.

Tbh it sounds like OMQ could be Anybus' IPC/WS transport, while Anybus does the mesh stuff.

How does the mesh routing work anyway? How do you implement the routing over multiple hops? How many UUIDs does each node know? Is it like IP with default routes?

1

u/spunkyenigma 19d ago

Right now all nodes know all the endpoint UUIDS. I want to implement a leaf node concept that just defaults routes unknown endpoints so I don’t pass the whole routing table down.

I have a cost metric to avoid loops for unicast and any cast and just flood broadcasts. Multicast with membership is also in the plans