[aida] Comet pattern explained on our website
Janko Mivšek
janko.mivsek at eranova.si
Tue Mar 3 21:31:28 CET 2009
Rob Rothwell pravi:
> Hah!
>
> I think your initial
>
> liveContent updateEverySeconds: 3600.
>
> should be a very SHORT update:
>
> liveContent updateEverySeconds: 1.
Yes, you are right! Bad me, how come I didn't thing that way! Well I
actually did that way in original code, just somehow felt it is wrong...
I already updated the webpage. Sorry guys!
Janko
>
> Then you put the long delay in the waitForAnyChange method, just like
> you did.
>
> The "outer" Ajax short update will never fire until after you fall
> through the waitForAnyChange method, which will only happen after
> receiving an announcement or the count is reached.
>
> I don't know why I never got that right before...
>
> Rob
>
>
> On Tue, Mar 3, 2009 at 1:26 PM, Rob Rothwell <r.j.rothwell na gmail.com
> <mailto:r.j.rothwell na gmail.com>> wrote:
>
> Maybe this is a question I should have asked long ago.
>
> What are the benefits of just checking for an update every now and
> then with plain old Ajax, versus waiting for something to happen?
>
> Would I be better off just polling for changes every few seconds?
>
> Thanks,
>
> Rob
>
>
> On Tue, Mar 3, 2009 at 8:54 AM, Janko Mivšek
> <janko.mivsek na eranova.si <mailto:janko.mivsek na eranova.si>> wrote:
>
> Dear all,
>
> I open a special page for Comet pattern on our website:
>
> http://www.aidaweb.si/comet.html
>
> There you'll find a description of Comet and how it is supported
> in Aida
> as a pattern, because there is no special additional code for
> Comet in
> Aida, you are just using usual periodic updater, set to say 1h, but
> server delays the answer to this Ajax request until some interesting
> event happen to be worth refreshing the page.
>
> There is also an example how to implement the Comet pattern
> using the
> Announcement event framework, which is preferable way to go.
>
> Best regards
> Janko
More information about the Aida
mailing list