ActivityPub

42 views
Skip to first unread message

Evan Prodromou

unread,
Mar 16, 2012, 3:38:53 PM3/16/12
to Activity Streams
Folks,

I've started a W3C Community Group to discuss a standardized social
client API using Activity Streams.

http://www.w3.org/community/activitypub/

2-second explanation: if you want to follow someone, post a "follow"
activity to your stream. End of explanation.*

We've been using something along these lines as our preferred API for
StatusNet for a while.

http://status.net/wiki/AtomPub

I believe it's come up a couple of times here:

https://github.com/activitystreams/activity-api

...but I'm not sure if there's any intention to take that further
here.

-Evan

* Pow! Did I blow your mind? I thought so.


Bob Wyman

unread,
Mar 16, 2012, 4:14:09 PM3/16/12
to activity...@googlegroups.com
Evan,
Is there any progress on getting PubSubHubbub support for Status.net? (i.e. resolving your bug 1863 and several others).

If a site like Status.net, that supports ActivityStreams, was to also support PubSubHubbub, then it would be trivial for others to build applications that could "follow" someone's activity... i'm not sure if we really need new specifications in this area, what we need is for folk to support the stuff we've already defined...

bob wyman



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


Evan Prodromou

unread,
Mar 16, 2012, 4:23:15 PM3/16/12
to activity...@googlegroups.com
Hey, Bob!

Yes, we have been supporting PuSH for about 2 years now. PubSubHubbub+ActivityStreams is the heart of what we call "OStatus".

http://ostatus.org/

Exactly as you say, it's the main way to follow people remotely. There are tricky parts, but I hope we can improve it in the future.

I think the main idea for an Activity Streams API is to have a REST API to post new activities. I think it's a pretty trivial extension to the way we use Activity Streams right now.

-Evan

Daniel E. Renfer

unread,
Mar 16, 2012, 4:30:33 PM3/16/12
to activity...@googlegroups.com
I can't speak to rssCloud, but I've been happily receiving new activities from the hubs of the statusnet installs I subscribe to. So that part, at least, is working as expected. Seem like that ticket needs to be split off and parts of it closed.

I'm a little confused about the scope of an activitypub spec. You say that the user would have to simply post a follow verb to their stream, but how would the target user be notified? Would they still have to rely on the Salmon spec to have that activity delivered to the user's server? If so, what is there to say that hasn't been covered by other specs?

Todd Barnard

unread,
Mar 17, 2012, 5:15:12 PM3/17/12
to activity...@googlegroups.com
"...if you want to follow someone..."

Awesome. I would really like to follow the activity surrounding a social object, more than a specific person. Have some juicy operators would be gnarly.

 curl -v -X GET http://sxsw.com/2012/events/event_IAP11028/feed/activity/atom/

:D

Bob Wyman

unread,
Mar 17, 2012, 6:46:41 PM3/17/12
to activity...@googlegroups.com
It seems to me that what you would really like to do is be able to search (both retrospectively and prospectively) for particular values or sets of values in any of the components of an activity. (i.e. actor, verb, object, target, etc.)

Thus, using an overly simple syntax, then:
If I want to "follow" any activity of Evan Prodromou, I should be able to search for [actor.displayName:"Evan Prodromou"]
If I wanted to "track" any post that contained the word "foobar", I should be able to search for [verb:post AND object.content:foobar]
To find any activity whose object was a "comment" that referenced the tag "foobar" I would search for [object.objectType:comment AND object.tags.displayName:foobar]

Clearly, Boolean combinations of the various elements would be useful. (i.e. not only AND but OR and NOT as well.) And, one should be able to build arbitrarily complex search expressions -- not just rely on simple keyword matching. Thus, if I wanted instances of either the foobar or mumble tag but only in posts from Evan, I would search for: 
[actor:displayname:"Evan Prodromou" (object.objectType:comment (object.tags.displayName:foobar OR object.tags.displayName:mumble))
Note the use of parenthesis and the fact that "AND" is the default operator...

Would something like what I've sketched above be useful? What would you do with it if you could use it? if I could provide a system that took "subscriptions" using a syntax like that above and monitored activity streams being published through PubSubHubbub, what would you use it for?

bob wyman

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

Ryan B

unread,
Mar 17, 2012, 6:53:44 PM3/17/12
to Evan Prodromou, activity...@googlegroups.com
On Fri, Mar 16, 2012 at 12:38 PM, Evan Prodromou
<evan.pr...@gmail.com> wrote:
>
> 2-second explanation: if you want to follow someone, post a "follow"
> activity to your stream. End of explanation.*
>
> We've been using something along these lines as our preferred API for
> StatusNet for a while.

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?

--
http://snarfed.org/

James M Snell

unread,
Mar 17, 2012, 7:08:04 PM3/17/12
to activity...@googlegroups.com
Hey Evan,

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.

Bob Wyman

unread,
Mar 19, 2012, 5:24:20 PM3/19/12
to activity...@googlegroups.com
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?
  • 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?
  • 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.)
  • 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)
  • Is linking idempotent? If I LINK the same monitor to a resource twice, is it recorded twice or once?
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
 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?

bob wyman

James M Snell

unread,
Mar 19, 2012, 5:51:55 PM3/19/12
to activity...@googlegroups.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.

Reply all
Reply to author
Forward
0 new messages