Coalesced activities (Was: Re: Query on cardinality of Atom entry : Activity)

18 views
Skip to first unread message

Chris Messina

unread,
Mar 23, 2010, 11:12:42 AM3/23/10
to activity...@googlegroups.com
Any follow up on this?

(I'm changing the subject in case the original was too esoteric for some!).

Chris

On Thu, Mar 11, 2010 at 3:44 PM, John Panzer <jpa...@google.com> wrote:
Let's imagine everyone is activity aware.  Isn't it still reasonable to imagine that A would like to send out a summary of the following activities:

* John posted a photo 1 minute ago.
* John posted a photo 1 minute ago.
* John posted a photo 1 minute ago.
* John posted a photo 1 minute ago.
* John posted a photo 1 minute ago.

...as exactly one coalesced activity:

* John posted 5 photos 1 minute ago.

Even if you assume that all downstream processors are going to do intelligent coalescing, which is dubious IMHO, you still may well not want to pay for the overhead of sending out all of the individual messages.

And of course the opposite is true on the generation side:  I imagine many clients would be far happier to upload their photos and then trigger a one-time "John posted 500 photos..." than to either send notifications one at a time or have the service trigger individual sends on their behalf.

So I think this is a useful and valuable even in the shiny future when the activities are buzzing around like busy bees.  

What would this mean for activities?  Well, it'd meant that a coalesced or summary activity is a first class activity, but one that is an alias for a collection of other activities.  In other words, it's a lot like a crosspost, but a crosspost that sums up a set of sources.  So what if you allowed crosspost:source multiple times?  Instead of

"A single Atom entry may contain zero or one crosspost:source elements."

you'd have one edit to crosspost:

"A single Atom entry may contain any number of crosspost:source elements."

...where N>1 source elements means "this entry is an aggregation or summary of the other activities".

If crosspost isn't right (because you're doing a derivative work, not a copy) then perhaps something similar would work.  Theoretically rev="collection" would be appropriate but I think people are trying to kill "rev".


On Thu, Mar 11, 2010 at 3:24 PM, Martin Atkins <ma...@degeneration.co.uk> wrote:
On 03/11/2010 01:27 PM, John Panzer wrote:
The new model draft spec
(http://martin.atkins.me.uk/specs/activitystreams/refactored-atomactivity)
 sez:

   Any valid Atom entry as defined by section 4.1.2 of [RFC4287]
   <#RFC4287> is a representation of one or more activities as defined
   in Section 3.1 <#Activity>.



and

   Although there is not a one-to-one mapping between an Atom entry and
   an activity...


I'm trying to understand why this would be; is there a canonical use
case for this?  (I saw an earlier discussion but did not understand the
use case; it seemed to involve coalesced activities but I don't quite
see how that is not just another summary activity with its own id.)


I was expecting a question like this, since I know this is one thing that was really unclear in the previous spec, and this is why I made a point of calling it out right at the start of the section about activity entries.

This is another case where we make a concession in Activity Streams to afford nicer presentation in non-activity-aware feed reader applications.

Specifically, publishers seem to want to publish this sequence of activities:

 * John posted a photo 1 minute ago.
 * John posted a photo 1 minute ago.
 * John posted a photo 1 minute ago.
 * John posted a photo 1 minute ago.
 * John posted a photo 1 minute ago.

as:

 * John posted 5 photos 1 minute ago.

So allowing a single activity entry to actually represent 5 activities affords the desired handling in non-activity readers while keeping the activities distinct in activity-aware readers. (The assumption being that activity-aware readers will do their own display-time summarization if they want to and that may or may not match the summarization of the original feed.)

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



--
Chris Messina
Open Web Advocate, Google

Personal: http://factoryjoe.com
Follow me on Buzz: http://buzz.google.com/chrismessina
...or Twitter: http://twitter.com/chrismessina

This email is:   [ ] shareable    [X] ask first   [ ] private

tyler gillies

unread,
Mar 23, 2010, 12:35:23 PM3/23/10
to activity...@googlegroups.com
You have this uncanny knack to simplify things.
+1 for condensed
Everyone Loves Tea
http://www.everyonelovestea.com

Simon Wistow

unread,
Mar 25, 2010, 5:02:34 PM3/25/10
to activity...@googlegroups.com
On Tue, Mar 23, 2010 at 08:12:42AM -0700, Chris Messina said:
> Any follow up on this?
>
> (I'm changing the subject in case the original was too esoteric for some!).

We discussed this *ages* ago, way way back and I'm pretty sure that we
agreed that coalesced activities aren't the right way to go. But I'll
reiterate the arguments why they're a bad idea again.

So, John said

> Even if you assume that all downstream processors are going to do
> intelligent coalescing, which is dubious IMHO, you still may well
> not want to pay for the overhead of sending out all of the individual
> messages.

Let's deal with this in reverse order.

First off - the overhead. Do you mean the bandwidth overhead or the CPU
overhead. Because the CPU overhead is going to be higher with
coalescing. And really - how much bandwidth is actually going to save?
Isn't it all the meta data we're interested in anyway? Which means the
overhead you're saving is going to be trivial - let alone compared with,
say, the cost of serving up images, let alone music or videos.

Secondly - the point about downstream processors doing intelligent
coalescing:

Are we going to make coalescing mandatory? If not then the downstream
processor is going to have to do it anyway and now their code is even
more complicated?

If we do then allow consumers to chose how to coalesce? What if they
want to coalesce by type rather than time. Or vice versa. If someone
uploads 500 things to Flickr and some of them are videos and some are
photos how do we do that?

What happens if I request the activity stream half way through the
upload? Do I get

* John posted 250 photos 1 minute ago.

and then a minute later

* John posted 250 photos 2 minutes ago.
* John posted 250 photos 1 minute ago.

or

* John posted 500 photos 1 minute ago.

?

How does this work for streaming Atom feeds like 6A's UpdateStream?

In short - this has very few benefits from a practical point of view
(especially from the producer's point of view) and therefore stands
largely as a display optimisation ... and we shouldn't be second
guessing how the downstream processor wants to display stuff.

Simon

Michael Buckbee

unread,
Mar 25, 2010, 7:18:51 PM3/25/10
to activity...@googlegroups.com
As someone who will be a downstream processor, receiving coalesced activities would hinder some of the functionality and options we would like to provide. The big potential issue for us would be the open endedness of the time element; a more problematic example would be something like:

500 photos uploaded in the last day 

Where we would lose the ability to distinguish time between activities and when individual activities occurred. 

Thanks, 

Mike 

John Panzer

unread,
Mar 25, 2010, 7:46:51 PM3/25/10
to activity...@googlegroups.com
OK.  Note: My argument was that _if_ you want to represent coalesced activities, the current spec creates some technical difficulties.

If the consensus is that we don't need to represent coalesced activities in feeds at all, or at least not yet, then I'd be very happy, because it simplifies life considerably.

Who wants coalesced activities represented inside feeds?

Simon Wistow

unread,
Mar 25, 2010, 7:51:48 PM3/25/10
to activity...@googlegroups.com
On Thu, Mar 25, 2010 at 04:46:51PM -0700, John Panzer said:
> OK. Note: My argument was that _if_ you want to represent coalesced
> activities, the current spec creates some technical difficulties.

Yes, and I'm saying that we should *prevent* coalesced activities.

In the terminology of standards that's not CAN or even MAY. It's MUST
NOT.

Although partly that's because every time I read a standard an see CAN
or MAY I keep think of all the extra logic that's going to produce down
the line.


Darren Bounds

unread,
Mar 25, 2010, 8:10:36 PM3/25/10
to activity...@googlegroups.com
This is actually something we do now that's specific to photo-related
activities. When we consume a feed with multiple newly posted photo
within the polling period. They're anything but loss-less and in fact
result in nothing more than a single activity with multiple photo
objects. Certainly not all too desirable in a Salmon-enabled world.

The activity entry below represents multiple Flickr photo entries
posted by Chris which were pulled in during a single polling request.

<entry xmlns:service="http://activitystrea.ms/service-provider"
xmlns:activity="http://activitystrea.ms/spec/1.0/">
<author>
<name>factoryjoe</name>
<uri>http://cliqset.com/user/factoryjoe</uri>
</author>
<activity:actor xmlns:poco="http://portablecontacts.net/spec/1.0">
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
<poco:name>
<poco:givenName>Chris</poco:givenName>
<poco:familyName>Messina</poco:familyName>
</poco:name>
<link xmlns:media="http://purl.org/syndication/atommedia"
type="image/png" rel="avatar"
href="http://dynamic.cliqset.com/avatar/factoryjoe?s=80"
media:height="80" media:width="80"></link>
<link xmlns:media="http://purl.org/syndication/atommedia"
type="image/png" rel="avatar"
href="http://dynamic.cliqset.com/avatar/factoryjoe?s=120"
media:height="120" media:width="120"></link>
<link xmlns:media="http://purl.org/syndication/atommedia"
type="image/png" rel="avatar"
href="http://dynamic.cliqset.com/avatar/factoryjoe?s=200"
media:height="200" media:width="200"></link>
<link href="http://cliqset.com/user/factoryjoe" rel="alternate"
type="text/html"
length="0"></link><id>http://cliqset.com/user/factoryjoe</id></activity:actor>
<thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total>
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
<published>2010-03-25T21:33:07.000Z</published>
<service:provider>
<name>flickr</name>
<uri>http://flickr.com</uri>
<icon>http://cliqset-services.s3.amazonaws.com/flickr.png</icon>
</service:provider>
<category scheme="http://schemas.cliqset.com/activity/tags/1.0"
term="email" label="email"></category>
<category scheme="http://schemas.cliqset.com/activity/tags/1.0"
term="newsletter" label="newsletter"></category>
<category scheme="http://schemas.cliqset.com/activity/tags/1.0"
term="4stars" label="4stars"></category>
<category scheme="http://schemas.cliqset.com/activity/tags/1.0"
term="upsell" label="upsell"></category>
<category scheme="http://schemas.cliqset.com/activity/tags/1.0"
term="tripit" label="tripit"></category>
<category scheme="http://schemas.cliqset.com/activity/tags/1.0"
term="tripitpro" label="tripitpro"></category>
<activity:object>
<activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
<title type="text">Get more out of TripIt Pro</title>
<link type="image/jpeg" rel="preview"
href="http://media.cliqset.com/82d8de269812ff72d5d7f159361d36ed_thumb.jpg"></link>
<link rel="alternate" type="text/html"
href="http://www.flickr.com/photos/factoryjoe/4462679313/"></link>
<id>tag:cliqset.com,2010-03-25:/user/factoryjoe/VgouEgJE9X6rvQee/0</id></activity:object>
<activity:object xmlns:media="http://purl.org/syndication/atommedia">
<activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
<title type="text">Divvyshot</title>
<link type="image/jpeg" rel="preview"
href="http://media.cliqset.com/bc733ede2588ffb3b369911d8002653f_thumb.jpg"></link>
<link rel="alternate" type="text/html"
href="http://www.flickr.com/photos/factoryjoe/4462678983/"></link>
<media:description type="text">divvyshot.com/</media:description>
<id>tag:cliqset.com,2010-03-25:/user/factoryjoe/VgouEgJE9X6rvQee/1</id></activity:object>
<activity:object xmlns:media="http://purl.org/syndication/atommedia">
<activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
<title type="text">Divvyshot</title>
<link type="image/jpeg" rel="preview"
href="http://media.cliqset.com/4f7198411815938eb331d9fb0710b931_thumb.jpg"></link>
<link rel="alternate" type="text/html"
href="http://www.flickr.com/photos/factoryjoe/4463455430/"></link>
<media:description type="text">divvyshot.com/#to-learn</media:description>
<id>tag:cliqset.com,2010-03-25:/user/factoryjoe/VgouEgJE9X6rvQee/2</id></activity:object>
<activity:object xmlns:media="http://purl.org/syndication/atommedia">
<activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
<title type="text">Divvyshot</title>
<link type="image/jpeg" rel="preview"
href="http://media.cliqset.com/55bdceeed28ed8203bfc5b9ae2845708_thumb.jpg"></link>
<link rel="alternate" type="text/html"
href="http://www.flickr.com/photos/factoryjoe/4462678343/"></link>
<media:description type="text">divvyshot.com/#to-about</media:description>
<id>tag:cliqset.com,2010-03-25:/user/factoryjoe/VgouEgJE9X6rvQee/3</id></activity:object>
<activity:object xmlns:media="http://purl.org/syndication/atommedia">
<activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
<title type="text">Divvyshot</title>
<link type="image/jpeg" rel="preview"
href="http://media.cliqset.com/acc46fa1047c02492a3f1bc94e067e97_thumb.jpg"></link>
<link rel="alternate" type="text/html"
href="http://www.flickr.com/photos/factoryjoe/4462678115/"></link>
<media:description
type="text">divvyshot.com/accounts/login/?next=/</media:description>
<id>tag:cliqset.com,2010-03-25:/user/factoryjoe/VgouEgJE9X6rvQee/4</id></activity:object>
<title type="text">factoryjoe posted some photos on Flickr</title>
<summary type="text">factoryjoe posted 5 photos on Flickr</summary>
<category scheme="http://schemas.cliqset.com/activity/categories/1.0"
term="PhotoPosted" label="Photo Posted"></category>
<updated>2010-03-25T21:40:30.083Z</updated>
<id>tag:cliqset.com,2010-03-25:/user/factoryjoe/VgouEgJE9X6rvQee</id>
<link href="http://cliqset.com/user/factoryjoe/VgouEgJE9X6rvQee"
type="text/xhtml" rel="alternate" title="factoryjoe posted some photos
on Flickr"> </link>
</entry>

--
darren bounds
dar...@cliqset.com

Chris Messina

unread,
Mar 25, 2010, 9:37:18 PM3/25/10
to activity...@googlegroups.com
I should add that coalescing creates a stupid-aggregator problem in Buzz (which is more our problem than anything, but still illustrates a point):

Essentially Buzz aggregates a bunch of Flickr posts from a certain time period and coalesces them into one set... using the title from ONE of the images. Of course that one title has nothing to do with the group, so this is a big fail for my stream.

I think it'll be fixed, but I think it's further argument for not coalescing feed entries.

+1 to Simon's arguments — though we might want to provide some guidance to aggregators about how to deal with "batches" of related activities.

Chris
Reply all
Reply to author
Forward
0 new messages