Re: Types of Web Service

Phillip Hallam-Baker <hallam@gmail.com> Thu, 24 January 2013 20:17 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D6CAD21F84CA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 24 Jan 2013 12:17:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.561
X-Spam-Level:
X-Spam-Status: No, score=-9.561 tagged_above=-999 required=5 tests=[AWL=1.037, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
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 3Q91TRUUh3Am for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 24 Jan 2013 12:17:13 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id DD77821F84C6 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 24 Jan 2013 12:17:12 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1TyTD2-0006fT-3h for ietf-http-wg-dist@listhub.w3.org; Thu, 24 Jan 2013 20:15:40 +0000
Resent-Date: Thu, 24 Jan 2013 20:15:40 +0000
Resent-Message-Id: <E1TyTD2-0006fT-3h@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <hallam@gmail.com>) id 1TyTCr-0006eN-HL for ietf-http-wg@listhub.w3.org; Thu, 24 Jan 2013 20:15:29 +0000
Received: from mail-wi0-f182.google.com ([209.85.212.182]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <hallam@gmail.com>) id 1TyTCo-0006H8-Cu for ietf-http-wg@w3.org; Thu, 24 Jan 2013 20:15:29 +0000
Received: by mail-wi0-f182.google.com with SMTP id hn14so828153wib.9 for <ietf-http-wg@w3.org>; Thu, 24 Jan 2013 12:15:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=w9JgSfvdsGd9lbh/rIKpWVeIEG41QHxfbic/wsJ/c8I=; b=W1jUrBylecx1sGnH8+IHnWeyiH1Cw4++BGVZZ5bNrY4NS/wvjvrzZUoL17KUuNXMqQ NrtqHF9U+v+YU/jIXFrcxCUAA/uRplPd2z8c3YA5hK4bRprKXaMJ5UuH/rVzDPhuHyRr T+1zBu2lG1OThvA6XTG0G7/3EgvC6fiitHCyRdZLTK/1dqoWEut5DnA/sG3FZIMWjdyP pHp32MjdJbKI2UYs6GXA9Kw3RfbBkSwUuMYD85bh3Ps4w246DPYO2ph/0UFTc73f0/M8 9b8wH9NZWqiuvLIo+vFsBrPxfE1D4rqkxqhRoUIgKSZmunJscclqKDBM00FRAbS3qEXT 77og==
MIME-Version: 1.0
X-Received: by 10.180.95.135 with SMTP id dk7mr5351788wib.29.1359058500168; Thu, 24 Jan 2013 12:15:00 -0800 (PST)
Received: by 10.194.136.66 with HTTP; Thu, 24 Jan 2013 12:15:00 -0800 (PST)
In-Reply-To: <51018591.90408@gmx.de>
References: <CAMm+LwgU7=SNXhuiOXgT1hsTH+95YReHj3FBZ-5W+powMwcfLA@mail.gmail.com> <51018591.90408@gmx.de>
Date: Thu, 24 Jan 2013 15:15:00 -0500
Message-ID: <CAMm+Lwh07nVjD+J=Fjw=0BEJN=rd+aEL1LZW6Nx=XrhkPDH_AQ@mail.gmail.com>
From: Phillip Hallam-Baker <hallam@gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="f46d0444eec721ad6704d40e773c"
Received-SPF: pass client-ip=209.85.212.182; envelope-from=hallam@gmail.com; helo=mail-wi0-f182.google.com
X-W3C-Hub-Spam-Status: No, score=-3.1
X-W3C-Hub-Spam-Report: AWL=-2.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1TyTCo-0006H8-Cu f169268401bb891e0cf95b63d58db7bc
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Types of Web Service
Archived-At: <http://www.w3.org/mid/CAMm+Lwh07nVjD+J=Fjw=0BEJN=rd+aEL1LZW6Nx=XrhkPDH_AQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16174
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Thu, Jan 24, 2013 at 2:03 PM, Julian Reschke <julian.reschke@gmx.de>wrote:

> On 2013-01-24 18:36, Phillip Hallam-Baker wrote:
>
>>
>> To understand REST, it is important to note that there are really two
>> definitions at this point:
>>
>> 1) What Roy Fielding originally proposed
>>
>
> ...described.
>
>
>  2) Don't do XML encoding
>>
>
> Sorry? The choice of payload formats is entirely orthogonal to REST.


And inheritance had rather little to do with the original SIMULA/Smalltalk
definition of 'Object Oriented Programming'.

I didn't say it made any sense.



>
>  What Roy actually proposed results in a different approach to encoding
>> of idempotent transactions where caching is desirable. If the Web
>> Service is not idempotent then see case (2).
>>
>> So the classes of Web interaction I see are
>>
>> 1) User directed content retrieval
>> 2) Machine directed content retrieval
>> 3) Remote Procedure Call
>> 4) Inter process communication
>>
>> HTTP/1.1 supports 1 through 3 but not 4 which is why we needed Web
>> Sockets to provide an escape hatch. The HTTP protocol is unidirectional
>> RPC.
>>
>> One of the features I would like out of HTTP/2.0 is to support arbitrary
>> communication patterns so that it is possible for a party on either side
>> of the communication channel to initiate communications at any time.
>> That would make HTTP a true Presentation Layer.
>>
>>
>> When used as a serialization format, JSON has all the expressive power
>> of XML and ASN.1 but far less complexity. I therefore prefer JSON unless
>>
>
> Actually, it doesn't, unless you add another stack of semantics on top of
> JSON. But that doesn't matter, as the protocol isn't and shouldn't be
> concerned with payload formats.
>
>
>  there is a legacy issue. I see no value in using form-uri-encoding
>> except in the specific case of uri-encoding of an idempotent, cacheable
>> GET request. My preference is to use JSON in both directions.
>>
>
> You can in HTTP/1.1 already.


That is what I do. when I am designing. I just wish we could get away from
the idea that REST means doing uri-encoding on the request rather than to
do with using a cacheable identifier.

If the Web Service is of type 2, that is a Machine directed request for
possibly cachable content, probably the approach that would make best sense
would be to use a message digest of the request after canonicalizing ...
hey we just reinvented Harvest (or Squid as it is now called).


-- 
Website: http://hallambaker.com/