Skip to search.
rest-discuss · REST Discussion Mailing List

Group Information

  • Members: 1401
  • Category: Protocols
  • Founded: Nov 13, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
HttpEvents as currently contemplated are extraneous?   Message List  
Reply Message #591 of 18829 |

So just finished an afternoon reread of Ari Luotonen's book,
hadn't looked at it in a couple of years; also some material
online. I've *almost* convinced myself that HttpEvents as we are
currently discussing them are mostly extraneous. I'm going to
say some things about my understanding of the current very rough
but gradually converging consensus, then lay out the strawman for
why this approach is unnecessary. It's a straw man, whack away.

CURRENT CONSENSUS: An HttpEvents protocol could be any one of or
combination of things. It might be (1) simply a state-change
notification protocol, (2) a push-based state replication
protocol, or (3) a subscription / listener management protocol.
It appears that we are generally converging on (1), viewing (2)
as either an optimization or application-specific or both, and
(3) as interesting but somewhat out-of-scope for this spec. (We
are talking about reifying subscribers and subscriptions, but
pushing out "listener management" etc.)

Is that about right?

If so, then we may be spinning our wheels somewhat; various folks
did a fair bit of work on NOTIFY back in the early days [1] in
the context of proxy cache notification and in the course of the
HTTP-NG discussions. Not sure what the current state of NOTIFY
is; did it ever go anywhere? I apologize if there's an obvious
answer to this, as my own "cache" of HTTP caching-related
information is a bit stale. No mention of NOTIFY / this draft in
Ari's 1998 book, and very little I can find via Google.

BUT...

[1] describes a protocol extension (with a "new" method, NOTIFY)
that solves (1) in a very HTTPish way. It doesn't reify
subscriptions, but it doesn't have to --- it appears that
subscriptions are at-most-once commitments to notify the
subscriber that the state of a resource has changed, for the
purpose of cache invalidation. Renewal of the subscription
appears to happen incrementally --- the subscription "expires"
after the first notification, and is "renewed" on the subsequent
GET (if any) that happens to refresh the cache after the
notification is received.

The more I think about this, the more elegant it seems.

Here's how this protocol could be used to accomplish (1):

CLIENT -> SERVER
----------------------
GET /foo HTTP/1.1
Accept: text/html
Proxy-Features: my.host.com; notify

(Note that we're "pretending" to be our own proxy server cache.
We're requesting notification of state change on the resource if
it's available.)

SERVER -> CLIENT
---------------------
201 OK
Cache-Control: notify
Content-Type: text/html

...text...

(The SERVER responds and says, among other things, that it is
willing to notify (via the Cache-Control directive) the CLIENT
at-most-once (?) that the resource has changed by possibly
emitting a NOTIFY for that resource to the CLIENT at some later
date.)

Later on, when /foo changes, the SERVER initiates a connection
back to CLIENT (the machine specified in Proxy-Features:, i.e.
my.host.com) and sends notification that the state change
occurred / the cached copy (if any) has expired:

SERVER -> CLIENT
---------------------
NOTIFY /foo HTTP/1.1

(Presumably the fully-qualified URI is somehow reconstructed from
TCP connection data. This is gross and unworkable, so I would
assume that instead NOTIFY is required to provide a
fully-qualified URI.)

The client CLIENT proceed to refresh its cache via a GET. At
this point, the SERVER is presumably allowed to stop sending
further notifications; in order to receive the next
notification, the client parameterizes the GET so that it looks
just like the first one. This cycle repeats, ad infinitum, as
long as the CLIENT is interested in being updated about state
changes on SERVER/foo:

CLIENT -> SERVER
----------------------
GET /foo HTTP/1.1
Accept: text/html
Proxy-Features: my.host.com; notify

...lather, rinse, repeat...

DISCUSSION
--------------

PROS: This seems generally workable. It avoids issues with
management of subscriptions, etc. by its at-most-once
notification semantics. (It's at-most-once in that notifications
aren't guaranteed; the origin server may provide data to feed
cache age and freshness calculations, and the client / proxy must
use its own heuristics to determine whether to trust a cached
object in the absense of a notification.) The net effect is the
same as (1) in that clients receive state change notifications
for particular objects. *** It also partially addresses Lucas'
concern about state-leakage, in much the same manner that Lucas
suggested; a notification client need only support the NOTIFY
method. Responses to NOTIFY aren't described, but presumably a
reasonable set of responses could be specified so that extra
state isn't leaked in response to a NOTIFY. *** It also, as Alex
notes, avoids complications with overloading the semantics of
i.e. POST.

CONS: As noted in [1], any point-to-point notification protocol
suffers when there are a large number of parties interested in
receiving notifications; the draft explicitly states that
"clients should not attempt to use this facility as a matter of
course" for that reason. IMO, we're no better or worse off in
this regard with either [1] or HttpEvents as contemplated. There
are some problems with this draft, such as the lack of fully
qualifying the URI in the NOTIFY message --- how does the
notification client know what the notification relates to? Also,
the terminology is very proxy specific. It doesn't reify the
notion of a subscription, but given a one-shot semantics I'm not
sure this is necessary or even desirable. (!) :-/

TANGENTIAL ISSUES
------------------------

Most of the notification application scenarios I've been
contemplating are actually made simpler by simply recasting them
in terms of proxy cache invalidation and assuming something like
the above. This does *not* specify any state replication /
update by piggybacking the NOTIFY, nor does it address the issue
of fan-out. It also doesn't address the issue of proxy fan-out,
where a *request* to an intermediary needs to be fanned out to
multiple origin servers, but that's a completely different topic
and scenario.




[1] http://www.w3.org/TR/WD-proxy







Sat Feb 2, 2002 2:35 am

jbone@...
Send Email Send Email

Message #591 of 18829 |
Expand Messages Author Sort by Date

So just finished an afternoon reread of Ari Luotonen's book, hadn't looked at it in a couple of years; also some material online. I've *almost* convinced...
Jeff Bone
jbone@... Send Email
Feb 2, 2002
2:37 am

... You should separate listener management and subscription management. The latter is in scope because it is part of the relationship between publisher and...
Paul Prescod
paul@... Send Email
Feb 2, 2002
1:45 pm

I find your comments here extremely sensible, parsimonious, etc, and register a strong +1 for many if not all features of WD-Proxy. More detailed comments ...
Lucas Gonze
lucas_gonze Offline Send Email
Feb 2, 2002
5:02 pm

... Fair enough. ... I'm not sure why not. ;-) Point being, there are still some serious things to think about with both -wrt- scaling. IMO, in order to get...
Jeff Bone
jbone@... Send Email
Feb 2, 2002
5:51 pm

... BTW, if it wasn't clear, I wasn't actually suggesting that using an actual intermediary in this capacity. Rather, I was suggesting that something like ...
Jeff Bone
jbone@... Send Email
Feb 2, 2002
6:12 pm

... Got it. That's an important distinction. ... -- Just to clarify, I was thinking about the source side of things rather than the sink side. ... Is anybody...
Lucas Gonze
lucas_gonze Offline Send Email
Feb 3, 2002
12:23 am

I think we are converging on your (1), state- change-notification/cache-invalidation. I also am beginning to think that this whole discussion is extraneous;...
S. Alexander Jacobson
shop2it Offline Send Email
Feb 2, 2002
10:40 pm

... Edges are able to receive email events from a very large number of people -- persistent GET with all of them is not doable on any machine ever built, much ...
Lucas Gonze
lucas_gonze Offline Send Email
Feb 2, 2002
11:09 pm

I think that persistent GET, http notifications, and http updates are complementary projects. Hopefully people working on these can find *cough* synergies....
Lucas Gonze
lucas_gonze Offline Send Email
Feb 3, 2002
12:01 am

I don't think there is a coherent generic http update spec. As I said, I don't see the justification for http notification. The only thing that makes sense is...
S. Alexander Jacobson
shop2it Offline Send Email
Feb 3, 2002
12:11 am

... Yeah, I was just thinking out loud about long term directions. There's no doubt in my mind that full-scale callbacks using HTTP for state replication are ...
Lucas Gonze
lucas_gonze Offline Send Email
Feb 3, 2002
12:33 am

... Just to be clear, we are talking about subscriptions not email. Recipients need only recieve events from the places to which they subscribe. Servers need...
S. Alexander Jacobson
shop2it Offline Send Email
Feb 3, 2002
12:08 am

Another issue is that there is no "persistent GET". HTTP 1.1 assumes persistent connections by default, but that's not the same as assuming a streaming...
Mark Baker
distobj@... Send Email
Feb 3, 2002
1:56 am

... Thats fine, I think. If you offer notification, you create URLs which represent the stream of changes to some other URL (or collection of URLs). The...
S. Alexander Jacobson
shop2it Offline Send Email
Feb 3, 2002
5:47 am

... I wonder if use of the notify flag should be considered a backdoor way to set state on the server during a GET? Does it matter if this operation is...
Lucas Gonze
lucas_gonze Offline Send Email
Feb 5, 2002
1:37 am

... Hmmm... I don't think this is terribly problematic. One thing HTTP definitely *doesn't* provide is an assurance that the overall state of resource space...
Jeff Bone
jbone@... Send Email
Feb 6, 2002
7:05 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help