And the Channel API
http://code.google.com/appengine/docs/python/channel/
which should eliminate the need for polling AJAX requests yourself.
Could probably use the matcher API (renamed Speculative Search API)
http://groups.google.com/group/google-appengine/browse_thread/thread/5462e14c31f44bef
to perform dispatching of messages, again eliminating the need for the
polling on the datastore.
On 23 February 2011 08:29, Joonas Pihlajamaa
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
Google Talk :)
http://www.google.com/support/talk/bin/answer.py?hl=en&answer=57677
(I beleive XMPP and the channel API already use the Talk infestructure
under the hood anyway)
> (Don't think I should apply for testing when I only have a few concurrent users at most :)
Testing in a few users, is still worthwhile. Get it working on a few,
and it should work for more.
You might not even need to apply now. Speculative Search should be
near ready for launch (it didnt make the latest SDK release tho)
If you want users to be able to view / page through old 'chat logs'
then, as you mentioned, you'll need to store them. How fast do you
expect to receive messages for a given channel, how large are the
messages expected to be on average, and how much history do you want
to keep for users to view? If messages will typically arrive less
than one per 1/2 second or so, option (1) or (3) might work really
nicely. If messages are small and you only need, say, the last 100
messages your first option might work very well.
Keep in mind, if you will not be querying the list property, you can
serialize and store you data significantly more efficiently in a text
or blob property.
Obviously storing each message in its own entity makes writes simple,
but means you need a query to send messages to users instead of a
fetch by key. If your write rate to a channel is low enough, I
suspect option (1) or (3) will make reads extremely fast. If the
write rate is high the second option might be your best choice, or
some combination approach (ie write new messages to their own entities
and run a background task to batch up new messages and update the
'channel' entities).
Just a few thoughts.
Robert