You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/08/15 07:49:57 UTC

[GitHub] zhengyangyong commented on a change in pull request #32: add safa service-center-reference user guide. CN& EN version

zhengyangyong commented on a change in pull request #32:  add safa  service-center-reference user guide. CN& EN version
URL: https://github.com/apache/incubator-servicecomb-docs/pull/32#discussion_r210193816
 
 

 ##########
 File path: saga-reference/en_US/design.md
 ##########
 @@ -0,0 +1,46 @@
+# Saga Pack Design
+[![ZH doc](https://img.shields.io/badge/document-中文-blue.svg)](design_zh.md)
+## Overview
+Pack contains two components: *alpha* and *omega*. Alpha is the pack leader and backed by database to make sure transaction events stored permanently while omega is the pack worker and embedded inside services to intercept transaction invocation and report events to alpha.
+
+![Pack Architecture](static_files/pack.png)
+
+## Omega Internal
+Omega plays as an embedded agent inside services. When a service request arrives, omega intercepts its header and retrieve the global transaction id as its global transaction id (Saga event id) and retrieve the local transaction id as its parent transaction id. In pre-process phase, a transaction started event will be recorded in alpha. In post-process phase, a transaction ended event will be recorded in alpha to mark the end of the sub-transaction.
+
+![Omega Internal](static_files/omega_internal.png)
+
+## Inter-Service Communication
+The process of Inter-Service Communication is similar to [Zipkin](https://github.com/openzipkin/zipkin)'s. In the producer side, omega intercepts the transaction ids from request to retrieve the transaction context. In the consumer side, omega inject the global transaction ids into request to pass the transaction context. Sub-transactions can chain as a single global transaction by co-operating producers and consumers.
+
+![Inter-Service Communication](static_files/inter-service_communication.png)
+
+## Workflow Saga
+Saga处理场景是要求相关的子事务提供事务处理函数同时也提供补偿函数。Saga协调器alpha会根据事务的执行情况向omega发送相关的指令,确定是否向前重试或者向后恢复。
 
 Review comment:
   please translate to en

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services