Every n minutes, the clients polls for updates. It sends along a marker token. The token is either a timestamp it has previously received from the server, or a serialized/json version of the "client model". A while ago, I posted a quick writeup on why you'd need a serialized model here: http://stackoverflow.com/questions/602322/differential-ajax-...
I believe Gmail uses a Comet approach (keep http connections open for a while, and send updates at they happen), but this can be tricky to implement, especially when using something like Google App Engine that places strict deadlines on request handlers.