Built-in Stream Modules
Rogue includes a small set of reusable stream modules that cover the most common stream-graph jobs: buffering, filtering, rate reduction, debug inspection, and network bridging.
These modules are useful because they let a stream graph be assembled from
well-defined pieces instead of forcing every application to reimplement the same
infrastructure. In practice, many stream topologies are built by combining a
custom Master or Slave with one or more of these built-in modules.
Module Overview
The main built-in stream modules are:
Fifofor queue-based buffering with optional copy and trim behaviorFilterfor channel selection and optional dropping of erroredFrameobjectsRateDropfor count-based or time-based rate reductionDebug
Slavemode for payload inspection without writing a custom receiverTcpServerandTcpClientfor bridging streams across TCP
How To Choose A Module
In most cases, the choice is driven by the specific problem in the stream path:
If the issue is burstiness or flow-control mismatch, start with
Fifo.If only one channel or only non-errored traffic should continue downstream, use
Filter.If the downstream path only needs a representative sample of the traffic, use
RateDrop.If the need is simply to inspect bytes or metadata during bring-up, attach a debug
Slave.If the stream must cross a process or machine boundary, use the TCP bridge.
Constructor Quick Reference
ris.Fifo(maxDepth, trimSize, noCopy)ris.Filter(dropErrors, channel)ris.RateDrop(period, value)ris.TcpServer(addr, port)ris.TcpClient(addr, port)
Each module has its own usage page with fuller discussion and examples.
What To Explore Next
Fifousage: FIFO BufferingFilterusage: Channel FilteringRateDropusage: Rate Limiting With RateDropDebug
Slaveusage: Debugging StreamsTCP bridge usage: Stream TCP Bridge
API Reference
Python:
C++:
Built-in Stream Modules: