Re: Question about resource and representation

"Yi, EungJun" <semtlenori@gmail.com> Mon, 14 November 2016 07:37 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 7D8A812973A for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 13 Nov 2016 23:37:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.997
X-Spam-Level:
X-Spam-Status: No, score=-7.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kh9txO7pmF_e for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 13 Nov 2016 23:37:40 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 67A4F1296FC for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 13 Nov 2016 23:37:40 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c6Bm8-0002Yb-Qs for ietf-http-wg-dist@listhub.w3.org; Mon, 14 Nov 2016 07:33:56 +0000
Resent-Date: Mon, 14 Nov 2016 07:33:56 +0000
Resent-Message-Id: <E1c6Bm8-0002Yb-Qs@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <semtlenori@gmail.com>) id 1c6Blz-0002XR-NA for ietf-http-wg@listhub.w3.org; Mon, 14 Nov 2016 07:33:47 +0000
Received: from mail-yw0-f182.google.com ([209.85.161.182]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <semtlenori@gmail.com>) id 1c6Bln-0001Vb-N8 for ietf-http-wg@w3.org; Mon, 14 Nov 2016 07:33:42 +0000
Received: by mail-yw0-f182.google.com with SMTP id a10so49983729ywa.3 for <ietf-http-wg@w3.org>; Sun, 13 Nov 2016 23:33:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ryj+ebWfJKedOwxqlL+ozJjXLju+nGphe+P8UhXASJQ=; b=U3rjme3ILUan/9TJ6e8muYrgQFHNkR5/rbnNBWM+I3hZbgxocwype0pwLaORgnpJlO LWDmzkiKL9S+bC/hJRR0Jw08n3C4cagBKtnwutnf6joxOZk/Raw6NtUBzyYOkQ+yWYHQ 7cf1qWsQ1BJWIOaklfsuo6dPkZ4i5OfA7rwjBEZ/9kpIj/nbCqXB5iNfWiA6t4gG0N+W YAH/MrIc0fIAELuhAOklo4ihe+lIStKEuKf6yKymQ7y1xcAoZoyRn1t9jQKPFbBmaTJI mBQvO2g6GzjrpkgYWHfTWvJsNTtSa5FyjcDGKsvyN6YcbnP/ev0p2C4WbLzlUHWMRHat M0Fw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ryj+ebWfJKedOwxqlL+ozJjXLju+nGphe+P8UhXASJQ=; b=BX108/txQ+7W7XsRJqAqs9H4XFnccfynZb8eZuwDm4zPTh1ZYf1FMYGbSvpTs8UjMK FSICiLQUSlhsx9PSShE2kGXj1MWfmA68TNUBjR8r0rZZlSUlVwH6d0vd/60/IxqW8Ye7 ynGrzCvBna465c+CwoLKz2gWvSDazslqSzT2+0dEsDxADoX8t3zz+hZ97b2/dUWYrbWl zJ5cEEIViKCaMtJpM8kgaaytb+OtyoFYLl+rS78Hzb2orwuLEJidpu9CJuDvmHtRk6p3 wLk2iNQk6PcqiRY3adjpZeN9RCWvntLuRC9KL+Sss3gAB7OpbtJmgTBIvDHpqO6SjzZP fJbg==
X-Gm-Message-State: ABUngvcTn/IRYqgBDSyQa+bOuZ7rFLcgaeuGf9IDx7DR4XurRGW+nc02Dy0oAK9dsJ1rR5GHbp09pXuiVcoKWQ==
X-Received: by 10.157.45.74 with SMTP id v68mr470103ota.52.1479108789347; Sun, 13 Nov 2016 23:33:09 -0800 (PST)
MIME-Version: 1.0
References: <CAFT+Tg_UcBbHD1yz=26FUa6i6Ja=Z2O5UoJa_id4-MYM-X9iEA@mail.gmail.com> <6b7ac432-7027-0ac8-541c-9e5d51b2f5b9@treenet.co.nz>
In-Reply-To: <6b7ac432-7027-0ac8-541c-9e5d51b2f5b9@treenet.co.nz>
From: "Yi, EungJun" <semtlenori@gmail.com>
Date: Mon, 14 Nov 2016 07:32:59 +0000
Message-ID: <CAFT+Tg8tTFPG2G=+hQUJjs6AcW3KHEQygC2wo12DJ9p0Ri-jxw@mail.gmail.com>
To: Amos Jeffries <squid3@treenet.co.nz>, ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="001a113cfbe4f92a5305413dd9b1"
Received-SPF: pass client-ip=209.85.161.182; envelope-from=semtlenori@gmail.com; helo=mail-yw0-f182.google.com
X-W3C-Hub-Spam-Status: No, score=-3.1
X-W3C-Hub-Spam-Report: AWL=0.370, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1c6Bln-0001Vb-N8 7c5d0247da16796c6048cd76ef31297d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Question about resource and representation
Archived-At: <http://www.w3.org/mid/CAFT+Tg8tTFPG2G=+hQUJjs6AcW3KHEQygC2wo12DJ9p0Ri-jxw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32888
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>

Thanks to Amos and Mike for your great advices!

Thanks to your help, I could correct my understanding about representation
as follows.

1. A representation is an information to be intended to reflect a state of
a given resource, but not needed to be the state itself.

2. The target resource for a POST request may not be the resource that the
representation in the request reflects.

3. An implementor of a HTTP server which serves a POST request should
define a resource that the representation in the request reflects, if they
wants to make their server satisfies the semantics of the HTTP
specification.

On Mon, Nov 14, 2016 at 2:46 PM Amos Jeffries <squid3@treenet.co.nz> wrote:

> On 14/11/2016 6:08 p.m., Yi, EungJun wrote:
> > Hi,
> >
> >
> > According to RFC 7231, a representation is a state of a given resource
> >
> >
> >    For the purposes of HTTP, a "representation" is information that is
> >    intended to reflect a past, current, or desired state of a given
> >    resource, in a format that can be readily communicated via the
> >    protocol, and that consists of a set of representation metadata and a
> >    potentially unbounded stream of representation data.
> >
> >
> > and a payload in a POST request is also a representation.
> >
> >
> >    The POST method requests that the target resource process the
> >    representation enclosed in the request according to the resource's
> >    own specific semantics.
> >
> >
> > Then what is the resource which the representation enclosed in the
> > POST request reflects? I think the representation may not reflect a
> > state of the target resource for the POST request.
> >
>
> For POST there are three resources involved;
>
>  1) the server script/app receiving the POST is a resource (target
> resource in the POST URL)
>
>  2) the processing states that scripts code logic (semantics) can go
> through.
>
>  3) the resulting server data state is a resource (response resource).
>
>
> The payload of the POST relates most directly to (2). It is not a
> physical "thing" resource, just a logical set of processing states.
>
>
>
> Just like other messages the payload of a POST could be in either
> plain-text or compressed form. But as long as the uncompressed data is
> the same set of values the two representations result in the same
> logical processing by the server.
>
>
> HTH
> Amos
>
>
>