官术网_书友最值得收藏!

Reactive systems

A reactive system is a definition of a set of principles that are needed to maintain the responsiveness of and build systems that are able to respond to requests even with failures or under heavy load.

To build such a system, a reactive system chooses a message-driven model that is considered reliable and performant. All the components interact with each other using messages that are sent and received asynchronously. To decouple senders and receivers, components send and receive messages using virtual addresses.

But what's a virtual address? It's a destination identifier that's usually expressed as a URL. The delivery semantic depends on the technology used in the reactive programming frameworks to implement them.

In this design, there is no block during the execution of the flow—senders do not wait for a response; they may receive a response later and in the meantime, they can continue to do their job of sending other messages.

So the main core of a reactive system is an asynchronous messaging design that should be able to guarantee the following properties:

  • Elasticity: The ability to scale horizontally that comes from the decoupling provided by message interactions. A load balance strategy is used by consumers of the messages, which are sent to a virtual address to distribute the load and guarantee high performance.
  • Resilience: The ability to handle failure and to recover messages that comes from the ability to handle failure without blocking the execution of the services workflow. Thanks to the asynchronous aspect, components don't wait for responses and a potential failure of one component would not impact others. Furthermore, when a node that is consuming a message fails in the operation, the message can be processed by another node registered on the same address.

With the possession of these two characteristics, a system could be considered responsive.

This set of principles is very important when you intend to build microservice systems that are distributed and that are beyond the control of the caller.

主站蜘蛛池模板: 和静县| 仙居县| 长武县| 五大连池市| 蒙城县| 台南县| 嘉鱼县| 静宁县| 姜堰市| 江津市| 宁蒗| 华蓥市| 富川| 连云港市| 舞钢市| 太原市| 民县| 祥云县| 沁阳市| 安塞县| 涞水县| 仁布县| 莎车县| 克拉玛依市| 舒城县| 柘荣县| 明溪县| 肥东县| 奇台县| 弥渡县| 阳城县| 苍梧县| 德钦县| 石首市| 怀集县| 荆州市| 盘山县| 阿鲁科尔沁旗| 巴塘县| 林周县| 屏南县|