There seems to be a lot of confusion about Reactive Programming. What is it? Who created it?
The earliest reference I could find was written by Gérard Berry (one of the creators of the Esterel dataflow language) in his 1989 paper, "Real time programming: Special purpose or general purpose languages." I emailed him to see if he knew of an earlier use. Mr. Berry pointed me to the 1985 paper, "On the development of reactive systems" by David Harel and Amir Pnueli. After contacting Professor Harel, he confirmed that they where the originators of the term.
So it would seem that Reactive Programming is at least 30 years old.
Harel and Pnueli's paper discussed designing reactive systems in general, software or hardware. Their definition was...
"Reactive systems... are repeatedly prompted by the outside world and their role is to continuously respond to external inputs." D. Harel and A. Pnuli, "On the Development of Reactive Systems" (1985)
Mr. Berry's paper focused on the software aspects of Reactive Programming...
"It is convenient to distinguish roughly between three kinds of computer programs. Transformational programs compute results from a given set of inputs; typical examples are compilers or numerical computation programs. Interactive programs interact at their own speed with users or with other programs; from a user point of view a time-sharing system is interactive. Reactive programs also maintain a continuous interaction with their environment, but at a speed which is determined by the environment, not by the program itself. Interactive programs work at their own pace and mostly deal with communications, while reactive programs only work in response to external demands and mostly deal with accurate interrupt handling.
Real-time programs are usually reactive. However, there are reactive program that are not usually considered as being real-time, such as protocols, system drivers or man-machine interface handlers. All reactive programs require a common programming style.
Complex applications usually require establishing cooperation between the three kinds of programs. For example, a programmer uses a man-machine interface involving menus, scroll bars and other reactive devices. The reactive interface permits him to tell the interactive operating systems to start transformational computations such as program compilations." Berry, Gérard. "Real time programming: Special purpose or general purpose languages." (1989)
From the preceding quotes we can say that reactive programs...
- Activate in response to external demands
- Mostly deal with handling parallelism
- Operate at the rate of incoming data
- Often work in cooperation with transformational and interactive aspects
The definition of dataflow is a little more vague. Any system where the data moves between code units and triggers execution of the code could be called dataflow, that includes reactive systems. Thus, I consider Reactive Programming to be a subset of dataflow but a rather large subset. In casual use, Reactive Programming it is often a synonym for dataflow.
In more recent years Reactive Programming has become associated with two elements. Microsoft's Reactive Extensions and Typesafe's Reactive Manifesto.
Some people believe that Erik Meijer (formerly of Microsoft) and Jonas Bonér (of Typesafe) are trying to claim an old idea and call it their own. I am quite sure both of them are very aware of all of the previous work that has gone into Reactive Programming and dataflow. Mr. Bonér wrote about his observations on the resurgence of old techniques to solve new problems...
"...Over the last few years we have seen quite a few different techniques and tools emerge in the industry as a way to address these new requirements. Some of them are old and proven, but to a large extent forgotten techniques, while others are novel and creative." Why Do We Need a Reactive Manifesto
Reactive Programming and dataflow are old ideals that are being rediscovered because they help us solve problems we currently face.