Re: [Tools-discuss] RESTful API style guide

Ole Laursen <olau@iola.dk> Wed, 19 June 2013 10:24 UTC

Return-Path: <olau@iola.dk>
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 DC8B621F9F9B for <tools-discuss@ietfa.amsl.com>; Wed, 19 Jun 2013 03:24:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, NO_RELAYS=-0.001]
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 hL73QSJl1hmE for <tools-discuss@ietfa.amsl.com>; Wed, 19 Jun 2013 03:24:30 -0700 (PDT)
Received: from mail-vb0-x22b.google.com (mail-vb0-x22b.google.com [IPv6:2607:f8b0:400c:c02::22b]) by ietfa.amsl.com (Postfix) with ESMTP id 7B2BB21F91A5 for <tools-discuss@ietf.org>; Wed, 19 Jun 2013 03:24:25 -0700 (PDT)
Received: by mail-vb0-f43.google.com with SMTP id e12so3583098vbg.2 for <tools-discuss@ietf.org>; Wed, 19 Jun 2013 03:24:24 -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:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=AjeZT6N11iOliq2H7g4DGxvfaqcRJ5QeAaeVWnx5xn0=; b=Pz0Om89ouzYIam1wSK6+SRI7v69Y6SvVAtoceohcydl2IRqU1RqIewp8YrdMlc7+CQ 50lm4x5muaGr+mQdGWEn9hUfAuBORiNsEJ6Hyzl+lgC2GTGjjUxsgn3xviC9lwWWKJgl Rbyifed24+3Ne1pjXW4oxpTd4zt94EFIjudaaiYcBtLotsrfwgMgRfvsiWDYG3Ya2RFu ztwSjg/xH+XpHP7OmNkl6zOTbwp5IbTfqfw8QIUc/PCupkZQzebbG/dxndQbcr6KIXzM p6y6CbUnV6r2nF3vx/NvPbuXBu2pacgtbbAuyEyhfLZJh6fjsG3iOuR6bkJM86Ni8eMd dd8w==
X-Received: by 10.52.29.179 with SMTP id l19mr624853vdh.51.1371637464440; Wed, 19 Jun 2013 03:24:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.58.133.71 with HTTP; Wed, 19 Jun 2013 03:24:03 -0700 (PDT)
In-Reply-To: <E0CDAB4E-A9D2-4174-B54F-DD5E08CCF0A7@bangj.com>
References: <21266.1371520672@sandelman.ca> <CANb2OvJS5dpZ4HZ6T=i3-9Mj1Zn0f9LzH7Qhj2hffzoxKSc5PQ@mail.gmail.com> <E0CDAB4E-A9D2-4174-B54F-DD5E08CCF0A7@bangj.com>
From: Ole Laursen <olau@iola.dk>
Date: Wed, 19 Jun 2013 12:24:03 +0200
Message-ID: <CANb2OvJtgFRZ8SniSQbOfQVVP3Tk3vUT7fYoTdd8CZfONOSC-w@mail.gmail.com>
To: Tools Team Discussion <tools-discuss@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"
X-Gm-Message-State: ALoCoQkibMHMy8NPJx3VdK6A64l8KbIrgi5FZPhsKzo1GhOfpFF/K+atpPbP3yc4LrAI5KPTvVRr
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 10:24:34 -0000

2013/6/18 Tom Pusateri <pusateri@bangj.com>:
>
>
> On Jun 18, 2013, at 6:08 AM, Ole Laursen <olau@iola.dk> wrote:
>
>> 2013/6/18 Michael Richardson <mcr+ietf@sandelman.ca>:
>>> This is just *TOO SLOW*.  Too many small requests.  (I assume the browser has
>>> a 1.1-persistent session open, but I haven't checked actually).
>>> I'd like to replace it with:
>>>    GET /groups.json
>>> returning an array of groups.  Does this make sense, architecturally?
>>
>> IMHO, you've got this question backwards - it doesn't make sense
>> architecturally to access each individually. :)
>
> Maybe not for a web page that shows the whole agenda but there are
> mobile cases where it might make sense. It also might make sense
> to query all groups by date.

I think it's better to provide and consume a batch API that allows one
to do a simple search, e.g. by encoding the search with a flexible GET
parameter scheme rather than in the (unflexible) path of the URL. This
is where many "REST" frameworks go wrong IMHO - how can you do cool
things if you start off in a straitjacket? Of course, YMMV.


Ole