Preface
Funnily enough, my story of reactive programming started on one of the less-reactive platforms: Adobe Flash. Macromedia, before its acquisition by Adobe, built a sleek framework called Flex (later called Apache Flex). In Flex, one of the main concepts was the setData function of every rendering component. The setData function was intended to receive a data object that fully contained the information that the component was tasked to present. Having spent my younger years writing crafty DirectX C++ code, this was a beautiful separation of concerns, though I never quite fully figured out how the data was intended to be transformed between its original source and what the component expected to receive.
Fast-forward around six years and a few platforms, and I was starting a project with Samsung. On the way, during my time at the company Futurice, I tried to apply what I’d learned from Flex in different contexts with varying results—but ended up with more conceptual questions than answers.
This time, the task was to create a real-time sports application on Android with a range of data sources in different forms and delays. We’d often receive partial data that would be used to update, say, the match score only. It seemed like a nontrivial system to build with the standard tools. As the classic story goes, my colleague Juha Ristolainen had read a blog post about the new tool that could help: RxJava. I thought I’d give it a go.