SlideShare a Scribd company logo
first, let’s look at
something maybe
completely
unexpected…
(functional) reactive programming
as the only true way to overcome
ever-changing data
pavlo.baron@codecentric.de
@pavlobaron
what is non-reactive
programming?
a = 1!
b = a + 1!
// a == 1, b == 2
a = a + 1!
// a == 2, b == 2
what is reactive
programming?
a = 1!
b = a + 1!
// a == 1, b == 2
a = a + 1!
// a == 2, b == 3
or even…
a = 1!
b = a + 1!
c = b + 1!
// a == 1, b == 2, c == 3
a = a + 1!
// a == 2, b == 3, c == 4
and so on.
you get the point
what is functional
reactive programming?
!

f(g(h(i(j(a)))))!
!

with a changing over time
how can this be
modelled?
time,
signal,
event,
flow,
transport,
logic
are separated
values change over time. Logic
doesn’t explicitly take time
into account
every value change
signals/triggers re-computation
of the subgraph
of the logic relying
on the value
events are recurrent
or non-recurrent, not backing
any specific value.
They can be similar to signals,
but can also lead to
dynamic flow modification,
configuration propagation etc.
flow is
a dynamic graph of logic,
with routing rules based
on value dependencies
transport is
an infrastructural detail.
Transports implement flows in
a specific environment, be it a single
machine or a distributed system
logic defines what happens
when a value changes,
be it normal
or exceptional behaviour
2 example foundations
for (F)RP
disclaimer
!

no real code examples here,
as they don’t contribute to the communication of
concepts, but instead tend to end up in
discussions about syntax and programming
language theory.
!

Also, real code on slides, you know..
Erlang
(erlang.org)
there is no value re-assignment in Erlang.
Values changing
over time can be
“encapsulated” in the
process (actor) loop
signals can be modelled in Erlang
as messages sent to actor groups
with
every holding actor’s loop run
events can be modelled as
messages sent to relevant actors or
whole groups. Some events are
already provided by the runtime
flow can be modelled as hierarchy of
actors and their groups, with the ability to
dynamically change it,
add new actors or even modify
their code at runtime
transport is what the runtime already
offers out-of-the-box: message
delivery to local actors or remote ones,
with location transparency
logic can be implemented as
pattern-matched functions,
called as actors’ callbacks on
arriving messages
Erlang doesn’t implement (F)RP
abstractions as first-class citizens,
but it offers more general
abstractions to model these
Elm
(elm-lang.org)
little example from
Elm web page.
!

(hope it still works,
‘cause sometimes live demos
just don’t work..)
values changing over time
represent UI elements, time ticks,
mouse position and other values
that can (interactively) change
signals and events are
combined, simplifying
programming interface
flow is combination of signals,
through the nature of programming
for the web-browser configurable
and changeable
signal transportation is done trough
“lifting” of signals through functions,
out-of-the-box available HTTP
communication with a “server”
logic are reusable, minimal,
theoretically sequentially
combinable, regular functions
Elm implements FRP
pragmatically, focused on webbrowser applications and UIbased interactions
more example foundations exist,
implementing the
concepts partially or fully,
adopting them as far as possible
for a particular platform.
!

Rx*, Reactor, Akka, Bacon.js +++
(Functional) reactive programming (@pavlobaron)
thought experiment:
modelling immediate,
continuous analytics on never
ending streams of data
values changing over time
appear as payloads on streams
from different channels
signals are notifications sent to a
component’s downstream whenever
it has computed a value based on
its upstream. Signal is an indication
of new / modified value availability
events are recurrent time
ticks, configuration and
flow modifications etc.
flow is a topology of
components, connected
through streams
transport is inner-process, inter-process
and distributed communication through
embedded or external messaging
middleware
logic are reusable, theoretically
sequentially combinable components
that implement minimal pieces such
as statistics, filters, aggregates,
parts of continuous queries etc.
what problem domains
can be addressed by
(F)RP?
interaction
streaming
robotics
continuous analytics
M2M communication
++
theoretically every problem where complex,
hierarchical/staged logic needs to be
reapplied when some values constantly change
what are implications
of (F)RP on architecture?
reaction
paradigm switch
declarative flow control
different approach to testing
harder to debug
overflow protection
high componentisation
thank you

More Related Content

PPTX
Pascal Programming Language
PPTX
Procedural programming
PDF
Algorithms and Their Explanations
PDF
Pattern-based Definition and Generation of Components for a Synchronous React...
PPT
Basic structure of C++ program
PDF
Programming paradigms c1
PPTX
High performance computing language,julia
PDF
A New Model Checking Tool
Pascal Programming Language
Procedural programming
Algorithms and Their Explanations
Pattern-based Definition and Generation of Components for a Synchronous React...
Basic structure of C++ program
Programming paradigms c1
High performance computing language,julia
A New Model Checking Tool

Viewers also liked (20)

PDF
Chloe and the Realtime Web
PDF
LXC, Docker, and the future of software delivery | LinuxCon 2013
KEY
Brunch With Coffee
PDF
Riak Search - Erlang Factory London 2010
PDF
Blazes: coordination analysis for distributed programs
PDF
Hyperdex - A closer look
PDF
ElasticSearch - index server used as a document database
PDF
Complex Legacy System Archiving/Data Retention with MongoDB and Xquery
PDF
NkSIP: The Erlang SIP application server
PDF
Spring Cleaning for Your Smartphone
PDF
Web-Oriented Architecture (WOA)
PDF
Interoperability With RabbitMq
PDF
Scalable XQuery Processing with Zorba on top of MongoDB
PDF
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
PPS
Erlang plus BDB: Disrupting the Conventional Web Wisdom
PDF
Shrinking the Haystack" using Solr and OpenNLP
PDF
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
PPTX
AST - the only true tool for building JavaScript
PDF
Erlang as a cloud citizen, a fractal approach to throughput
PDF
Pregel: A System for Large-Scale Graph Processing
Chloe and the Realtime Web
LXC, Docker, and the future of software delivery | LinuxCon 2013
Brunch With Coffee
Riak Search - Erlang Factory London 2010
Blazes: coordination analysis for distributed programs
Hyperdex - A closer look
ElasticSearch - index server used as a document database
Complex Legacy System Archiving/Data Retention with MongoDB and Xquery
NkSIP: The Erlang SIP application server
Spring Cleaning for Your Smartphone
Web-Oriented Architecture (WOA)
Interoperability With RabbitMq
Scalable XQuery Processing with Zorba on top of MongoDB
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Shrinking the Haystack" using Solr and OpenNLP
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
AST - the only true tool for building JavaScript
Erlang as a cloud citizen, a fractal approach to throughput
Pregel: A System for Large-Scale Graph Processing
Ad

Similar to (Functional) reactive programming (@pavlobaron) (20)

PDF
Buy ebook Functional Reactive Programming 1st Edition Stephen Blackheath chea...
PDF
Functional Reactive Programming / Compositional Event Systems
PDF
Functional Reactive Programming in Clojurescript
PPTX
Real world functional reactive programming
PDF
ReactiveCocoa - Functional Reactive Programming concepts in iOS
PPTX
RxJS vs RxJava: Intro
PDF
Reactive programming - Observable
PDF
Moving towards Reactive Programming
PDF
Flow Base Programming with Node-RED and Functional Reactive Programming with ...
PPTX
WTF is Reactive Programming
PDF
How do you do that in FRP
PDF
Code europe
PDF
Introduction To Functional Reactive Programming Poznan
PDF
Reactive systems
PPTX
Functional Reactive Programming
PDF
Funtional Reactive Programming with Examples in Scala + GWT
PDF
Intro to Functional Reactive Programming In Scala
PDF
Functional Reactive Programming - What does it solve? Does it solve things? L...
Buy ebook Functional Reactive Programming 1st Edition Stephen Blackheath chea...
Functional Reactive Programming / Compositional Event Systems
Functional Reactive Programming in Clojurescript
Real world functional reactive programming
ReactiveCocoa - Functional Reactive Programming concepts in iOS
RxJS vs RxJava: Intro
Reactive programming - Observable
Moving towards Reactive Programming
Flow Base Programming with Node-RED and Functional Reactive Programming with ...
WTF is Reactive Programming
How do you do that in FRP
Code europe
Introduction To Functional Reactive Programming Poznan
Reactive systems
Functional Reactive Programming
Funtional Reactive Programming with Examples in Scala + GWT
Intro to Functional Reactive Programming In Scala
Functional Reactive Programming - What does it solve? Does it solve things? L...
Ad

More from Pavlo Baron (20)

PDF
@pavlobaron Why monitoring sucks and how to improve it
PDF
Why we do tech the way we do tech now (@pavlobaron)
PDF
Qcon2015 living database
PDF
Becoming reactive without overreacting (@pavlobaron)
PPTX
The hidden costs of the parallel world (@pavlobaron)
PDF
data, ..., profit (@pavlobaron)
PDF
Data on its way to history, interrupted by analytics and silicon (@pavlobaron)
PDF
Near realtime analytics - technology choice (@pavlobaron)
PDF
Set this Big Data technology zoo in order (@pavlobaron)
PDF
a Tech guy’s take on Big Data business cases (@pavlobaron)
PDF
Diving into Erlang is a one-way ticket (@pavlobaron)
PDF
Dynamo concepts in depth (@pavlobaron)
PDF
Chef's Coffee - provisioning Java applications with Chef (@pavlobaron)
PDF
From Hand To Mouth (@pavlobaron)
PDF
The Big Data Developer (@pavlobaron)
PDF
What can be done with Java, but should better be done with Erlang (@pavlobaron)
PDF
20 reasons why we don't need architects (@pavlobaron)
PDF
NoSQL - how it works (@pavlobaron)
PDF
Theoretical aspects of distributed systems - playfully illustrated (@pavlobaron)
PDF
The Agile Alibi (Pavlo Baron)
@pavlobaron Why monitoring sucks and how to improve it
Why we do tech the way we do tech now (@pavlobaron)
Qcon2015 living database
Becoming reactive without overreacting (@pavlobaron)
The hidden costs of the parallel world (@pavlobaron)
data, ..., profit (@pavlobaron)
Data on its way to history, interrupted by analytics and silicon (@pavlobaron)
Near realtime analytics - technology choice (@pavlobaron)
Set this Big Data technology zoo in order (@pavlobaron)
a Tech guy’s take on Big Data business cases (@pavlobaron)
Diving into Erlang is a one-way ticket (@pavlobaron)
Dynamo concepts in depth (@pavlobaron)
Chef's Coffee - provisioning Java applications with Chef (@pavlobaron)
From Hand To Mouth (@pavlobaron)
The Big Data Developer (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
20 reasons why we don't need architects (@pavlobaron)
NoSQL - how it works (@pavlobaron)
Theoretical aspects of distributed systems - playfully illustrated (@pavlobaron)
The Agile Alibi (Pavlo Baron)

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
MIND Revenue Release Quarter 2 2025 Press Release
20250228 LYD VKU AI Blended-Learning.pptx
Understanding_Digital_Forensics_Presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Programs and apps: productivity, graphics, security and other tools
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The AUB Centre for AI in Media Proposal.docx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectroscopy.pptx food analysis technology
Advanced methodologies resolving dimensionality complications for autism neur...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Review of recent advances in non-invasive hemoglobin estimation
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity

(Functional) reactive programming (@pavlobaron)