Reactive hardcore: how to implement own Publisher<?>
Reactive-Streams brought a new, amazing standard for Reactive Libraries users as well as broader horizon of hardcore problems for the standard’s adopters. During this talk, we will walk through all the steps of implementing RS Publisher<?> in Java. Finally, we will get an understanding how to build the CORRECT implementation of that interface, test it, and ensure that other popular solutions work similarly.
The more popular Reactive Programming/Libraries become, the more often we have to deal with those techniques and solutions. Sometimes we have to deal just with smoothies API of Reactive Extensions, sometimes we have to dive into the internals of those libraries, or sometimes we have to build our own implementation. Nevertheless, understanding of the basics patterns, behavior that is hidden inside the most of Reactive Libraries, Tool-Kits / Best Practice might simplify our – life with / debugging of / implementation of Reactive Library.
Usually reading a tone of papers and blogs about the internals of Reactive Libraries, specific rules of Reactive Streams Specification or simply grasping the source code becomes hardcore. Hence, we will summarize all important by implementing own Publisher<> using Java.
What will we do to learn? We will:
remind the sense and importance of Reactive Streams Specification;
naively implement our first solution and fail of course;
find toolkit which will help in verification of the implementation;
iteratively follow all the rules of Reactive Streams and implement the correct solution;
compare our solution to what we have, for example, in Project Reactor and ensure that used patterns are same;
summarize best practices and recap patterns used in the demo.