From dev-return-2391-archive-asf-public=cust-asf.ponee.io@servicecomb.apache.org Mon Mar 5 12:33:00 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 82F13180608 for ; Mon, 5 Mar 2018 12:32:59 +0100 (CET) Received: (qmail 74563 invoked by uid 500); 5 Mar 2018 11:32:58 -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 74546 invoked by uid 99); 5 Mar 2018 11:32:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Mar 2018 11:32:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 823AC1A0A41 for ; Mon, 5 Mar 2018 11:32:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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: spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XzJrTSVDdIY9 for ; Mon, 5 Mar 2018 11:32:56 +0000 (UTC) Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B88F55F169 for ; Mon, 5 Mar 2018 11:32:55 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id u73so11770099oie.3 for ; Mon, 05 Mar 2018 03:32:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=mhCk8feLV2Pk7tC14oFl1wVe9nJgzz+YAd0xalHll1k=; b=JOUz5SpT7i6ckdD0nNiCr/AUtcFoYAr7Cx+GFWTmDt2kQ8wRAa2TkBA3jrP0UCdP9C k/Br3uxMut817EdTSCar5945IVM1HL0oofMq1l3cjfoVYSKu0rV5ep0ApkcC4AXDPsbB /ldGkhUlCwA56n9IoGweTBQmzVMCYdHz7RhoLCMlIuO/nqYWbhXdqHbAxTauDmCLmV5/ aLMb+GLTP+S9PF+MrNdFvJVyHCsJKDBJqPz/NUK8pRMGRxlfhAOLDUZtcVaDdpmpyORK Vh3tG2XrkHXA+6Xsb+ecxawCDVoojDKS3ZQZoON0rtp/BKYCm3WAahmEf2zU1HGA2e8g NYuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=mhCk8feLV2Pk7tC14oFl1wVe9nJgzz+YAd0xalHll1k=; b=dyUCit7gdXcjq0ry0HFwu5q7krpnXtGQ/0cBagkeq9sLfr4VhZawjIWNcTzb5g8o41 QYRXaOiXwj0CO0btUzLQu2nsMcPiFo0vbePT70b1S0YSswUR28x1qWXRH4UX/+TVmBiP DhWlPEf+P+AEtIc17ZEltmU4RLEVId/CDObWD6zAaUTz7uKBEr6SZclkeopR5mG04oph YrJWj8qyQd9GYXGG5GuHC/RnvdaPRD1eGzc0wqUMhuXmqTvwVxHC0j3RRGCeS/iVwTVZ q8AOKD100rK0z37SJrm52A+KESqywMZdsByz79H3bEH9zzLKe1u1D12YA7/P/LDK8Qqm CQvQ== X-Gm-Message-State: AElRT7HQFZisvLSjnwY6yWw9yzMTch9lrgJ8ytfXes8eMOvWzw/OE1MR 9EX4j+Tot47Nwuu0vi+QbVl/1OqosX4Rlh/qp0ZnxQ== X-Google-Smtp-Source: AG47ELu4IUSSVf34t1TbE3iiKqXceJnntYwITmkVssjU82LZo9h2SRicisOcuY7WCdImOVmHQEhrBVknFxDFGRuJu5s= X-Received: by 10.202.88.135 with SMTP id m129mr8639864oib.106.1520249574039; Mon, 05 Mar 2018 03:32:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.59.194 with HTTP; Mon, 5 Mar 2018 03:32:53 -0800 (PST) From: Eric Lee Date: Mon, 5 Mar 2018 19:32:53 +0800 Message-ID: Subject: [Discussion] Saga API design To: dev@servicecomb.apache.org Content-Type: multipart/alternative; boundary="001a113d307ad4a71a0566a8afc8" --001a113d307ad4a71a0566a8afc8 Content-Type: text/plain; charset="UTF-8" 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 --001a113d307ad4a71a0566a8afc8--