From dev-return-2419-archive-asf-public=cust-asf.ponee.io@servicecomb.apache.org Tue Mar 6 08:11:20 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E5279180652 for ; Tue, 6 Mar 2018 08:11:19 +0100 (CET) Received: (qmail 54716 invoked by uid 500); 6 Mar 2018 07:11:18 -0000 Mailing-List: contact dev-help@servicecomb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@servicecomb.apache.org Delivered-To: mailing list dev@servicecomb.apache.org Received: (qmail 54700 invoked by uid 99); 6 Mar 2018 07:11:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2018 07:11:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A416AC00D7 for ; Tue, 6 Mar 2018 07:11:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id gW7WOqQCcTdZ for ; Tue, 6 Mar 2018 07:11:15 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7451F5F39A for ; Tue, 6 Mar 2018 07:11:14 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id x10so14096252oig.2 for ; Mon, 05 Mar 2018 23:11:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=jgawV8iU/wPc4UJ/CbZt9daAndrMQ2Wb4KqINaDvIiY=; b=n6nqcBADzG/rpPE9K+OWHmOmF7GyT9fhIg21yrOVVKUZQD9lywmJ0HOn5lcVrGT5DG T5sCIq9YmEpI/2YaJ0r+gDS50ECCmlPXcBpFc8wpvQ9zbb1Oa9hrjkOR0xbnLWWEc8Dz yysWT21WPCULtJoNrDKLBcDQlYRbKJdn9aXOHaLqbId7HTmqikqGEqXaqUeM65ZqcWm3 ooguBnBrnhfIIfR9kdJELEm5do75I+e3XZNuQnbeG/htRaAuw3We/1hl1cMXCgUKvoBJ AW6jHyetAeL+dyuZAgKhsof745kTzUkCAMMo9wQl6Jhown46MOs+suhh3PyRuiwF7zP6 g9yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=jgawV8iU/wPc4UJ/CbZt9daAndrMQ2Wb4KqINaDvIiY=; b=PJFvl8q7mAzpCI7/fBdIF5AU0uvfz1EEXufV0/CAqhiA1zFY5CTLiNoBMWd9kKiFbe ONE1EsCRNRVPXvnsLVI2q8e8XK/yPgUUhyPnHsyIAG0h6niFalEjGardfTupZfsea7oG ew7ZKbUbaf/0inv9+4CO1eW6U665ysyvCja9ePCU7mMgCnQokWW0ZdV4CCZxLG1/iHqV o+6CsByRobdxcPk1R4K41u+UtMUEFeKIYym6pHHrvCKXajnJ3XNnqE6pT6PspF7IUli5 0tBWDgeQJH03DGVUpYgSA0FbQD7TO/oq+XsuCMmyZxM0LjIhUNuLaO0wAzulFsl/b6AK E3uA== X-Gm-Message-State: AElRT7FXOqbsMEu4kveWKr12NEs+n7C9UpkKIAkU3GVDBX2QrMcD76tn WuRkSlZHsNuzPhLGHle/4DXrVS1YKBmJDGeXqYidWyXf X-Google-Smtp-Source: AG47ELvhPUCWQgWPztFPPqjN8nkLlRF4LE8RfS0SRPYfitr6JYgfx1cW7ODNapyEPEQTUDdZ8tWVkOrxlKfNu/UIS9U= X-Received: by 10.202.61.198 with SMTP id k189mr11254654oia.252.1520320272964; Mon, 05 Mar 2018 23:11:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.59.194 with HTTP; Mon, 5 Mar 2018 23:11:12 -0800 (PST) In-Reply-To: References: From: Eric Lee Date: Tue, 6 Mar 2018 15:11:12 +0800 Message-ID: Subject: Re: [Discussion] Saga API design To: dev@servicecomb.apache.org Content-Type: multipart/alternative; boundary="001a113ddd82d0a1b90566b925d1" --001a113ddd82d0a1b90566b925d1 Content-Type: text/plain; charset="UTF-8" Well, supposed we have such a simple scenario, A --> B If we apply forward recovery in this scenario, when sub-transaction B fails in the first time, it will return an error immediately to A. Hence, A can not be notified the results of B's retry operation and can not continue to process its later operations. 2018-03-06 14:21 GMT+08:00 Zheng Feng : > Can you describe the details when we doing the forward recovery currently > please ? > > > > 2018-03-05 19:32 GMT+08:00 Eric Lee : > > > Hi, all > > > > Currently, we encounter some problems in implementing forward recovery in > > saga. If we use synchronous API, the error code will respond immediately > if > > any exception throws. However, the transaction still goes on until it's > > done. It may lead to bad experience to the user as user may see view the > > wrong results. In Chris Richardson's talk: "Data Consistency in > > microservice using saga"[1], he provides two options as follows: > > > > > Option #1: Send response when saga completes: > > > > + Response specifies the outcome > > > > - Reduced availablity > > > > Option #2: Send response immediately after creating the > saga(recommended): > > > > + Improved availablity > > > > - Response does not specify the outcome. Client must poll or be > > > notified. > > > > And he prefers the #2 option to use asynchronous API. > > > > In my opinion, option #2 seems to be more user-friendly. Any other > > solutions for this or any comments for these two options are welcome. > > > > Reference: > > [1] https://www.infoq.com/presentations/saga-microservices > > > > --- > > Best Regards! > > Eric Lee > > > --001a113ddd82d0a1b90566b925d1--