An Event stream is a sequence of events.
A Sequence is an observable Source.
A Source can be observed and act as entry point.
An Observer registers its interest on an Observable through
The Observable pushes data to the Observer.
The Subscription returns a Disposable so the Observer can
stop receive notifications before the sequence ends.
General theory of reactivity
Pull / Sync /
Object Iterables (Array / Set /
Push / Async /
Array | Iterator - consumer synchronously pulls values
Observable | Observer - producer asynchronously pushes
values to the consumer
Enumerable collection interfaces IEnumerable<T>and
IEnumerator<T>are dual to interfaces of observable
collections IObservable<T>and IOberserver<T>
Subject/Observer is Dual to Iterator by Erik Meijer
Functional reactive programming
How to build reactive systems using
mathematical functions for describing the
universe and it's components, keeping
functional as the higher matter?
The semantic model of FRP in side-effect
free languages is typically in terms of
continuous functions, and typically over
FRP has well known and defined interfaces
Values that vary over continuous (clock like) time
Events which have occurrences at discrete points in time.
Originates from FRAN (Haskell's functional-reactive
aims onto handling of async sequences from multiple
sources over time
time isn't continuous but discrete, the universe is
mutable (setters) and execution environment can be
single-threaded (browser, node)
Functional in RP is a quality of the implementation detail
(HOF, map, filter, reduce)
RX separates notion of time from reactivity and focuses
more on concurrency