RE: Atom Content Negotiation (follow-up)

James Holderness <j4_james@hotmail.com> Mon, 02 May 2011 07:23 UTC

Return-Path: <owner-atom-syntax@mail.imc.org>
X-Original-To: ietfarch-atompub-archive@ietfa.amsl.com
Delivered-To: ietfarch-atompub-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9F840E06C0 for <ietfarch-atompub-archive@ietfa.amsl.com>; Mon, 2 May 2011 00:23:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RgsguSL4nuWV for <ietfarch-atompub-archive@ietfa.amsl.com>; Mon, 2 May 2011 00:23:12 -0700 (PDT)
Received: from hoffman.proper.com (IPv6.Hoffman.Proper.COM [IPv6:2001:4870:a30c:41::81]) by ietfa.amsl.com (Postfix) with ESMTP id 373FFE068B for <atompub-archive@ietf.org>; Mon, 2 May 2011 00:23:10 -0700 (PDT)
Received: from hoffman.proper.com (localhost [127.0.0.1]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id p427FkE9032436 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 May 2011 00:15:46 -0700 (MST) (envelope-from owner-atom-syntax@mail.imc.org)
Received: (from majordom@localhost) by hoffman.proper.com (8.14.4/8.13.5/Submit) id p427FkSA032435; Mon, 2 May 2011 00:15:46 -0700 (MST) (envelope-from owner-atom-syntax@mail.imc.org)
X-Authentication-Warning: hoffman.proper.com: majordom set sender to owner-atom-syntax@mail.imc.org using -f
Received: from blu0-omc2-s11.blu0.hotmail.com (blu0-omc2-s11.blu0.hotmail.com [65.55.111.86]) by hoffman.proper.com (8.14.4/8.14.3) with ESMTP id p427FjDI032430 for <atom-syntax@imc.org>; Mon, 2 May 2011 00:15:45 -0700 (MST) (envelope-from j4_james@hotmail.com)
Received: from BLU122-W28 ([65.55.111.73]) by blu0-omc2-s11.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 2 May 2011 00:15:44 -0700
Message-ID: <BLU122-W284C7C2E53440F1AFE1BCBBE9F0@phx.gbl>
Content-Type: multipart/alternative; boundary="_24a2dec6-5ae4-4df5-b0fd-51a9ad443ad6_"
X-Originating-IP: [84.51.185.29]
From: James Holderness <j4_james@hotmail.com>
To: dret@berkeley.edu, atom-syntax@imc.org
Subject: RE: Atom Content Negotiation (follow-up)
Date: Mon, 02 May 2011 07:15:44 +0000
Importance: Normal
In-Reply-To: <4DBCF02B.6080601@berkeley.edu>
References: <4DBC60F4.7000402@berkeley.edu> <BLU122-W686A8FCBEDB816FFA2BF8BE9D0@phx.gbl>, <4DBCF02B.6080601@berkeley.edu>
MIME-Version: 1.0
X-OriginalArrivalTime: 02 May 2011 07:15:44.0464 (UTC) FILETIME=[C0811D00:01CC0898]
Sender: owner-atom-syntax@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/atom-syntax/mail-archive/>
List-Unsubscribe: <mailto:atom-syntax-request@imc.org?body=unsubscribe>
List-ID: <atom-syntax.imc.org>

> i don't reject it, but it makes it necessary to issue additional GET 
> requests for each single entry. if you know that all you ever want are 
> the linked alternate variants, then it would be much more effective to 
> simply GET those in a feed (if there was one and you could find it).

With HTTP pipelining those multiple GETs shouldn't have that much of a negative impact, although I'll admit that in practice pipelining does have potential problems.

But even without pipelining, after the first feed retrieval, I would still expect those multiple GETs to be more effecient on subsequent updates. Two small GETs to retrieve one new feed entry would seem more efficient than one giant GET of a 20 entry feed when you only want the latest entry (unless you're also supporting RFC3229+feed?)

I guess this does depend to a some extent on the nature of your data, the frequency of updates, and the kind of clients you expect to have. Either way, though, I think you may be optimizing prematurely.

> i am interested in producing feeds that are useful to feed-consuming 
> clients. human-oriented feed clients prefer HTML, whereas other types of 
> clients might prefer XML or RDF or something else.

I still think you are going about it the wrong way. If the content-type for Atom doesn't sufficiently distinguish between the types of feed you want to serve for HTTP content negotiation to work, it seems to me you should be looking at ways to extend the content-type (like the type parameter that was proposed to distinguish between Atom entry documents and Atom feed documents). Inventing a new form of content negotiation that requires parsing links from the top of an Atom feed is just twisted.

But the real problem may just be an inappropriate use of Atom as a general purpose container format. If you have a client that prefers content as RDF, why not give them a true RDF feed? Why RDF embedded in Atom? That kind of misses the point of RDF. Even worse, if a client prefers JSON, do you really think it makes sense to serve them that JSON as base-64 encoded blobs inside an XML container? I can assure you that nobody is going to thank you for that option.

If you served RDF clients a real RDF feed, and JSON clients a real JSON format, then you could be using standard HTTP content negotiation - at least for most cases. If you wanted to provide an "HTML friendly" feed that was separate from the one with raw XML embedded, you'd still need a way to differentiate between the two, but at that point I would think it not worth the complication. I'd just make your feed content the raw XML, include a short summary, and then an alternate link to a more detailed HTML page if really necessary.