Re: Types of Web Service

Julian Reschke <julian.reschke@gmx.de> Thu, 24 January 2013 19:05 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 A360021F84F3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 24 Jan 2013 11:05:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.599
X-Spam-Level:
X-Spam-Status: No, score=-9.599 tagged_above=-999 required=5 tests=[AWL=1.000, BAYES_00=-2.599, 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 wAK3eEsuNMv5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 24 Jan 2013 11:05:36 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id A6E8A21F84DE for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 24 Jan 2013 11:05:36 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1TyS6a-0002eC-JL for ietf-http-wg-dist@listhub.w3.org; Thu, 24 Jan 2013 19:04:56 +0000
Resent-Date: Thu, 24 Jan 2013 19:04:56 +0000
Resent-Message-Id: <E1TyS6a-0002eC-JL@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1TyS6T-0002dO-Sl for ietf-http-wg@listhub.w3.org; Thu, 24 Jan 2013 19:04:49 +0000
Received: from mout.gmx.net ([212.227.17.21]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1TyS6O-00019N-Ki for ietf-http-wg@w3.org; Thu, 24 Jan 2013 19:04:49 +0000
Received: from mailout-de.gmx.net ([10.1.76.1]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MWdXB-1UVr4r03pL-00XpVT for <ietf-http-wg@w3.org>; Thu, 24 Jan 2013 20:04:18 +0100
Received: (qmail invoked by alias); 24 Jan 2013 19:03:47 -0000
Received: from p5DD95BCE.dip.t-dialin.net (EHLO [192.168.2.117]) [93.217.91.206] by mail.gmx.net (mp001) with SMTP; 24 Jan 2013 20:03:47 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/2c6Nwzoz2w3aX/gmD1QZZgybiJdMyDkSNnZ8CAT P2eKAUF3jH3SyZ
Message-ID: <51018591.90408@gmx.de>
Date: Thu, 24 Jan 2013 20:03:45 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version: 1.0
To: Phillip Hallam-Baker <hallam@gmail.com>
CC: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
References: <CAMm+LwgU7=SNXhuiOXgT1hsTH+95YReHj3FBZ-5W+powMwcfLA@mail.gmail.com>
In-Reply-To: <CAMm+LwgU7=SNXhuiOXgT1hsTH+95YReHj3FBZ-5W+powMwcfLA@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Received-SPF: pass client-ip=212.227.17.21; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-3.0
X-W3C-Hub-Spam-Report: AWL=-2.983, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1TyS6O-00019N-Ki 917e61d23d5fa5dfd49acb41c6925e96
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Types of Web Service
Archived-At: <http://www.w3.org/mid/51018591.90408@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16172
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 2013-01-24 18:36, Phillip Hallam-Baker wrote:
> On Thu, Jan 24, 2013 at 11:25 AM, Julian Reschke <julian.reschke@gmx.de
> <mailto:julian.reschke@gmx.de>> wrote:
>
>     That being said: can you clarify what you understand as "web
>     service", and how exactly it differs from a browser scenario? That
>     would be helpful to understand your concern.
>
>     BTW: I'm also not a big fan of introducing too much complexity into
>     the header representation; I think there's a consensus that that new
>     complexity needs to be justified by what we gain from it.
>
> One of the things this has uncovered is that most people here seem to
> have a rather different idea of a Web Service to me.
>
> According to the definition we started with back when SOAP was
> appearing, a Web Service was an any application protocol that ran over
> HTTP. According to that definition OCSP would probably be the first IETF
> Web Service.
>
> There are two very different types of Web Service though. OCSP is
> layered over HTTP so as to make use of HTTP caching. The protocol is
> intentionally idempotent and transactions do not cause state changes.
>
> OCSP is a machine-machine interaction but it is still essentially a
> request for content. The request format is highly structured but it is
> still an information retrieval protocol.
>
>
> The other type is the type I am more interested in these days where
> caching is not desired, either because the protocol causes state changes
> (is not idempotent) or because caching is simply not useful. The request

...it is not "safe"...

> and response messages both contain a data structure. It is not merely a
> machine-machine interaction, it is an inter-process communication.
> Process X on machine A sends a message to Process Y on machine B and
> waits for a response.
>
>
> The design of the SOAP stack is the way it is because it is essentially
> a wrapper that lets COM components talk to each other via an XML
> Serialization over a HTTP transport. It does other things but the need
> to have all those slots comes from the need to have a framing within the
> HTTP framing.
>
> WS-security and WS-* is the way it is because it is an attempt to secure
> SOAP using XML Signature. Which is a completely screwed up architecture
> because XML Signature requires canonicalization.
>
>
> 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.

> 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.

> I do not like JSON signature more than I like XML Signature though. Both
> seem like a good idea but the hard part of a signature format is to
> specify the exact sequence of octets that is signed. So there has to be
> some form of framing. Using a format that can only specify text for
> framing binary data inevitably produces a lousy result.
>
> So I really don't like where we are with Web Services right now. I think
> that we have a mess that could do with some clarity. In particular I
> would like:
>
> 1) A simple scheme for encoding headers
> 2) A compact representation for the most commonly used header data
> 3) Eliminate unnecessary duplication of header data across transactions
> 4) Support expressing authentication data in message headers
> 5) Support arbitrary communication patterns efficiently
> 6) Allow for extensibility
>
> Lower priority
>
> 7) Support use of multiple TCP streams.
> 8) Support use of Multicast and TCP streams in combination.
>
> --
> Website: http://hallambaker.com/

Best regards, Julian