Reactive programming, the basics

Reactive programming is a programming paradigm which is supported in frameworks like Spring 5 (Project Reactor) and Java 9 (Reactive Streams). Earlier there was already support with RxJava, Project Reactor and the Reactive Streams standard. As such the concepts behind Reactive programming are not new but using them becomes easier and more supported.

  • Reactive programming will help us deal with threads more efficiently. Rather than working with one thread per request, all tasks will be shared over multiple threads. All tasks will be handled without blocking a thread while waiting for a response. [async] [non-blocking]
  • (Parts of) Information is provided as soon as it is available, even without knowing how much more will be provided. [streams]
  • If a client requests an async stream from a server, the client can inform the server about when and how much information he is willing to handle. [backpressure]  

 

Of course, there is a lot more to it, but we want to keep the information responsive and processable.
To stay informed in a non blocking way, Follow us on Twitter: @FarosBelgium