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

Supporting building self-organizing systems

Microservices help us build self-organizing systems. A self-organizing system supporting automated deployment will be resilient and exhibits self-healing and self-learning capabilities.

In a well-architected microservice system, services are unaware of other services. It accepts a message from a selected queue and processes the message. At the end of the process, it may send out another message that triggers other services. This allows us to drop any service into the ecosystem without analyzing the impact on the overall system. Based on the input and output, the service will self-organize into the ecosystem. No additional code changes or service orchestration is required. There is no central brain to control and coordinate the processes.

Imagine an existing notification service that listens to an INPUT queue and sends notifications to a Simple Mail Transfer Protocol (SMTP) server as follows:

If later, a personalization engine needs to be introduced to personalize messages before sending it to the customer, the personalization engine is responsible for changing the language of the message to the customer's native language.

The updated service linkage is shown as follows:

With microservices, a new personalization service will be created to do this job. The input queue will be configured as INPUT in an external configuration server. The personalization service will pick up the messages from the INPUT queue (earlier, this was used by the notification service), and send the messages to the OUTPUT queue after completing the process. The notification service's input queue will then send to OUTPUT. From the very next moment onward, the system automatically adopts this new message flow.

主站蜘蛛池模板: 布尔津县| 阜新市| 鄂尔多斯市| 大荔县| 南充市| 贵溪市| 临夏市| 郴州市| 黄平县| 哈密市| 邢台市| 红安县| 莲花县| 商城县| 潮安县| 丽江市| 宁强县| 浪卡子县| 汤原县| 海林市| 绩溪县| 高安市| 桐乡市| 衡水市| 宁河县| 布尔津县| 偏关县| 文化| 大丰市| 铜陵市| 法库县| 西城区| 三原县| 揭阳市| 泰宁县| 大城县| 长寿区| 习水县| 万安县| 石楼县| 临清市|