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

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.
主站蜘蛛池模板: 西昌市| 封开县| 比如县| 太原市| 南华县| 格尔木市| 祁连县| 三河市| 太仆寺旗| 康平县| 巨鹿县| 冕宁县| 鸡泽县| 浦东新区| 车险| 马尔康县| 合肥市| 德令哈市| 佛冈县| 高尔夫| 炎陵县| 怀来县| 响水县| 沅陵县| 平安县| 嘉定区| 临高县| 鲁山县| 云南省| 马鞍山市| 沿河| 望奎县| 界首市| 乐至县| 商南县| 兴和县| 日照市| 上栗县| 永嘉县| 上高县| 桃源县|