views:

376

answers:

1

I'm trying to design an app based on the opensocial API and I'm uncertain of how the pubsub apparatus will work. This appears to be analogous to a unix pipe, or perhaps an rss feed.

Is a channel persistent across browsers / computers? That is, can I subscribe to channel "x" on browser A and publish to "x" on browser B, and have this data be read in browser A? If not, is there a convenient opensocial method of accomplishing the same thing?

Also: if one gadget subscribes to a channel after data is published, can that data still be read?

+1  A: 

Pubsub is an API feature that allows different OpenSocial gadgets to talk to one another while being on the same page in an OpenSocial container.

That means the connection is not persistent, but if for example you have a map gadget, and a gadget with a list of restaurants which both appear in a page, this mechanism can enable the list to stay relevant to the currently shown area of the map.

This would require the two gadgets to agree on a message format and channel ahead of time.

levik