[core] Adding CRUD to the core.ll interface; was Re: draft-groves-core-dynlink-02

Michael Koster <michaeljohnkoster@gmail.com> Mon, 27 February 2017 20:45 UTC

Return-Path: <michaeljohnkoster@gmail.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1C2271293F8 for <core@ietfa.amsl.com>; Mon, 27 Feb 2017 12:45:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.886
X-Spam-Level:
X-Spam-Status: No, score=-0.886 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MPART_ALT_DIFF_COUNT=1.112, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 utRBY44U95ZS for <core@ietfa.amsl.com>; Mon, 27 Feb 2017 12:45:46 -0800 (PST)
Received: from mail-pg0-x236.google.com (mail-pg0-x236.google.com [IPv6:2607:f8b0:400e:c05::236]) (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 C449912A330 for <core@ietf.org>; Mon, 27 Feb 2017 12:45:46 -0800 (PST)
Received: by mail-pg0-x236.google.com with SMTP id p5so24630368pga.1 for <core@ietf.org>; Mon, 27 Feb 2017 12:45:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=9cNg0ti9I7zcyuofi3rSmxr79gbTyhGzGENcr4lJkDI=; b=bBhqhN9NH4vUwedEs4Y/F4D82pcQB6NXLMP3/9A/aK92lirNPFjSigAv2cbo7b/0vD TDMyZ7IN9mnWDf2AuFHkYjnKGXqRbPoflcl0EzsYmEg6IXkGKDwzehHsydm6lD5EHG5s 684J8BkzsKDTRHW9ymwjPofIWOc3rFolDL4UlP6KVxWXIc/Ku0hnvithTmczQoHlJohK RuIo5ChqQsn1UHRgxayHIWZiBLAf9FoZlDHMbrp52K5lrGqASoEiZOROsk9KH1H523dk 3oLf4BsYBBgK7C3+NzKsRldZZUUAEZIwowYGcfszwZpZRrKmgeLazhrBjkuKIojYGt3c /3hQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=9cNg0ti9I7zcyuofi3rSmxr79gbTyhGzGENcr4lJkDI=; b=qwXPpYUsfTJRIPDwALvOkcVj3TDCLtneHzoOpdf1cZLVW2yR9rclWHpmmL0dgay1YN zC8hmFR0Krl0UdEVNNfSCKDRMJo4tm+kCbkAn+1ToZ/v/kQzfR1BUPmEZf/xtIulZOsY 36hgZ4UXxkkhJL+lqn7WoUW1Ci5NthctANui+Pq9IvL50xzT2TpAv+eSBS0M0L6vqp55 TlkgeAQ2WSuw4gpODmag8iAwTnNbRVNkiSuJi+CTfqWEaXCiUKKoy2o+Y/1kSd4kpLnR Qidb/NRKVF//Cn0vYicCzj4Tl+V6tu1KBCk7hi7fifWQxUdA8mkFFY+wnMhB7VpLzggw ShSA==
X-Gm-Message-State: AMke39kbysJDBrFbjI8YUZvWS25ak1UCYYEc6mVmcW/ehvrRb7WPRdDmA7FighXGnP0Skw==
X-Received: by 10.84.236.4 with SMTP id q4mr27022765plk.1.1488228346319; Mon, 27 Feb 2017 12:45:46 -0800 (PST)
Received: from [172.18.40.215] ([50.225.220.36]) by smtp.gmail.com with ESMTPSA id e13sm32415002pgn.38.2017.02.27.12.45.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Feb 2017 12:45:45 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail=_367BA14B-3344-4D93-B654-7734E7F0546F"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
From: Michael Koster <michaeljohnkoster@gmail.com>
In-Reply-To: <58FEF934-CB65-4229-919F-508DE261EA1D@gmail.com>
Date: Mon, 27 Feb 2017 12:45:47 -0800
Message-Id: <2FEB83DB-873A-42BE-BADF-51AE72104205@gmail.com>
References: <AAC41ACC-476B-4D5E-83C1-1D76D45ACF70@gmail.com> <0d67976c-c566-ae89-cdcc-ed0828abe3d6@gmail.com> <58FEF934-CB65-4229-919F-508DE261EA1D@gmail.com>
To: Christian Groves <cngroves.std@gmail.com>
X-Mailer: Apple Mail (2.2104)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/V116BQJ-M8ZLca9UOCPsb37wKFo>
Cc: "core@ietf.org WG" <core@ietf.org>
Subject: [core] Adding CRUD to the core.ll interface; was Re: draft-groves-core-dynlink-02
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Feb 2017 20:45:51 -0000

> On Feb 27, 2017, at 7:25 AM, Michael Koster <michaeljohnkoster@gmail.com> wrote:
> 
> [MJK] Yes, I am proposing that the binding table use the core.ll interface, which is basically a collection resource that exposes core link-format. It can be identified as a binding table by using rt=core.bnd as a resource type, rather than a special interface type. I had intended to make this change when I made core.ll support create, update, and delete operations.

I am proposing to add CRUD functionality to core.ll collections, as described in section 3.4 of CoRE Interfaces, and which is consistent with the current draft of CoRE Resource Directory, section 5.4 (attached) 

   Links in the collection MAY be Read, Updated, Added, or Removed using
   the CoRE Link-Format or JSON Merge-Patch Content-Formats on the
   collection resource.  Reading links uses the GET method and returns
   an array or list containing the link-values of all selected links.
   Links may be added to the collection using POST or PATCH methods.
   Updates to links MUST use the PATCH method and MAY use query
   filtering to select links for updating.  The PATCH method on links
   MUST use the JSON Merge-Patch Content-Format (application/merge-
   patch+json) specified in [RFC7396].
Currently, core.ll only has GET defined (Table 2), but IMO there is no reason not to add the full set of methods including PATCH. THe query parameter selects one or more links for updating, and the merge-patch document is applied to each selected link.

At one point we discussed putting this into a separate document that can be referenced from both RD and CoRE Interfaces, but it seems to belong more in interfaces, where collections are described.

Is there a place I could make a pull request to for a proposed update to Section 4.1 of the CoRE Interfaces document? I am in the middle of updating the description in CoRE RD and could do this relatively quickly.

Also have some proposed tweaks to align b and lb interface definitoins with OCF, but that is a separate proposal.

Best regards,

Michael