Reactive Programming - Reactive Manifesto - Reactive programming specification

Reactive Manifesto - reactive programming specification - features

Reactive programming is a step towards a reactive system. Since reactive programming and reactive systems are such a large and challenging concept, a group of developers has come up with a manifesto for it.

In 2013, the Reactive Manifesto was created in order to spell out the core principles of reactive programming. The goal was to specify a collection of protocols, methods, and interfaces that can be used to express the essential processes and entities.

From https://reactivemanifesto.org/

There are four fundamental characteristics that a reactive system must have:

  1. Responsive
  2. Resilient
  3. Elastic
  4. Message Driven

Principles of the specification

  1. Non-blocking IO
  2. asynchronous
  3. stream based communication
  4. backpressure handling

Communication patterns enabled by reactive programming specification

Reactive programming is Push/Pull hybrid model.

  1. request <-> response
    1. Traditional services. You send a request, you receive a response.
  2. request <-> streaming response
    1. You send a request. You receive a streaming response.
    2. Analogies:
      1. Stock price updates.
      2. Order a pizza. Get a message when the order is received. Get a message when the pizza is in the oven. Get a message when the pizza is out of the oven. Get a message when the delivery person is at your door. etc.
  3. streaming-request <-> response
    1. You send a streaming request.
    2. We don’t send one http request for each change. Instead, it is a stream of requests.
    3. Analogies
      1. Video streaming
      2. Working on a google doc online.
      3. Wearing a health monitoring device. It keeps sending biometric values to the service in real time.
  4. bidirectional streaming
    1. combination of the two above.
    2. Analogies:
      1. Online gaming

Links to this note