Skip to content

Reactive programming

Category: Async · Status: stub

One line: Describing a program as streams of values over time and the values derived from them, with changes propagating through automatically.

Also called: Rx, ReactiveX, Reactive Extensions, observables.

How it connects

flowchart LR
  n_async_stream["Async stream"]
  n_event_driven_programming["Event-driven programming"]
  n_reactive_programming["Reactive programming"]
  n_event_driven_programming ---|vs| n_reactive_programming
  n_reactive_programming -->|uses| n_async_stream
  classDef center stroke-width:3px
  class n_reactive_programming center
  classDef outside stroke-dasharray: 4 3
  class n_async_stream,n_event_driven_programming outside

In each language

Java Flow, the JDK's version of the reactive-streams interfaces
C# IObservable<T>, a provider for push-based notification
Kotlin Flow, including StateFlow, a SharedFlow that always holds the latest state value
Swift Combine ↗: publishers expose values that change over time, and subscribers receive them
Elsewhere ReactiveX ↗, whose Observable is the asynchronous, push counterpart of an Iterable

Where to read more