imlidian commented on a change in pull request #77:  add saga  quick start
URL: https://github.com/apache/servicecomb-docs/pull/77#discussion_r251190137
 
 

 ##########
 File path: saga-reference/zh_CN/quickstart.md
 ##########
 @@ -0,0 +1,69 @@
+# Apache ServiceComb Pack
+Apache ServiceComb Pack QuickStart
+saga-servicecomb-demo中的Saga代码解读
+
+## 全局事务执行过程
+
+在SagaStartAnnotationProcessor
+Annotation被触发  
+1 当Request发送请求
+2 调用preIntercept 发送 SagaStartedEvent 开始事务  
+3 调用postIntercept 发送 SagaEndedEvent 事务结束执行  
+
+compensableAnnotationProcessor执行补偿  
+路径:servicecomb/saga/omega/transaction/
+
+### EnableOmega
+
+   ```
+   //BookingApplication Class 
 
 Review comment:
   done
   ## Demo中的Pack场景
   Pack中包含两个组件,即 alpha 和 omega。
   
图中的三个服务,booking、car、hotel均为omega进程,且通过alpha协调。booking调用car与hotel,且omega像一个agent内嵌其中负责:
  
   1)对方法调用以切面方式(AOP)拦截并向alpha上报事务事件。  
   2)异常情况下根据alpha下发的指令执行相应的补偿操作。  
   *异常情况指事务执行失败,或者请求超时等  
   而alpha充当协调者的角色,主要负责:  
        (1)对本地事务(子事务)的事件进行持久化存储  
        (2)在本地事务(子事务)与全局事务出现不一致的情况下,Alpha会调用Omega进行相关的补偿,使其得以最终与全局事务的状态保持一致  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to