You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/03/27 02:12:29 UTC

[incubator-servicecomb-saga] branch master updated: Add a FAQ list

This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git


The following commit(s) were added to refs/heads/master by this push:
     new 2019acf  Add a FAQ list
2019acf is described below

commit 2019acfe0b91d9cae9de2be18566061acdb31cc1
Author: Daniel Qian <ch...@gmail.com>
AuthorDate: Tue Mar 27 09:22:42 2018 +0800

    Add a FAQ list
---
 FAQ.md       | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 FAQ_ZH.md    | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 README.md    |  3 +--
 README_ZH.md |  3 +--
 4 files changed, 94 insertions(+), 4 deletions(-)

diff --git a/FAQ.md b/FAQ.md
new file mode 100644
index 0000000..a15c894
--- /dev/null
+++ b/FAQ.md
@@ -0,0 +1,46 @@
+# FAQ
+
+**Q1: Is Saga executed synchronously or asynchronously?Will Saga not be finished until all sub-transaction finished?**
+
+Currently Saga is executed synchronously. Asynchronous mode will be implemented in future.
+
+
+**Q2: How are sub-transactions executed by Saga, in parallel or in sequence?**
+
+How Saga pack executes sub-transaction depends on your code. If you call `@Compensable` method in parallel, then Saga Alpha will process in parallel. 
+
+
+**Q3: Any requirements on `@Compensable` method and compenstation method?**
+
+Here are the requirements:
+
+1. Both methods should be idempotent.
+1. Both methods have exactly same parameter list.
+1. Both methods are in same class.
+1. Parameter should be serializable.
+1. They should be commutative. For example, if given same parameters, the result should be same regardless the order of execution.
+
+
+**Q4: Does Saga guarantee ACID?**
+
+Saga guarantees Atomicity, Consistency, Durability, but not guarantee Isolation。
+
+
+**Q5: Can Saga be nested?**
+
+Yes, Saga can be nested.
+
+
+**Q6: How to scale Saga Alpha horizontally?**
+
+Saga Alpha is stateless, all data is persisted in database, so it supports horizontal scale.
+
+
+**Q7: Will Saga continue if some services crashed in execution?**
+
+Saga Alpha will try to continue Saga execution after service restart.
+
+
+**Q8: How to use MySQL as alpha's backend database?**
+
+Check this [doc](docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md)
diff --git a/FAQ_ZH.md b/FAQ_ZH.md
new file mode 100644
index 0000000..4170757
--- /dev/null
+++ b/FAQ_ZH.md
@@ -0,0 +1,46 @@
+# FAQ
+
+**Q1: Saga的执行是同步的还是异步的?发起Saga之后,是等所有Sub-transaction都完成才返回,还是立即返回?**
+
+目前Saga事情的执行是同步的,后续我们会提供异步方式的实现。
+
+
+**Q2: Saga是并行还是顺序执行Sub-transaction的?**
+
+Saga pack是根据调用的代码来决定Saga事件,如果Saga子事件是并行方式调用的, 那Saga协调器也是采用并行方式进行处理的。
+
+
+**Q3: 对于@Compensable方法及compenstation方法有什么要求?**
+
+有以下要求:
+
+1. 这两个方法幂等。
+1. 这两个方法的参数列表完全一致。
+1. 这两个方法在写在同一个类中。
+1. 参数要能够序列化。
+1. 这两个方法是可交换的,即如果参数相同,这两个方法无论以什么顺序执行结果都是一样的。
+
+
+**Q4: Saga保证ACID吗?**
+
+Saga保证原子性(Atomicity)、一致性(Consistency)、持久性(Durability),但不保证隔离性(Isolation)。
+
+
+**Q5: Saga可以嵌套吗?**
+
+Saga实现支持子事件嵌套的方式。
+
+
+**Q6: 如何水平扩展Saga Alpha?**
+
+Saga Alpha在设计过程中状态信息都存储到数据库,是支持水平扩展的。
+
+
+**Q7: 在执行Saga过程中某个服务崩溃了,那么重启后Saga还会继续执行吗?**
+
+在服务重启后,Saga Alpha会尝试继续执行Saga。
+
+**Q8: 如何使用MySQL作为alpha的后台数据库?**
+
+参阅这篇[文档](docs/faq/cn/how_to_use_mysql_as_alpha_backend_database.md)
+
diff --git a/README.md b/README.md
index 2074ed3..49e2964 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,7 @@ See [Booking Demo](saga-demo/booking/README.md) for details.
 ## User Guide
 How to build and use can refer to [User Guide](docs/user_guide.md).
 
-## FAQ
-* [How to use MySQL as alpha's backend database?](docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md)
+## [FAQ](FAQ.md)
 
 ## Contact Us
 * [issues](https://issues.apache.org/jira/browse/SCB)
diff --git a/README_ZH.md b/README_ZH.md
index 98bf460..ebaf59c 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -25,8 +25,7 @@ Saga是由 **alpha** 和 **omega**组成,其中:
 ## 用户指南
 如何构建和使用可浏览[用户指南](docs/user_guide_zh.md)。
 
-## 常见问题
-* [如何使用MySQL作为alpha的后台数据库?](docs/faq/cn/how_to_use_mysql_as_alpha_backend_database.md)
+## [常见问题](FAQ_ZH.md)
 
 ## 联系我们
 * [提交issues](https://issues.apache.org/jira/browse/SCB)

-- 
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.