--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.
To post to this group, send email to activity...@googlegroups.com.
To unsubscribe from this group, send email to activity-strea...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activity-streams?hl=en.
--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.
To view this discussion on the web visit https://groups.google.com/d/msg/activity-streams/-/9YTE9eyULPcJ.
interesting! just to make sure i (and others) understand, this is an
API that lets clients of a single social network site manage user
accounts on that site. it's *not* about federation or other
communication between sites themselves. that's what ostatus + PuSH
subscription is for.
is that right?
Cool to see additional activity in this area... this is an area I've
been thinking about quite a bit lately also...
Here's an alternative idea to consider...
Suppose there's a stream published at http://example.org/a/stream
I want to follow that stream and receive notifications of updates
LINK /a/stream HTTP/1.1
Host: example.org
Link: <http://my.example.com/my/endpoint>; rel="monitor"
After which, the stream starts POSTing Activity objects from the
stream at the endpoint I provided...
POST /my/endpoint HTTP/1.1
Host: my.example.com
Content-Type: application/stream+json
{...}
Later I want to stop receiving notifications...
UNLINK /a/stream HTTP/1.1
Host: example.org
Link: <http://my.example.com/my/endpoint>; rel="monitor"
All done.
Let's suppose the stream wants to push events to my endpoint... it does...
LINK /my/endpoint HTTP/1.1
Host: my.example.com
Link: <http://example.org/a/stream>; rel="stream"
If my endpoint accepts the link, the stream starts POSTing activities
to my endpoint...
POST /my/endpoint HTTP/1.1
Host: my.example.com
Content-Type: application/stream+json
{...}
When the stream is ready to stop pushing activities... it can
UNLINK /my/endpoint HTTP/1.1
Host: my.example.com
Link: <http://example.org/a/stream>; rel="stream"
- James
On Fri, Mar 16, 2012 at 12:38 PM, Evan Prodromou
<evan.pr...@gmail.com> wrote:
> --
> You received this message because you are subscribed to the Google Groups "Activity Streams" group.
LINK /my/endpoint?q=verb:post HTTP/1.1
Host: my.example.com
On Mar 19, 2012 2:24 PM, "Bob Wyman" <b...@wyman.us> wrote:
>
> James,
> Your proposal for using LINK/UNLINK is intriguing, but I have a few questions that I admit may result from my only remembering LINK vaguely from discussions over 10 years ago...
> LINK and UNLINK were defined in RFC2068 but then dropped by RFC2616. Have they been reborn in some RFC or W3C spec of which I am unaware?
It is something I am considering reintroducing in an I-D. The range of applicable use cases is growing...
> How would the visibility of the LINK be controlled? Given that the LINK is considered metadata for the resource, would it be reported as a Link response-header to all those who subsequently do a GET for the resource? Is there a means to distinguish between links which are public as response-headers and those which are not?
This would be resource specific. It would not be unlike POST in that the exact behavior is defined by the server.
> If LINKs do get reported as response-headers, then we might have a problem with resources that have thousands or millions of LINKers (i.e. Ashton Kutcher microblog feed...) in that all responses in the future would be weighted down by the bulk of all those headers. (I suspect that LINK wasn't intended to be used for this sort of thing.)
Correct. some links could be, but that's not the intention.
> If the LINK metadata isn't visible to GETters..., is there a mechanism by which I could determine if I have a link to a resource? (i.e. a way to list LINKs)
Again, this would be resource and impl specific. LINK only establishes the link, it doesn't surface the details of what links exist.
> Is linking idempotent? If I LINK the same monitor to a resource twice, is it recorded twice or once?
Yes. they are idempotent, but only in so far as equivalence of the link hrefs can be determined reliably. If I send two LINKs that point to the same logical resource but use two different href values, the assumption should be that two links are created.
> Also, while the LINK examples you gave would probably work ok for simple "follow" use cases, what about "track" (which relates to the content, not just the author or source, of the resource)? For instance, if I wanted all Activities that had a "post" verb, I might want to issue the following request:
>>
>> LINK /my/endpoint?q=verb:post HTTP/1.1
>> Host: my.example.com
>> Link: <http://example.org/a/stream>; rel="stream"
>
>
> If I issued the request above, what is the "resource" that I have LINKed? Is it "/my/endpoint/"? or is it "/my/endpoint?q=verb:post"?
> If it is "/my/endpoint," then I would really like some way to ask that endpoint what are all the sub-resources that I've linked to. How would I do this?
>
In general, you're requesting the creation of a link on a resource, not the request uri so it largely depends on how the server models it's notion of a resource and maps that to the request uri.