Show HN: Go Command-streaming lib for distributed systems (3x faster than gRPC)
Show HN (score: 5)Description
Why build around Commands? As serializable objects, they can be sent over the network and persisted. They also provide a clean way to model distributed transactions through composition, and naturally support features like Undo and Redo. These qualities make them a great fit for implementing consistency patterns like Saga in distributed systems.
On the performance side, sending a Command involves minimal overhead — only its type and data need to be transmitted. In benchmarks focused on raw throughput (measured using 1, 2, 4, 8, and 16 clients in a simple request/response scenario), cmd-stream/MUS (cmd-stream/Protobuf) is about 3x (2.8x) faster than gRPC/Protobuf, where MUS is a serialization format optimized for low byte usage. This kind of speedup can make a real difference in high-throughput systems or when you're trying to squeeze more out of limited resources.
By putting Commands at the transport layer, cmd-stream-go avoids the extra complexity of layering Command logic on top of generic RPC or REST.
The trade-offs: it’s currently Go-only and maintained by a single developer.
If you’re curious to explore more, you can check out the cmd-stream-go repository (https://github.com/cmd-stream/cmd-stream-go), see performance benchmarks (https://github.com/ymz-ncnk/go-client-server-benchmarks), or read the series of posts on Command Pattern and how it can be applied over the network (https://medium.com/p/f9e53442c85d).
I’d love to hear your thoughts — especially where you think this model could shine, any production concerns, similar patterns or tools you’ve seen in practice.
Feel free to reach me as ymz-ncnk on the Gophers Slack or follow https://x.com/cmdstream_lib for project updates.
More from Show
Show HN: SmokeVPN – All-in-One WireGuard VPN Hub – Switch Exits in Realtime
Show HN: SmokeVPN – All-in-One WireGuard VPN Hub – Switch Exits in Realtime I have started developing a prototype of a WireGuard VPN hub, where I could set a custom exit to a specific device, for example, my TV box would use a VPN in Germany, while my desktop a VPN is Serbia and I could switch the exit in realtime without having to stop the VPN connections and consequently no disconnections (ssh, etc).<p>The project grew, and I ended up adding SOCKS5 and HTTP proxy, Tor exits, exit pools, random exits, timed exits, and exits/routes based on domains or IP addresses. I also added an in-house DNS with several default block lists (malware, gambling, social media, etc.)<p>I found this project to have potential and decided to commercialize it, Smoke VPN was born.<p>The logs live entirely on the RAM, and I plan to open-source the full stack as soon as I get feedback from real users, people like you...<p>Can you please try the project for free for 7 days or 50 GB (whichever comes first)?<p>You don't need an account, email or password and you can add up to 10 devices.<p>Real feedback is truly welcome!
No other tools from this source yet.