Skip to content

Reactive Programming: Streams, Signals and FRP ​

A breadth-first survey of reactive programming: push-based streams, pull-based effectful streams, fine-grained signals, classical and transactional FRP, and the synchronous languages. It is framed against one concrete engineering goal: a reactive library for Sparkles built on event-horizon, the repository's completion-based event loop with structured scopes, fibers and a single-value lazy Effect. Every deep-dive answers the same questions in the same order, and every one ends by writing the worked pipeline in its own idiom, so the twenty answers can be laid side by side in the comparison.

The worked pipeline is the first consumer, taken from the fileset explorer: a query field → debounce N ms, with N adjustable at runtime → hash a file set on a worker thread, a newer query cancelling the running hash → show the result. A toggle switches the whole pipeline on and off, and switching it off cancels a pending debounce and an in-flight hash.

This survey answers ten questions:

  1. What are the models, and what does each one optimise for? — the master catalog and the taxonomy.

  2. How is "latest wins" expressed, and does cancelling wait for the cancelled work? — comparison § Latest wins and the cancel-wait split.

  3. Is debounce a primitive, and can its duration change while it runs? — comparison § Debounce.

  4. Where does state live, and how do cells differ from event streams? — comparison § Cells and streams.

  5. What does one frame see? — comparison § The frame.

  6. How is time made deterministic in tests? — comparison § Virtual time.

  7. What does event-horizon already have, and what is missing? — comparison § Delta.

  8. How do mature libraries structure and name their API, and what did they later regret? — comparison § API structure and naming.

  9. How do tests script inputs and assert outputs, cancellation included? — testing, with three theme pages behind it.

  10. How do UI frameworks let components be written over their reactive core, and what does keeping a retained tree in sync cost? — solid-components (JSX compiled to templates and holes, run-once components, the custom-renderer contract) and flutter (immutable widgets rebuilt over retained element and render trees, identity-based skipping). The UI component authoring study turns them into sparkles:ui's decisions, measured across seven builders.

The shared vocabulary is defined once in concepts; the deep-dives use it.

Animation, the problem FRP was invented for, has a catalog of its own: UI animation surveys how interfaces express motion, and its FRP page extends the yampa, elm and reflex deep-dives here with Fran's behaviours, tweens as functions of time and retargeting as switching.

Last reviewed: November 23, 2026


Master catalog ​

SubjectEcosystemSchoolVersions surveyedLatest-wins primitiveLink
RxJSTypeScriptpush streams7.8.2; 9.0.0-beta.0 (master, unpublished)switchMaprxjs
Effect StreamTypeScriptpull streams on fiberseffect@4.1.5; effect@3.22.5Stream.switchMap (v4), flatMap switcheffect-ts
Kotlin FlowKotlinsuspending streamskotlinx.coroutines 1.11.0transformLatest / flatMapLatestkotlin-flow
Swift Async AlgorithmsSwiftpull streams (async iterators)main @ 088f92a3 (2026-11-18)flatMapLatest (proposed); .task(id:)swift-async-algorithms
Rust streams and signalsRustpoll streams + signalsfutures 0.3.34; tokio 1.54.1; futures-signals 0.3.34map_future (futures-signals); select! looprust-streams
fs2Scalapull streams on fibersfs2 3.16; cats-effect 3.7switchMapfs2
Solid 2.0 signalsTypeScriptpush-pull signalssolid-js@2.0.3async memo (stale result discarded)solid-signals
TC39 SignalsJavaScriptpush-pull signals (standard)Stage 1; signal-polyfill@0.2.3none (framework code)tc39-signals
Angular signalsTypeScriptpush-pull signals + resources22.4.0-next.0resource / rxResourceangular-signals
Jetpack Compose runtimeKotlinsnapshot state + keyed effectscompose.runtime 1.14.0-alpha02LaunchedEffect(key)jetpack-compose
SodiumJava, C#transactional FRPmaster @ 03d0c0fe (2026-09-28)switchS (streams); .NET MapAsyncsodium
ElmElmmodel-update loop (ex-FRP)elm/core 1.0.5; elm-lang/core 3.0.0 (signals)none (sequence number, result discarded)elm
Esterel and CéuEsterel, Céu, Csynchronous languagesEsterel v5.91; Céu v0.30; HipHop.jspar/or, abort … when, watchingsynchronous-languages
C++ senders and receiversC++single-value operations + scopesC++26 draft (P2300R10, P3149R11, P2079R10, P3552R3); stdexec @ f27cd131 (2026-11-21)none (counting_scope + a stop source per request)cpp-senders-receivers
Rx.NET, Ix.NET, AsyncRxC#push streams (+ pull Ix)System.Reactive 7.0.0; System.Linq.Async 7.0.1; AsyncRx 6.0.0-alpha (unreleased)Select(f).Switch()rx-dotnet
Pekko StreamsScala, Javademand-driven dataflow graphsmain @ df133f7d (2026-11-23; v2.0.0-RC1)switchMap (since 1.2.0)pekko-streams
Clojure transducersClojure, Javasource-independent transformersClojure @ 92ce2a85 (2026-11-23); core.async 1.9.865; JDK Gatherer (24)none (hand-written go-loop)clojure-transducers
ReflexHaskellhigher-order push-pull FRPreflex 0.10.0.0 @ f443526b (2026-11-22); reflex-dom @ de31ceffswitchHold, switchDyn (no cancellation)reflex
YampaHaskellarrowized FRP (signal functions)Yampa 0.15.1; dunai 0.14.2; rhine 1.8rSwitch (the old machine is no longer stepped)yampa
Jane Street IncrementalOCamlself-adjusting computationmaster @ 371fc83a (2026-11-03); Salsa 0.28.6; Bonsai @ 3a02b573bind (invalidates the old subgraph)jane-street-incremental

NOTE

Two subjects sit next to existing catalogs rather than inside them. Effect, ZIO and cats-effect as effect systems are covered by algebraic effects (Effect, ZIO, cats-effect); this tree covers their streaming halves. Incremental recomputation is covered twice: as a parsing technique by parsing § incremental, and as a reactive value graph by jane-street-incremental (with Adapton, Salsa and Bonsai as related designs).


Taxonomy ​

By evaluation model ​

ModelWho sends the next valueSubjects
Pushthe producer calls the consumerrxjs, rx-dotnet, sodium, kotlin-flow (with suspension as backpressure)
Pullthe consumer asks for the next value (or chunk)effect-ts, fs2, swift-async-algorithms, rust-streams, rx-dotnet (Ix, IAsyncEnumerable)
Demand-driven graphdownstream signals demand, upstream pushes up to it (Reactive Streams)pekko-streams
Push-pullinvalidation is pushed, values are pulled when readsolid-signals, tc39-signals, angular-signals, jetpack-compose (snapshot read-tracking), reflex
Process-independent transformerwhichever process applies it (reduce, sequence, channel) pushes into itclojure-transducers (and Java Gatherer)
Sampled dataflowthe driver steps every signal function once per sample, with a time deltayampa
Explicit stabilisationinputs are set freely; one stabilize call propagates in height orderjane-street-incremental
Model-update loopthe runtime feeds one message at a time to a pure updateelm
Synchronous reactionan input event starts one run-to-completion reaction of all trailssynchronous-languages
Single-value operationsa sender completes once, on one of three channels (value, error, stopped)cpp-senders-receivers (streams only as experimental sequence senders)

By what a cancel does to running work ​

CancelSubjects
Waits until the cancelled work finishedkotlin-flow (transformLatest joins), effect-ts (switchMap awaits the old inner's scope), fs2 (switchMap awaits finalizers), Salsa in jane-street-incremental (a write waits for every other handle), Java mapConcurrent in clojure-transducers
Does not wait; stale output filteredrxjs, rx-dotnet (AsyncRx awaits, unreleased), pekko-streams (switchMap; mapAsync futures keep running), swift-async-algorithms, rust-streams, jetpack-compose, angular-signals, tc39-signals, sodium (.NET MapAsync)
Never cancels; only discards the resultsolid-signals (cleanup is the run's business), elm (stale timers still fire), reflex (IO "cannot be undone"), clojure-transducers (core.async has no cancel)
Nothing to cancel: pure graph, no asyncyampa (a switched-out machine is not stepped again), jane-street-incremental (an invalidated node is not recomputed)
Lexical abortion in the same reactionsynchronous-languages (threads: flagged, reaped later)
Joins in composites, forgets in spawned workcpp-senders-receivers (when_all and exec::when_any join; a spawned request joins only when chained on its predecessor's spawn_future)

By where time comes from ​

Source of timeSubjects
An injectable scheduler or clock servicerxjs 7.x, rx-dotnet (an IScheduler overload per operator), effect-ts, swift-async-algorithms (Clock generic), sodium (Java/.NET timers)
The dispatcher or runtime (virtual time global)kotlin-flow, fs2 (TestControl), rust-streams (tokio pause), jetpack-compose, pekko-streams (a process-wide scheduler swap)
Platform timers (setTimeout), patched in testsrxjs 9.x, solid-signals, tc39-signals, angular-signals, elm, reflex (forkIO + sleep), clojure-transducers (core.async timeout)
An input event the host feedssynchronous-languages, yampa (dt per sample; embed in tests), jane-street-incremental (Clock.advance_clock)
None in the standard; a timed_scheduler extensioncpp-senders-receivers (stdexec schedule_after/schedule_at)

Milestones ​

DateMilestoneLink
1992Berry & Gonthier publish the semantics of Esterelsynchronous-languages
1997Elliott & Hudak's Functional Reactive Animation (Fran), the first FRPyampa
2002Nilsson, Courtney & Peterson, Functional Reactive Programming, Continued: arrowized FRP (Yampa)yampa
2012Czaplicki's thesis Elm: Concurrent FRP for Functional GUIselm
2013Céu at SenSys: structured synchronous reactive programming with lexical abortionsynchronous-languages
2014-08-06"Transducers are Coming": transformations separated from sources and sinksclojure-transducers
2015-07-18Jane Street's "Introducing Incremental"jane-street-incremental
2016-05-10Elm 0.17, "A Farewell to FRP", replaces signals with The Elm Architectureelm
2016Functional Reactive Programming (Blackheath & Jones) documents Sodium's transactionssodium
2022-09-07Akka moves to the Business Source License; Apache Pekko forks the Apache-2.0 linepekko-streams
2024-04TC39 Signals reaches Stage 1tc39-signals
2024-06P2300R10 std::execution adopted for C++26 (date from the paper, not plenary minutes)cpp-senders-receivers
2025-02-21RxJS 7.8.2, the current stable linerxjs
2025-06P3149 async_scope, P2079 parallel scheduler and P3552 task adopted (dates from the papers)cpp-senders-receivers
2026-11-16Solid 2.0.0: async-first derivations, the @solidjs/signals coresolid-signals
2026-11-18RxJS 9.0.0-beta.0 on master: the web-platform Observable, AbortSignal, no schedulersrxjs
2026-11-20Effect 4.1.5: v4 stable on the canonical repository, with Stream.switchMap and effect/reactivityeffect-ts

Suggested reading paths ​


Sources ​

Every deep-dive carries its own Sources section, pinned to the commits listed in the master catalog. The Sparkles side of the comparison cites the event-horizon sources and specification directly: