Mais conteúdo relacionado Semelhante a Dataflow: the concurrency/parallelism architecture you need (20) Mais de Russel Winder (20) Dataflow: the concurrency/parallelism architecture you need3. @russel_winder#devoxxuk #dataflowrules Copyright © 2014 Russel Winder
What are (in computing†
):
Concurrency:
Structuring solution and code
such that multiple parts may
execute independently and
possibly even at the same
time.
Parallelism:
Execute multiple parts of a
system at the same time on
different processors so as to
get things working faster.
†
In natural language these words have very different meanings.
4. @russel_winder#devoxxuk #dataflowrules Copyright © 2014 Russel Winder
What is Dataflow?
An architecture comprising channels allowing data to flow from
one operator to another, where each operator has multiple
input channels and multiple output channels, and executes
code only in response to the arrival of data on the inputs.
5. @russel_winder#devoxxuk #dataflowrules Copyright © 2014 Russel Winder
Historically
Dataflow computers:
– Values flowing between…
–…operators that calculate…
–…new values to pass to…
–…other operators.
Dataflow hardware didn't take
off, but the architecture works
at various scales.
The Manchester Prototype Dataflow Computer
J R Gurd, C C Kirkham, I Watson
CACM 28(1), 1985-01.
6. @russel_winder#devoxxuk #dataflowrules Copyright © 2014 Russel Winder
Dataflow diagrams have been an
integral part of analysis and design of
information systems since the 1970s
T de Marco, Structured Analysis and Systems Specification,
Yourdon Press, NY, 1978.
8. @russel_winder#devoxxuk #dataflowrules Copyright © 2014 Russel Winder
Dataflow and Functional
Operators seem like they
might be pure functions,
but…
…they are not necessarily,
operators may have internal
state.
Operators may be referentially
transparent, but they may be
not.
Operators may even have side
effects.
16. @russel_winder#devoxxuk #dataflowrules Copyright © 2014 Russel Winder
Architectural Issue
Each of the aforementioned frameworks assumes that each
operator creates a single value. Communication is by dataflow
variables: each dataflow variable is a thread-safe single
assignment variable.
27. @russel_winder#devoxxuk #dataflowrules Copyright © 2014 Russel Winder
Summary
Dataflow is an architecture:
Event-driven, single-threaded
operators communicating by
message passing using
channels.
Dataflow is an easement:
Synchronization is inherent in
the model, and there is no
shared memory, so all
deadlocks are trivial.