Wingfoil — a Rust stream-processing graph framework with a Redis adapter #15355
0-jake-0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Wanted to share something we recently shipped that builds on Redis, in case it's
useful to others here and to get any feedback on the integration choices.
Wingfoil is a Rust stream-processing
library — you wire up a graph of nodes where each node ticks when its upstreams
produce a value, and the graph runs either in real time or replayed from
historical data. It's aimed at high-frequency trading and real-time AI pipelines.
We just added a Redis adapter that exposes Redis as wingfoil source and sink
nodes, covering two transports:
redis_subsubscribes to a channel and emits each message intothe graph;
redis_pubpublishes a stream of messages back out.redis_stream_readdoes a snapshot-then-tail read of a stream,and
redis_stream_writeappends viaXADD.A couple of design points we'd love eyes on:
XRANGE key - +to replay thebacklog, capture the last entry ID, then
XREAD BLOCK 0 STREAMS key <last_id>for the live tail. Because the tail reads strictly after the snapshot
boundary ID, anything appended in the handoff window is delivered by
XREAD(its ID is greater) and nothing is re-delivered. No missed or duplicated
entries.
only sees messages published after its
SUBSCRIBEcompletes — we treat that asan explicit no-snapshot path rather than papering over it.
tokio-comp); the blockingXREADtail runs on adedicated connection so blocking it indefinitely is safe.
A concrete use case: fanning out a normalised market-data stream over Redis
Pub/Sub to a fleet of lightweight consumers, while persisting the same events to
a Redis Stream for replay/backtesting through wingfoil's historical run mode.
Links:
Thanks for building Redis — happy to answer questions or dig into anything above.
We're actively looking for contributors, so if any of this is up your street
we'd love the help. And if wingfoil looks useful to you, a ⭐ on the
repo would mean a lot.
Beta Was this translation helpful? Give feedback.
All reactions