Re: [apps-discuss] Questions about Structured Syntax Suffixes (SSS)

ht@inf.ed.ac.uk (Henry S. Thompson) Thu, 24 May 2012 11:08 UTC

Return-Path: <ht@inf.ed.ac.uk>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3277721F8647 for <apps-discuss@ietfa.amsl.com>; Thu, 24 May 2012 04:08:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level:
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 D2ZdhpZLlL4s for <apps-discuss@ietfa.amsl.com>; Thu, 24 May 2012 04:08:41 -0700 (PDT)
Received: from treacle.ucs.ed.ac.uk (treacle.ucs.ed.ac.uk [129.215.16.102]) by ietfa.amsl.com (Postfix) with ESMTP id 7F51821F8644 for <discuss@apps.ietf.org>; Thu, 24 May 2012 04:08:41 -0700 (PDT)
Received: from nutty.inf.ed.ac.uk (nutty.inf.ed.ac.uk [129.215.33.33]) by treacle.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id q4OB8eCT026185; Thu, 24 May 2012 12:08:40 +0100 (BST)
Received: from calexico.inf.ed.ac.uk (calexico.inf.ed.ac.uk [129.215.24.15]) by nutty.inf.ed.ac.uk (8.13.8/8.13.8) with ESMTP id q4OB8elK008324; Thu, 24 May 2012 12:08:40 +0100
Received: from calexico.inf.ed.ac.uk (localhost [127.0.0.1]) by calexico.inf.ed.ac.uk (8.14.4/8.14.4) with ESMTP id q4OB8eU2020208; Thu, 24 May 2012 12:08:40 +0100
Received: (from ht@localhost) by calexico.inf.ed.ac.uk (8.14.4/8.14.4/Submit) id q4OB8dU5020203; Thu, 24 May 2012 12:08:39 +0100
X-Authentication-Warning: calexico.inf.ed.ac.uk: ht set sender to ht@inf.ed.ac.uk using -f
To: Mark Nottingham <mnot@mnot.net>
References: <832E3E94-723B-4DC9-A9D5-46EA7A7DB427@mnot.net> <f5b7gw1zwud.fsf@calexico.inf.ed.ac.uk> <1A233CED-A91D-4FDA-B8C6-3817299BB330@mnot.net>
From: ht@inf.ed.ac.uk
Date: Thu, 24 May 2012 12:08:39 +0100
In-Reply-To: <1A233CED-A91D-4FDA-B8C6-3817299BB330@mnot.net> (Mark Nottingham's message of "Thu, 24 May 2012 20:57:59 +1000")
Message-ID: <f5by5ohygy0.fsf@calexico.inf.ed.ac.uk>
User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.21 (linux)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Edinburgh-Scanned: at treacle.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus
X-Scanned-By: MIMEDefang 2.60 on 129.215.16.102
Cc: Apps Discuss <discuss@apps.ietf.org>
Subject: Re: [apps-discuss] Questions about Structured Syntax Suffixes (SSS)
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 May 2012 11:08:43 -0000

Mark Nottingham writes:

> HST wrote:
>> . . .
>> _But_ I think there is at least a potential upside going forward, in
>> that as we see both ...+xml and ...+json variants of particular types,
>> I _would_ expect software to dispatch on this information, rather than
>> sniffing.  Or, to turn that around, if we _don't_ support SSS, we are
>> in practice requiring applications to sniff.
>
> What software? If it knows about the specific format -- whatever
> convention is used -- it's not necessary to have a convention.

Howzat?  If I support application/foo, and I do a GET for a URI I
expect to yield such a payload, I need _some_ way of telling
whether the results use XML or JSON.  Either I sniff, or I have
information in the media type.  The latter has the advantage that if
I'm old-fashioned, and only support the XML variant, I can use a
well-understood mechanism to _ask_ for that variant, i.e. an Accept:
request header.

This also points towards another (putative, eventual) benefit --
suppose we do end up in a world with a number of formats which are
manifested in both +xml and +json variants -- I would hope/expect that
at least toolkits, and with luck browsers themselves, would offer API
wrappers around XMLHttpRequest that automagically parsed responses
based on + suffixes and handed over either JS or DOM objects as
appropriate.

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]