From dev-return-82462-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Sat Aug 17 12:30:13 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E3ED9180181 for ; Sat, 17 Aug 2019 14:30:12 +0200 (CEST) Received: (qmail 12353 invoked by uid 500); 17 Aug 2019 12:30:12 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 12341 invoked by uid 99); 17 Aug 2019 12:30:11 -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; Sat, 17 Aug 2019 12:30:11 +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 609D6C1BB4 for ; Sat, 17 Aug 2019 12:30:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.8 X-Spam-Level: * X-Spam-Status: No, score=1.8 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Mjo3QVIQXHlH for ; Sat, 17 Aug 2019 12:30:08 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.194; helo=mail-oi1-f194.google.com; envelope-from=eolivelli@gmail.com; receiver= Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 9CCC4BC7A9 for ; Sat, 17 Aug 2019 12:30:08 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id v12so3049798oic.12 for ; Sat, 17 Aug 2019 05:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=oeUcnBIXW5wVzO/78QirI+1GkBoplxsHNlpOXKt6abM=; b=gwPvoJCpf7bgULYU6C6tO7qkE/1kP2uYoZDnB+8NXiiumuo4+DBFY8zQ+SDF9aBCyD 716uN+2J0CB6JzExcwGybkVsWT87qkveSW8A5kpbIkXOc9rjHCvfV/Z4SJVzZodzLDHa ITnWPyN0uxTMlufclfUSLyZ4gsu68gGEvxEM/YrfuC9f5lmZeSlS7Z6Lz5A6G4Cz8oRQ esMHUdhDbFhNFYh3UlChLeEl3+GW/XvnkLskqyn8V4rOZSCgi9pbAmm33p2h0Qy1RAn3 uiFWl6p48IFaySQ/svGuurm3cYjLtpNH4lY+WFPng22DEcQw5TCTSg0vAS3vukISk6uL v+vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=oeUcnBIXW5wVzO/78QirI+1GkBoplxsHNlpOXKt6abM=; b=p+kfYvbeAlzevOImh3MvXveiOf2xdBg+Rjk60NPUuR17Bn2dne3H8FIvNkYmPCBs1d O6vAKN6UAT74wT/k0ytiTEEKUdpYVF5ZUH8M2hhgQx/ClNqkw2x4ev46wQQh9Wyzu+gy 7B4P++GSMgNScKm6pIm8fbWNSUxBAiMgIfII6eQzHhsZjrOaOkxhBCLviRYE/npBQVFn VceHjFx8YCL4hdcHcGkKKsOWqEM8RDEQ62Xm+hkVWbXqXef4q7wd2TELEqutIY4XYxGV sXS8zIcTWKuKppVqeECtTsrWRQ8YSwdAH9lPFdcVY0InrMTIHX/Pfw+YTElviBZE9F2s 2gww== X-Gm-Message-State: APjAAAU+zm9mzIuL0dbB03Qp5isOFBjJRBRkEAgKGfeI7DF4BKui4kgp TQLLOgYKk5yihVXc3ij+hIsaKSUeKAut4RQJhQbUbg== X-Google-Smtp-Source: APXvYqzeK/Uc9PEMkwdrxo109966vyKQ/D48IE06pK/6EO/kR8vluFBJnQYFFMte0Zuwt/MyoO1JycVEFi9w4aL9ix4= X-Received: by 2002:a05:6808:246:: with SMTP id m6mr8092613oie.139.1566045007746; Sat, 17 Aug 2019 05:30:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Enrico Olivelli Date: Sat, 17 Aug 2019 14:29:56 +0200 Message-ID: Subject: Re: thoughts about extension to multi semantics To: dev@zookeeper.apache.org Content-Type: multipart/alternative; boundary="000000000000639d2c05904f4447" --000000000000639d2c05904f4447 Content-Type: text/plain; charset="UTF-8" Il sab 17 ago 2019, 08:01 Ted Dunning ha scritto: > It definitely sounds like a nice feature. > > The important question is what is the actual importance after you multiply > it by the amount of usage it gets. > > For instance, I know that multi gets a bit of usage, but I would guess that > it actually gets very, very little. It might even most of the cases that > you have in mind. > > If that is so, how much would an extension to multi actually be used? > I am adding a question: how will the 'test' look like? I image these cases: - test if node exists - test about version - test about the content of the znode? (This will be trickers, are zk does know nothing about the format of the content) Enrico > > > On Fri, Aug 16, 2019 at 8:28 PM Michael Han wrote: > > > This sounds a nice feature to me as it enables user to do more without > > obvious downside. It could be useful in cases like state management where > > the state is stored in a fine grained approach across multiple zNode, > > instead of in a single zNode. > > > > On Fri, Aug 16, 2019 at 11:52 AM Ted Dunning > > wrote: > > > > > The recent discussion about if/then/else idioms in ZK has raised the > > > thought that it might be nice to have some extended semantics. > > > > > > One version that I could see would be to to extend the current multi-op > > to > > > allow multiple alternatives. The idea would be that there would > > effectively > > > be multiple branches to be tried. The first one that succeeds > atomically > > > (all or nothing) would be used. The returned value would need to > somehow > > > indicate which alternative succeeded and would need to return any data > > > accessed. The testing of alternatives would also be atomic so it > wouldn't > > > be possible for things to change within a single operation. > > > > > > This extension would allow the previous question to be answered like > > this: > > > > > > pick_first { > > > create(...) > > > } { > > > set(...) > > > } > > > > > > (the syntax here is just made up and wouldn't actually be supported ... > > it > > > is just for pseudo code purposes). > > > > > > > > > My theory is that this would be relatively easy to implement based on > the > > > current multi operation. Risk due to the change is pretty low given > that > > > there is code to copy. > > > > > > My question is whether this would actually have all that much benefit. > > > > > > Does anybody have an opinion on that? > > > > > > --000000000000639d2c05904f4447--