Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-437

[Doc] Provide a FAQ list for Saga project

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • saga-0.2.0
    • Saga
    • None

    Description

      Provide a FAQ list for Saga project

      Attachments

        Issue Links

          Activity

            githubbot ASF GitHub Bot added a comment -

            chanjarster opened a new pull request #163: SCB-437 Add a FAQ list
            URL: https://github.com/apache/incubator-servicecomb-saga/pull/163

            Follow this checklist to help us incorporate your contribution quickly and easily:

            • [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
            • [ ] Each commit in the pull request should have a meaningful subject line and body.
            • [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue.
            • [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
            • [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
            • [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).

            ----------------------------------------------------------------
            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

            githubbot ASF GitHub Bot added a comment - chanjarster opened a new pull request #163: SCB-437 Add a FAQ list URL: https://github.com/apache/incubator-servicecomb-saga/pull/163 Follow this checklist to help us incorporate your contribution quickly and easily: [ ] Make sure there is a [JIRA issue] ( https://issues.apache.org/jira/browse/SCB ) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. [ ] Each commit in the pull request should have a meaningful subject line and body. [ ] Format the pull request title like ` [SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement] ( https://www.apache.org/licenses/icla.pdf ). — ---------------------------------------------------------------- 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
            githubbot ASF GitHub Bot added a comment -

            coveralls commented on issue #163: SCB-437 Add a FAQ list
            URL: https://github.com/apache/incubator-servicecomb-saga/pull/163#issuecomment-376367269

            [![Coverage Status](https://coveralls.io/builds/16192608/badge)](https://coveralls.io/builds/16192608)

            Coverage increased (+0.2%) to 95.504% when pulling *e4513cb1b9b727c8ddc3bda2af82d8585815cd29 on chanjarster:faq* into *d71d1bc8315976b70e7566a0dc39ad2310cf9186 on apache:master*.

            ----------------------------------------------------------------
            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

            githubbot ASF GitHub Bot added a comment - coveralls commented on issue #163: SCB-437 Add a FAQ list URL: https://github.com/apache/incubator-servicecomb-saga/pull/163#issuecomment-376367269 [! [Coverage Status] ( https://coveralls.io/builds/16192608/badge)](https://coveralls.io/builds/16192608 ) Coverage increased (+0.2%) to 95.504% when pulling * e4513cb1b9b727c8ddc3bda2af82d8585815cd29 on chanjarster:faq * into * d71d1bc8315976b70e7566a0dc39ad2310cf9186 on apache:master *. ---------------------------------------------------------------- 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
            githubbot ASF GitHub Bot added a comment -

            WillemJiang closed pull request #163: SCB-437 Add a FAQ list
            URL: https://github.com/apache/incubator-servicecomb-saga/pull/163

            This is a PR merged from a forked repository.
            As GitHub hides the original diff on merge, it is displayed below for
            the sake of provenance:

            As this is a foreign pull request (from a fork), the diff is supplied
            below (as it won't show otherwise due to GitHub magic):

            diff --git a/FAQ.md b/FAQ.md
            new file mode 100644
            index 00000000..a15c8942
            — /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 00000000..41707578
            — /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 2074ed33..49e29640 100644
            — a/README.md
            +++ b/README.md
            @@ -25,8 +25,7 @@ See [Booking Demo](saga-demo/booking/README.md) for details.

              1. User Guide
                How to build and use can refer to [User Guide](docs/user_guide.md).
                1. 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)
              1. Contact Us
            • [issues](https://issues.apache.org/jira/browse/SCB)
              diff --git a/README_ZH.md b/README_ZH.md
              index 98bf460c..ebaf59ca 100644
                • a/README_ZH.md
                  +++ b/README_ZH.md
                  @@ -25,8 +25,7 @@ Saga是由 *alpha* 和 *omega*组成,其中:
              1. 用户指南
                如何构建和使用可浏览[用户指南](docs/user_guide_zh.md)。
                1. 常见问题
              • [如何使用MySQL作为alpha的后台数据库?](docs/faq/cn/how_to_use_mysql_as_alpha_backend_database.md)
                +## [常见问题](FAQ_ZH.md)
              1. 联系我们

            ----------------------------------------------------------------
            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

            githubbot ASF GitHub Bot added a comment - WillemJiang closed pull request #163: SCB-437 Add a FAQ list URL: https://github.com/apache/incubator-servicecomb-saga/pull/163 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 00000000..a15c8942 — /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 00000000..41707578 — /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 2074ed33..49e29640 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 98bf460c..ebaf59ca 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 ) ---------------------------------------------------------------- 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
            njiang Willem Jiang added a comment -

            Merged the patch into master branch with thanks to Daniel.

            njiang Willem Jiang added a comment - Merged the patch into master branch with thanks to Daniel.

            People

              chanjarster Daniel Qian
              chanjarster Daniel Qian
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: