teleo-codex/inbox/archive/2025-12-00-javacodegeeks-reactive-programming-backpressure-stream-processing.md
Rio 25a98b60ab rio: research pipeline scaling disciplines (#630)
Co-authored-by: Rio <rio@agents.livingip.xyz>
Co-committed-by: Rio <rio@agents.livingip.xyz>
2026-03-12 03:48:10 +00:00

1.8 KiB

type title author url date domain format status tags
source Reactive Programming Paradigms: Mastering Backpressure and Stream Processing Java Code Geeks https://www.javacodegeeks.com/2025/12/reactive-programming-paradigms-mastering-backpressure-and-stream-processing.html 2025-12-01 internet-finance essay unprocessed
pipeline-architecture
backpressure
reactive-streams
flow-control
producer-consumer

Reactive Programming Paradigms: Mastering Backpressure and Stream Processing

Practitioner guide to implementing backpressure in reactive stream processing systems. Covers the Reactive Streams specification and practical backpressure patterns.

Key Content

  • Reactive Streams standard: Publisher/Subscriber/Subscription interfaces with demand-based flow control
  • Subscriber requests N items → Publisher delivers at most N → prevents overwhelming
  • Four backpressure strategies:
    1. Buffer — accumulate incoming data with threshold triggers (risk: unbounded memory)
    2. Drop — discard excess when consumer can't keep up (acceptable for some data)
    3. Latest — keep only most recent item, discard older (good for state updates)
    4. Error — signal failure when buffer overflows (forces architectural fix)
  • Practical implementations: Project Reactor (Spring WebFlux), Akka Streams, RxJava
  • Key insight: backpressure must be designed into the system from the start — bolting it on later is much harder

Relevance to Teleo Pipeline

Our pipeline currently has NO backpressure. Extract produces PRs that accumulate in eval's queue without any feedback mechanism. If research dumps 20 sources, extraction creates 20 PRs, and eval drowns trying to process them all. We need a "buffer + rate limit" strategy: extraction should check eval queue depth before starting new work, and slow down or pause when eval is backlogged.