Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9833D200CD1 for ; Wed, 26 Jul 2017 17:19:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 96DA116907A; Wed, 26 Jul 2017 15:19:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B596A16907C for ; Wed, 26 Jul 2017 17:19:09 +0200 (CEST) Received: (qmail 53488 invoked by uid 500); 26 Jul 2017 15:19:07 -0000 Mailing-List: contact dev-help@ariatosca.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ariatosca.incubator.apache.org Delivered-To: mailing list dev@ariatosca.incubator.apache.org Received: (qmail 52730 invoked by uid 99); 26 Jul 2017 15:19:06 -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; Wed, 26 Jul 2017 15:19:06 +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 C5D95C0293 for ; Wed, 26 Jul 2017 15:19:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.3 X-Spam-Level: X-Spam-Status: No, score=-0.3 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudify-co.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id d6dIemNP63hi for ; Wed, 26 Jul 2017 15:19:02 +0000 (UTC) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E83755FE6D for ; Wed, 26 Jul 2017 15:19:01 +0000 (UTC) Received: by mail-io0-f171.google.com with SMTP id l7so69338164iof.1 for ; Wed, 26 Jul 2017 08:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudify-co.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Sd7u1qpShyMIjtPbp06IXM6lCf6L34UlU7bB8ZlHpYM=; b=dj3886LaKY4Nh4wdPrafkjst950J0krtWCyjq0t/tyjdsEQZGKlSkgB+7MgyoCK+jj zSgS3jZUDXZfz9CKKoPsQvtC0gR0MjjVN5A5dSyCr3UCe7xlbl4v1+JRzG3z/JBmQT0l bv10JlfW19cLQHaR/HJqWbd6GNnN4oF8LSgSitBHkfdn/17tkuUGqMQISIhv0sz2hyDD djSE2yDBg7V+wB9ttFgjrPeL4XSHWqLBV/StuVE6ZIBiNfvddAs1mrlEupKKMrIppKrZ isJ+NWxEzQ4sjDELGCay5hbNTHEikiJvDpFc5d3EtPMAU1/sFtwwYenCUsOvrLXDu/Fm DoBg== 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=Sd7u1qpShyMIjtPbp06IXM6lCf6L34UlU7bB8ZlHpYM=; b=fxQyoE4BeM5sLlnUJhLdEAqiF0GOfHFuNFBmeB6VSqAsxNAeEEaQr/6aDUa5nHgDIq zu/t52utU6hukKc+i4hQRZjK1U2R1M9rATbxULeqzDNrWLl/KOD8zyL6jQDA9PkKY+Lk M+fPbN+BitehwXmgZvELsv81g0ZmLCbjwZWdoxy8sG0pX1R73I6Up6YXqzfwPRr8XJba JkE+RiGh9uupN05JqG3UeU9l7W1DeV+t6nR9WoIcOnRkBS0yr+SItFT+gVWCgXfPSoEt dMHpG0Pk7ZxF/IMbPuYiB5gATZjU8jJPJ3aMo6hsgtXrUASUdrT2z8F3kYqPjHKYCCuE HXNQ== X-Gm-Message-State: AIVw113LmC0uhuQvR7UDA6yyMWf8bX3+uafW+aj4pDPYIGn15PRApaOC QwN6uIqN2Ebmq8ZHBgBKAwKnE4HUK+B7 X-Received: by 10.107.3.67 with SMTP id 64mr1319648iod.307.1501082341083; Wed, 26 Jul 2017 08:19:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.175.158 with HTTP; Wed, 26 Jul 2017 08:18:40 -0700 (PDT) In-Reply-To: References: From: Tal Liron Date: Wed, 26 Jul 2017 10:18:40 -0500 Message-ID: Subject: Re: Unique identification of an instance element across services To: dev@ariatosca.incubator.apache.org Content-Type: multipart/alternative; boundary="001a113fb554b840b8055539f7fa" archived-at: Wed, 26 Jul 2017 15:19:10 -0000 --001a113fb554b840b8055539f7fa Content-Type: text/plain; charset="UTF-8" I just don't see users having to deal much with node IDs outside of simple hello-world style tutorials, and I'd hate for the first impressions that users get out of ARIA is that it's just a playground for TOSCA. It should be ready out-of-the-box for the real world. On Wed, Jul 26, 2017 at 9:13 AM, DeWayne Filppi wrote: > Such is their strength. I'm just advocating using them as a last resort > because they are user unfriendly and gigantic. > > On Tue, Jul 25, 2017 at 12:55 PM, Tal Liron wrote: > > > Let's consider a mass deployment: thousands of service instances of the > > same service template, created by many different users with their own > ARIA > > installations (and databases). In that case, assuming we use sequential > > IDs, you would have the same node ID appear many times. You would have to > > identify it via the particular user and service instance. If you're > > centralizing logs, this can quickly be cumbersome. A UUID will identify > it > > globally and avoid any confusion. > > > > I think the default should be something that avoids such problems. For > > users who insist on shorter IDs, we can allow them to configure it. > > > > On Tue, Jul 25, 2017 at 2:42 PM, DeWayne Filppi > > wrote: > > > > > True uuids are seductive, because of their simplicity. But they are > > huge, > > > overkill, and meaningless. Imho a structured id is superior if it can > be > > > made to work without a global locking scheme. > > > > > > - DeWayne > > > > > > On Jul 25, 2017 12:11 PM, "Tal Liron" wrote: > > > > > > > It's not an issue of thread safety -- it could be entirely different > > > > processes, on different machines, accessing the same db. It can be > > solved > > > > via a SQL transaction, but I feel the whole issue can be avoided by > > using > > > > UUIDs. > > > > > > > > Using the CLI to access specific nodes is not something I see > > happening a > > > > lot outside of debugging. And when you do debug, you'll probably be > > > copying > > > > and pasting a node ID from the logs, so shorter names do not add much > > > ease > > > > of use. > > > > > > > > Again, I would be personally happiest if this was configurable (and > > > > personally think UUIDs should be the reasonable default). > > > > > > > > On Tue, Jul 25, 2017 at 2:01 PM, Maxim Orlov > > wrote: > > > > > > > > > Technically we have no issue with implementing this via uuid or a > > > > > threadsafe solution for the current index implementation. > > > > > > > > > > Getting node data via the cli feels more intuitive using the index > > > based > > > > > ID, rather than the uuid based ID in my opionion. > > > > > > > > > > On Jul 25, 2017 9:49 PM, "Tal Liron" wrote: > > > > > > > > > > Our code for determining the next index is not concurrently safe > (no > > > > atomic > > > > > transaction) so I can see it breaking in concurrent use cases > > (running > > > > two > > > > > ARIA commands at the same time). > > > > > > > > > > What is to gain here in terms of human readability? In my opinion > it > > > adds > > > > > confusion because it gives a false sense of predictability. > > > > > > > > > > In my opinion the best compromise is to use base57-encoded UUIDs. > > These > > > > are > > > > > true UUIDs, but use a mix of upper and lowercase alphanumerics > > ensuring > > > > no > > > > > visually ambiguous characters. We have the code for this in > > > > utils/uuid.py. > > > > > > > > > > See also: https://github.com/wyattisimo/base57-ruby > > > > > > > > > > On Tue, Jul 25, 2017 at 1:28 PM, Maxim Orlov > > > wrote: > > > > > > > > > > > Actually the refactoring was made so the id would be more user > > > > readable. > > > > > > The index is determined according to the used indices (it's not > > just > > > a > > > > > > running number). If indeed this poses an issue (or if indeed a > uuid > > > is > > > > > > easier to recognize, or even use in a query), let's discuss it > > > > further... > > > > > > > > > > > > On Tue, Jul 25, 2017 at 7:35 PM, Tal Liron > > wrote: > > > > > > > > > > > > > We used to use UUIDs but at some point this was refactored. I > > tend > > > to > > > > > > agree > > > > > > > with you. > > > > > > > > > > > > > > Actually, I would prefer it to be configurable. We have code in > > > place > > > > > for > > > > > > > ID generation of various types: UUIDs, short UUIDs, and > > > sequentials. > > > > > All > > > > > > of > > > > > > > them would seem useful to me for various scenarios. > > > > > > > > > > > > > > On Tue, Jul 25, 2017 at 3:42 AM, Vaishnavi K.R < > > > > > > vaishnavi.k.r@ericsson.com > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > With my understanding in current ARIA, the node instances are > > > made > > > > > > unique > > > > > > > > by prefixing the node name with the 'id of the service' (i.e. > > the > > > > > > primary > > > > > > > > key of the service table) as the instances are specific to > the > > > > > service. > > > > > > > > > > > > > > > > > > > > > > > > What will be the name of the node instances if the default > > > > instances > > > > > > for > > > > > > > > the node template is '3' and how this will hold good during > > scale > > > > in > > > > > > and > > > > > > > > out? > > > > > > > > > > > > > > > > > > > > > > > > Could UUID be of great help in handling such cases by > including > > > > that > > > > > > as a > > > > > > > > column in the database tables of the service and the node? > > > > > > > > > > > > > > > > This will wipe out the naming confusions and querying can be > > made > > > > > easy > > > > > > > > with the UUIDs. > > > > > > > > > > > > > > > > > > > > > > > > Looking forward to your suggestion. > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > /Vaish > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --001a113fb554b840b8055539f7fa--