Inspiration for Batch Requests in OpenSocial from Facebook

10 views
Skip to first unread message

Mark W.

unread,
Dec 19, 2011, 6:13:35 PM12/19/11
to opensocial-an...@googlegroups.com
I was recently having a discussion on batch request support in OpenSocial. The question was asked if we could do something like what Facebook does in their batch request. Specifically, pass the results from one request as a parameter to the next. 
See: http://developers.facebook.com/docs/reference/api/batch/ ("Specifying dependencies between operations in the request")

I thought we could do this with request parameters, and using the ID/Key, but now I can't seem to find an example that shows that. Is this just wishful thinking on my end?

-Mark W.

James Snell

unread,
Dec 19, 2011, 6:34:00 PM12/19/11
to opensocial-an...@googlegroups.com
Hmmm... Why? What's the use case?

> --
> You received this message because you are subscribed to the Google Groups
> "OpenSocial and Gadgets Specification Discussion" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/opensocial-and-gadgets-spec/-/5A46mI87BUQJ.
> To post to this group, send email to
> opensocial-an...@googlegroups.com.
> To unsubscribe from this group, send email to
> opensocial-and-gadg...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/opensocial-and-gadgets-spec?hl=en.

James Snell

unread,
Dec 19, 2011, 7:05:42 PM12/19/11
to opensocial-an...@googlegroups.com
At first blush, I would question whether this is something we want to
encourage. I have some experience exploring http request batching
(http://tools.ietf.org/id/draft-snell-http-batch-01.txt) and after
exploring a number of avenues, I decided not to pursue it further for
a variety of reasons. Not the least of which is that this form of
batching, particularly batching that mixes idempotent and
non-idempotent requests and attempts to bind the results of one
batched request to the input of another has many potentially nasty
side effects -- e.g. it kills caching, can have serious security
ramifications, etc. Not to mention the fact that Facebooks approach is
just plain nasty technically (I mean, seriously... wrapping the body
of a post request inside a field in a json document inside a form
post?) Looking through the examples in the FB page, I don't see a
single case that wouldn't be better dealt with through proper resource
modeling.
Reply all
Reply to author
Forward
0 new messages