Re: Persistent storage / forwarding of events
Jens Alfke <[email protected]> Thu, 16 Oct 2003 16:32:39 -0700
| Newsgroups | gmane.comp.web.mod-pubsub.devel |
|---|---|
| Message-ID | <[email protected]> |
On Oct 16, 2003, at 4:04 PM, Adam Rifkin wrote: > I'll take a moment to put in a plug for Python. Most of the pubsub > apps I write that don't use JavaScript use Python. I've been getting into Ruby lately, which is very nice, and I don't want to confuse myself by learning too many languages at the same time :) > So we'd write code to do this as part of the app that is able to squash > duplicates received before the last connection dropped. Note that > do_max_age of infinity on the subscription lets a client replay all > the events in the topic so the app should be able to ascertain where > it last left off. Hm. This seems inefficient — I've run into the same issue with the Blogger API. I have to do something like: "OK server, give me the last 10 events." (Hmm, I don't recognize any of those, better ask for more...) "OK server, give me the last _20_ events." (Ah, I already had #16-20, so now I'm caught up.) So the server had to send me 30 events (10 of them duplicates!) just so I could get the 15 new ones. And this is an O(n^2) algorithm, so it gets even worse if there are even more messages to sync up. --Jens ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php