Proposal for Activity Paging

2 views
Skip to first unread message

Dave

unread,
Nov 7, 2008, 12:42:57 PM11/7/08
to opensocial-an...@googlegroups.com
I'd love to get this into v0.9. Here's the full proposal:
http://docs.google.com/Doc?id=dg2cfnzw_45ff6wcccn

And here's the text:

* Proposal for Activity Paging Support in OpenSocial

* Background

We can expect that Social Network users will generate a huge number of
Activities and for a variety of reasons, that clients of the
OpenSocial APIs will not wish to retrieve all of these activities at
once. OpenSocial must provide a way for clients to retrieve partial
Activity data in pages and this proposal outlines the changes needed
to the various OpenSocial specifications.

* Proposed changes

The to support Activitity Paging in the OpenSocial RESTful protocol,
RPC protocol and JavaScript are outlined below.

* RESTful protocol changes

No change is necessary. Section 6.5 of the v0.8.1 RESTful protocol
already specifies paging via startIndex and count for all collections
returned.

* RPC protocol changes

No change is necessary. Section 8.2 of the v0.8.1 RPC protocol already
specifies paging for activies via startIndex and count parameters.

* JavaScript API changes

Here, all we need to do is to provide a new static class
opensocial.DataRequest.ActivityRequestFields with he following fields:

<static> object FIRST
When paginating, the index of the first item to fetch;
specified as a number.
<static> object MAX
The maximum number of items to fetch, specified as a number;
defaults to 20.'

* Appendix

An implementation of this has been submitted to Apache Shindig (incubating):
https://issues.apache.org/jira/browse/SHINDIG-668

Chris Chabot

unread,
Nov 7, 2008, 7:07:09 PM11/7/08
to opensocial-an...@googlegroups.com
+1, makes sense to me

Zhen Wang

unread,
Nov 7, 2008, 7:19:55 PM11/7/08
to opensocial-an...@googlegroups.com
+1

I'd also suggest that the spec explicitly define: (1) The default value of the "FIRST" parameter; (2) Valid ranges of "FIRST" and "MAX"; (3) Expected result when either parameter is out of range.

Scott Seely

unread,
Nov 11, 2008, 5:05:18 PM11/11/08
to OpenSocial - OpenSocial and Gadgets Specification Discussion
+1

On Nov 7, 4:19 pm, Zhen Wang <wa...@google.com> wrote:
> +1
>
> I'd also suggest that the spec explicitly define: (1) The default value of
> the "FIRST" parameter; (2) Valid ranges of "FIRST" and "MAX"; (3) Expected
> result when either parameter is out of range.
>

Evan Gilbert

unread,
Nov 11, 2008, 8:00:09 PM11/11/08
to opensocial-an...@googlegroups.com
+1

Scott Seely

unread,
Nov 20, 2008, 4:16:27 PM11/20/08
to OpenSocial - OpenSocial and Gadgets Specification Discussion, uid...@google.com
Updated draft spec at http://sites.google.com/site/opensocialdraft/Home/opensocial-javascript-api-reference/datarequest.

Evan: please incorporate this into the min JS API.
Reply all
Reply to author
Forward
0 new messages