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

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.

主站蜘蛛池模板: 兴山县| 清流县| 太白县| 嘉黎县| 陇南市| 兰州市| 新野县| 阿克陶县| 达日县| 衡阳市| 旌德县| 巍山| 旬邑县| 宜黄县| 石河子市| 固始县| 曲靖市| 盐城市| 乐至县| 尚义县| 泰来县| 固阳县| 如东县| 四会市| 彰化市| 云霄县| 凌云县| 吉木萨尔县| 通海县| 且末县| 南开区| 呼玛县| 阿城市| 长葛市| 米林县| 城市| 嘉峪关市| 万安县| 天等县| 禹城市| 滨海县|