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

Capabilities for microservices coordination

This section lists the capabilities that the composite services require:

  • State management: Often the state manager component is required to manage the output state of the services that it is coordinating. This state will need to be held in a persistent store that is immune to server-side state management (SSM) failure. Another SSM instance should be able to retrieve the state and start where it left off.
  • Transaction control: Transaction boundaries are affected by microservices. Two separate function calls to two methods in a single transaction now become two separate service calls through a composite service. There are two approaches to handle this scenario.
    • Distributed transactions: These support the two-phase commit protocol. They are not scalable, increase latency and deadlocking scenarios, and need expensive products and infrastructure to support them. They may not be supported over selected protocols, such as REST or messaging. The benefit of this style is that the system is always in a consistent state.
    • Compensating transactions: Where the transaction control is functionally enforced by running functionally reverse transactions instead of trying to roll back to an earlier transaction. This is a more decoupled, and hence scalable, approach.
      We would recommend compensating transactions over distributed transactions due to simplification in the technical product requirements.
  • Post service call coordination: Atomic service calls can result in success, that is, when the constituent services have finished their work successfully; or a failure, when either of the coordination services has either not responded or failed in processing due to a technical or functional error. The composite service will need to get the response of the completed services and decide on the next step of action.
  • Timeout handling: Initiate a timer when starting a microflow. If the services do not respond in a particular time from starting the microflow, then raise an event to send to the event bus.
  • Configurability: Multiple instances of the SSM component will run to cater for various microflows. In each of the microflows, the service coordination, timer, and actions will differ. Hence, it is important to provide a framework that can have parameterized configuration of the timers, compensation transactions, and post-processing actions.
主站蜘蛛池模板: 灵台县| 龙胜| 龙游县| 成安县| 城步| 乃东县| 绍兴县| 射洪县| 文山县| 玛多县| 繁昌县| 曲松县| 志丹县| 乌恰县| 舟曲县| 京山县| 鄂托克前旗| 义乌市| 德安县| 都匀市| 凤阳县| 介休市| 洪湖市| 绥化市| 绥阳县| 昆明市| 龙门县| 沛县| 兴山县| 敦化市| 马龙县| 尤溪县| 新河县| 通榆县| 治县。| 高陵县| 双桥区| 西贡区| 石嘴山市| 霍山县| 井冈山市|