Re: [6tisch] Handling Inconsistent Allocation in 6P

Yasuyuki Tanaka <yasuyuki9.tanaka@toshiba.co.jp> Tue, 22 November 2016 16:47 UTC

Return-Path: <yasuyuki9.tanaka@toshiba.co.jp>
X-Original-To: 6tisch@ietfa.amsl.com
Delivered-To: 6tisch@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 242501295EA for <6tisch@ietfa.amsl.com>; Tue, 22 Nov 2016 08:47:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R-L5jOTqMheO for <6tisch@ietfa.amsl.com>; Tue, 22 Nov 2016 08:47:48 -0800 (PST)
Received: from mo.tsb.2iij.net (mo1502.tsb.2iij.net [210.149.48.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 00C69127ABE for <6tisch@ietf.org>; Tue, 22 Nov 2016 08:47:47 -0800 (PST)
Received: by mo.tsb.2iij.net (tsb-mo1502) id uAMGlkia012699; Wed, 23 Nov 2016 01:47:46 +0900
Received: from unknown [172.27.153.187] (EHLO tsb-mr1501.hop.2iij.net) by mas1500.tsb.2iij.net(mxl_mta-7.2.4-7) with ESMTP id 2b674385.0.370049.00-644.658652.mas1500.tsb.2iij.net (envelope-from <yasuyuki9.tanaka@toshiba.co.jp>); Wed, 23 Nov 2016 01:47:46 +0900 (JST)
X-MXL-Hash: 583476b21c71e9f0-942523acd769f37d6dda89b749f263584df8f357
Received: from imx12.toshiba.co.jp (imx12.toshiba.co.jp [61.202.160.132]) by relay.tsb.2iij.net (tsb-mr1501) with ESMTP id uAMGlkYu014666 for <6tisch@ietf.org>; Wed, 23 Nov 2016 01:47:46 +0900
Received: from tsbmgw-mgw01.tsbmgw-mgw01.toshiba.co.jp ([133.199.232.103]) by imx12.toshiba.co.jp with ESMTP id uAMGlkwj013085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <6tisch@ietf.org>; Wed, 23 Nov 2016 01:47:46 +0900 (JST)
Received: from tsbmgw-mgw01 (localhost [127.0.0.1]) by tsbmgw-mgw01.tsbmgw-mgw01.toshiba.co.jp (8.13.8/8.14.5) with ESMTP id uAMGlkTC018366 for <6tisch@ietf.org>; Wed, 23 Nov 2016 01:47:46 +0900
Received: from localhost ([127.0.0.1]) by tsbmgw-mgw01 (JAMES SMTP Server 2.3.1) with SMTP ID 528 for <6tisch@ietf.org>; Wed, 23 Nov 2016 01:47:46 +0900 (JST)
Received: from arc11.toshiba.co.jp ([133.199.90.127]) by tsbmgw-mgw01.tsbmgw-mgw01.toshiba.co.jp (8.13.8/8.14.5) with ESMTP id uAMGljnp018363 for <6tisch@ietf.org>; Wed, 23 Nov 2016 01:47:45 +0900
Received: (from root@localhost) by arc11.toshiba.co.jp id uAMGlj42019600 for 6tisch@ietf.org; Wed, 23 Nov 2016 01:47:45 +0900 (JST)
Received: from ovp11.toshiba.co.jp [133.199.90.148] by arc11.toshiba.co.jp with ESMTP id BAA19599; Wed, 23 Nov 2016 01:47:45 +0900
Received: from mx12.toshiba.co.jp (mx12.toshiba.co.jp [133.199.90.142]) by ovp11.toshiba.co.jp with ESMTP id uAMGljxV002592 for <6tisch@ietf.org>; Wed, 23 Nov 2016 01:47:45 +0900 (JST)
Received: from spiffy21.isl.rdc.toshiba.co.jp by toshiba.co.jp id uAMGlj6x001584; Wed, 23 Nov 2016 01:47:45 +0900 (JST)
Received: from [133.196.17.229] (nm-pptp229.isl.rdc.toshiba.co.jp [133.196.17.229]) by spiffy21.isl.rdc.toshiba.co.jp (Postfix) with ESMTPSA id C0446FF50F; Wed, 23 Nov 2016 01:47:43 +0900 (JST)
From: Yasuyuki Tanaka <yasuyuki9.tanaka@toshiba.co.jp>
To: Thomas Watteyne <thomas.watteyne@inria.fr>, Xavi Vilajosana Guillen <xvilajosana@uoc.edu>
References: <1739694970.195512.1479755120596.JavaMail.root@vilafranca.uoc.es> <CAC9+vPiG9ZqziO8ktpuwJrc4YcRQ7Wj1e+ZciNHmZvUE9JafPw@mail.gmail.com> <CADJ9OA-BZrQHEX9yeSoj3_8p-NOoqq0g8o=6hZ_JS-53b+vNYQ@mail.gmail.com>
Message-ID: <e431f7a2-48bb-0605-5a90-bdb0cc134322@toshiba.co.jp>
Date: Tue, 22 Nov 2016 17:47:41 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <CADJ9OA-BZrQHEX9yeSoj3_8p-NOoqq0g8o=6hZ_JS-53b+vNYQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tsbmgw-mgw01.tsbmgw-mgw01.toshiba.co.jp id uAMGljnp018363
X-MAIL-FROM: <yasuyuki9.tanaka@toshiba.co.jp>
X-SOURCE-IP: [172.27.153.187]
X-Spam: exempt
Archived-At: <https://mailarchive.ietf.org/arch/msg/6tisch/Xx1RsVAIInUA3Apgn0Ebx4x2hvo>
Cc: 6tisch@ietf.org
Subject: Re: [6tisch] Handling Inconsistent Allocation in 6P
X-BeenThere: 6tisch@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Discuss link layer model for Deterministic IPv6 over the TSCH mode of IEEE 802.15.4e, and impacts on RPL and 6LoWPAN such as resource allocation" <6tisch.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6tisch>, <mailto:6tisch-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/6tisch/>
List-Post: <mailto:6tisch@ietf.org>
List-Help: <mailto:6tisch-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6tisch>, <mailto:6tisch-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Nov 2016 16:47:51 -0000

Xavi, Thomas, thank you for the responses!

I'm replying both of you in a single email to save bandwidth ;-)

Sorry for making this email so long... I put a shorter response first.

thomas> From an implementation point of view, cells that are in the
thomas> process of being reserved (i.e. 6P add request sent but no
thomas> response received yet) should be marked as "reserved" and only
thomas> committed to the schedule once the 6P transaction if over. I
thomas> believe this captures Nicola's idea, but turning it into a
thomas> recommendation for implementers, rather than a protocol
thomas> feature.

This idea covers the requester side in a 2-step transaction. From the
point of view of the respondent, it has no idea if its response
reaches the requester in time. Therefore, there is no chance for the
responder to decide whether to commit the operation or not after
success in sending the response. Of course, the generation counter
detects a inconsistency case where a response is out of time without
Nicola's idea (the generation counter of the respondent is ahead of
one of the requester).

xavi> it adds complexity and more messages over the air, which are
xavi> costly and can also fail (e.g external interference). What
xavi> happens if we loose the 6P NACK? How the NACK sender know that
xavi> the NACK has been received?

Thanks, they are good questions. I guess timeout would cause an error
like "unrecoverable inconsistency", then CLEAR could be sent.

xavi> What causes less overhead, 2 bits per each 6P command or 1 or 2
xavi> extra packets per transaction (assuming only write/state
xavi> modification transactions). For me the former is way simpler.

I agree with you, Xavi. The former is less overhead. Basically, less
message is better.

Let me explain my little concerns on the generation management at 6P:

   (1) it makes 6P aware of a series of transactions, at least the
       result of a previous transaction, which is already taken care of
       by a SF

   (2) it limits options to deal with inconsistency

The first item, (1), is what I felt something a bit strange with when
I was writing code for the GTX/GRX stuff. Until then, I thought the
role of 6P was abstracting a set of the 6top operations and getting
every single transaction done well; it didn't care about past
transactions (let's set aside SeqNum for now). And, in my thoughts, a
SF on 6P was in charge of a whole scheduling process to each neighbor
involving a series of transactions. This was a simple architectural
concept for me. Now, this is not the case because of the generation
counter at the 6P layer. I'm in favor of the simple concept, although
there may have been no such a concept in 6top as I thought...

The second one is more practical. While the draft says a post-action
after detecting inconsistency is up to a SF, the SF has no choice but
sending CLEAR because other command is not accepted, responded with
RC_ERR_GEN, under a generation inconsistency situation. This means,
one inconsistent transaction will ruin all the rest of scheduled cells
which are still valid. I feel that this is rooted in the first item I
mentioned; there are two entities managing consistency.

By the way, I may not understand fully how an inconsistency
occurs... Are there any inconsistency cases which timeout of either
side cannot detect, requester side or respondent side? In other words,
are there any inconsistency cases which 6P can detect but SFs cannot?
Answers to this question would help me understand why the generation
management at 6P is really necessary...

If the generation management was not necessary, I'd propose to remove
it and to add a rollback command to 6P in order to cancel the previous
operation in a separate transaction, operation to cancel which is
specified by SeqNum of the concerned operation in the rollback command
payload. A transaction with the rollback command is supposed to be
initiated when the previous transaction ends with timeout. This
proposal would make no changes on the current transaction patterns. It
would simplify 6P, which would not need to do for consistency
management nor generation management. There could be false positives
caused by inconsistency detection with timeout, but I assume they are
not big deal.

# In this sense, I prefer calling the value Transaction ID rather than
# SeqNum.

Thank you all for reading up to here...

Best,
Yatch

On 2016/11/22 8:23, Thomas Watteyne wrote:
> I'd like to keep 6P simple, and just have a mechanism to detect inconsistencies. I believe roll-back to a previous schedule generation adds too much complexity. From an implementation point of view, cells that are in the process of being reserved (i.e. 6P add request sent but no response received yet) should be marked as "reserved" and only committed to the schedule once the 6P transaction if over. I believe this captures Nicola's idea, but turning it into a recommendation for implementers, rather than a protocol feature.
>
> On Mon, Nov 21, 2016 at 9:56 PM, Xavi Vilajosana Guillen <xvilajosana@uoc.edu <mailto:xvilajosana@uoc.edu>> wrote:
>
>     Hi Yatch,
>     my 2 cents inline
>
>
>         I've been thinking about how to handle inconsistencies. I know the
>         current draft has an inconsistency detection mechanism with generation
>         management; just wondering if there is another way or a supplemental
>         mechanism to deal with such a situation.
>
>     We decided at the IETF meeting last week to reduce the number of generation counters from 2 to 1 (2bits field) as now 6P commands can add different types of cells so we need to account for transactions now. I state that here to outline that the proposed mechanism is very simple. At every transaction we increment a generation counter. It cannot happen that the two sides of the transaction have inconsistent counters. If this happens, then the schedules are reset. I agree that this is detected after the error has occurred.
>
>
>         I thought that the 2-phase commit (2PC) protocol could be useful
>         here. Then, I found the nice idea by Nicola in the ML archive. In
>         terms of the 2PC protocol, 6P ACK is Commit. 6P NACK (mentioned in
>         another email by Nicola) is Abort or Rollback.
>         # We may need another type of message to acknowledge Commit or Abort.
>
>         An advantage of this approach is that 6P can resolve an inconsistency
>         when it occurs at the least cost, by cancelling the concerned
>         operation alone. An apparent disadvantage is adding further complexity
>         to 6P.
>
>
>     it adds complexity and more messages over the air, which are costly and can also fail (e.g external interference). What happens if we loose the 6P NACK? How the NACK sender know that the NACK has been received?
>
>
>         What others think...?
>
>
>     I like to answer with another question. What causes less overhead, 2 bits per each 6P command or 1 or 2 extra packets per transaction (assuming only write/state modification transactions). For me the former is way simpler.
>
>     regards,
>     X
>
>
>
>
>         Best,
>         Yatch
>
>         _______________________________________________
>         6tisch mailing list
>         6tisch@ietf.org <mailto:6tisch@ietf.org>
>         https://www.ietf.org/mailman/listinfo/6tisch <https://www.ietf.org/mailman/listinfo/6tisch>
>
>
>
>
>     --
>     Dr. Xavier Vilajosana Guillén­
>     Research Professor
>     Wireless Networks Research Group
>     Internet Interdisciplinary Institute (IN3)
>     Universitat Oberta de Catalunya­
>
>     +34 646 633 681 <tel:%2B34%20646%20633%20681>| xvilajosana@uoc.edu <mailto:xvilajosana@uoc.edu>­ | Skype­: xvilajosana
>     http://xvilajosana.org <http://xvilajosana.org>
>     http://wine.rdi.uoc.edu/
>
>     Parc Mediterrani de la Tecnologia
>     Av. Carl Friedrich Gauss, 5. Edifici B3
>     08860 Castelldefels (Barcelona)
>
>
>
>     ­
>
>     _______________________________________________
>     6tisch mailing list
>     6tisch@ietf.org <mailto:6tisch@ietf.org>
>     https://www.ietf.org/mailman/listinfo/6tisch <https://www.ietf.org/mailman/listinfo/6tisch>
>
>
>
>
> --
> _______________________________________
>
> Thomas Watteyne, PhD
> Research Scientist & Innovator, Inria
> Sr Networking Design Eng, Linear Tech
> Founder & co-lead, UC Berkeley OpenWSN
> Co-chair, IETF 6TiSCH
>
> www.thomaswatteyne.com <http://www.thomaswatteyne.com>
> _______________________________________