Re: [Tools-discuss] RESTful API style guide

Nico Williams <nico@cryptonector.com> Wed, 19 June 2013 16:50 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: tools-discuss@ietfa.amsl.com
Delivered-To: tools-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2611121F9D4E for <tools-discuss@ietfa.amsl.com>; Wed, 19 Jun 2013 09:50:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.956
X-Spam-Level:
X-Spam-Status: No, score=-1.956 tagged_above=-999 required=5 tests=[AWL=0.021, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JraPjzgbYsIz for <tools-discuss@ietfa.amsl.com>; Wed, 19 Jun 2013 09:50:12 -0700 (PDT)
Received: from homiemail-a64.g.dreamhost.com (caiajhbdcaid.dreamhost.com [208.97.132.83]) by ietfa.amsl.com (Postfix) with ESMTP id CC60921F9D5B for <tools-discuss@ietf.org>; Wed, 19 Jun 2013 09:50:04 -0700 (PDT)
Received: from homiemail-a64.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a64.g.dreamhost.com (Postfix) with ESMTP id 243C7438098 for <tools-discuss@ietf.org>; Wed, 19 Jun 2013 09:50:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type; s=cryptonector.com; bh=10Bqsinugcaa9trS4ZE6 Q2tWirc=; b=x/fxhMzcyTIMAq77w7qyACwg84iOZ5y6ux+AN9ptc+utNImSdQFR hLfIJyeb4XY3dtPLBJSDXD6gMcow/pUowlSOINv5qPld0k4YSMjxOl/aYvmTcX7F 2F1++z347Xgq4kFM+RdTmJKMpxVHfgy9p3XeDOINzgL8ObMzpbUMkZU=
Received: from mail-we0-f173.google.com (mail-we0-f173.google.com [74.125.82.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a64.g.dreamhost.com (Postfix) with ESMTPSA id 6491043808F for <tools-discuss@ietf.org>; Wed, 19 Jun 2013 09:49:53 -0700 (PDT)
Received: by mail-we0-f173.google.com with SMTP id x54so4651428wes.4 for <tools-discuss@ietf.org>; Wed, 19 Jun 2013 09:49:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Iy9ZWrb150ItoZdAhgJ60HbLJ898BGJeaMdd02FMlSM=; b=VXoFasIAALSGMcj8BxDvZ4U+J/AkZuwrgUY/M4tvtN/jL1lMlrU5YyN4c6P1ySN9OC jBo4wqZDy0LKguUhRUph9IB0N3wj0KI5djej+x1mbW4ztZ2U9lrnf4AMk6YMJSMNRD2i EMlPxSHrRaD6YnIjWhRpGr7XFmaP0X77ikgHSbvbrjgKIFIeyIevVbh8bc1oB1SmUsuo tWg+b02WhmeUc9kdTUr3QngPbfVDfyy8xx1/8tDKuZjBBdsfeL/GSqUmIT7mSkWM4iQG 4lh8Uq1bcgHP5CQdDwuDTg0lbgYISJqFkM2gaAZVI66HJc5MgdEj5koxnRHQm3VV55cS Ld+w==
MIME-Version: 1.0
X-Received: by 10.194.8.163 with SMTP id s3mr2929306wja.41.1371660587134; Wed, 19 Jun 2013 09:49:47 -0700 (PDT)
Received: by 10.216.29.5 with HTTP; Wed, 19 Jun 2013 09:49:47 -0700 (PDT)
In-Reply-To: <CANb2OvKxduX3Cputf1dNU9ppLkyWOPB3ma+-Y3p68fyFdvPeaQ@mail.gmail.com>
References: <21266.1371520672@sandelman.ca> <CANb2OvJS5dpZ4HZ6T=i3-9Mj1Zn0f9LzH7Qhj2hffzoxKSc5PQ@mail.gmail.com> <E0CDAB4E-A9D2-4174-B54F-DD5E08CCF0A7@bangj.com> <CANb2OvJtgFRZ8SniSQbOfQVVP3Tk3vUT7fYoTdd8CZfONOSC-w@mail.gmail.com> <3320.1371652163@sandelman.ca> <CANb2OvKxduX3Cputf1dNU9ppLkyWOPB3ma+-Y3p68fyFdvPeaQ@mail.gmail.com>
Date: Wed, 19 Jun 2013 11:49:47 -0500
Message-ID: <CAK3OfOhiXMBNVt=J6mGTLg0=Ety+G4Ua20y1RRONCVYc6FDyZA@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Ole Laursen <olau@iola.dk>
Content-Type: text/plain; charset="UTF-8"
Cc: Tools Team Discussion <tools-discuss@ietf.org>
Subject: Re: [Tools-discuss] RESTful API style guide
X-BeenThere: tools-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF Tools Discussion <tools-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tools-discuss>
List-Post: <mailto:tools-discuss@ietf.org>
List-Help: <mailto:tools-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Jun 2013 16:50:18 -0000

On Wed, Jun 19, 2013 at 10:56 AM, Ole Laursen <olau@iola.dk> wrote:
> Sorry if I sounded rude, no offense intended, it's just that I
> interpreted your first email as if you'd like feedback on the
> architecture you've chosen, and that's now turned into a general
> discussion about distributed APIs which I find interesting. To me, it
> matters that the API doesn't encourage you to do to a lot of
> roundtrips - that I think is one of the main lessons of CORBA (and X11
> and ...).

And NFS...

This is true, APIs should aim to optimize for round trips.

But at higher layers APIs should be asynchronous/batching, so that any
round trips don't kill responsiveness.  This is *much* easier to
accomplish nowadays in the world of HTTP APIs because there has been
less stability at much higher layers (e.g., no opendir() + readdir() +
loop to stat(), getpwuid(), getgrgid(), ...).  This is good in that it
enables us to not have to do work that clients don't need done (e.g.,
batching up readdir + stat), and it allows us to care a bit less about
round trip optimization.

Nico
--