I think that you should look at PubSubHubbub. Seems to be GAE's
official approach to feeds and events.
There was a presentation at this year's Google I/O conference on a
different solution called Channel API but it hasn't been released.
I just wish they had a service API for either one on the Java sdk.

On Jul 23, 3:44 pm, Mark <[email protected]> wrote:
> Hi,
>
> I'm looking to implement a pub/sub mechanism for my web app, similar
> to twitter. Users can follow one another. When a user performs some
> action, I'd like their followers to be able to see those actions in
> their follower stream.
>
> I can't figure a good way to do this on app engine. The most naive
> implementation would be to write a record per follower when an action
> is performed, like:
>
>    public void userAction(String username, String actionDescription) {
>        List<Follower> followers = getAllFriends(username);
>        for (Follower it : followers) {
>            Action action = new Action(it.getUsername(),
> actionDescription);
>            pm.makePersistent(action);
>        }
>    }
>
> then next time a user logs onto the site, they could simply query all
> actions (in pages) that have been prepared for them.
>
> This would work horribly though as it would require lots of writes as
> users get more followers. Is there an optimized way to do this on app
> engine? I don't need a method that works in realtime, accuracy is not
> that important either, meaning I could live with a 'sprinkling' of
> action records.
>
> I'm looking at the pub/sub topics in the dev forum and property lists
> are coming up a lot - is this a pattern to look into for this type of
> application (not familiar with property lists)?
>
> Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to