Let's examine our application and see how it would look with the reactive style of programming. The following diagram depicts the flow of the application that is reactive in nature and is completely event-driven. In this diagram, services are depicted by hexagons, and events are represented by square boxes. Here's the entire flow in detail:
The flow depicted in the diagram describes the scenario of a customer placing an order after having searched for the items he/she is looking for. The Place order event is raised to Order service. In response to this event, our service analyzes arguments, such as order item and quantity, and raises the Item available event to Product service. From here on, there are two possible outcomes: either the requested product is available and has the required quantity or it is not available or doesn't have...