Welcome Guest Search | Active Topics | Sign In | Register

Callback Control and the CallbackQueueMode Enum Options
Raine Lightner
Posted: Tuesday, October 16, 2007 12:59:17 PM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
So, I wonder if you could give a bit more info as to what the DiscardAll option does in CallbackQueueMode

Does it basically turn off the callback control and in what type of situation would this be necessary?

Thanks

-Raine
eo_support
Posted: Tuesday, October 16, 2007 1:17:58 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Raine,

No. It doesn't turn off the callback. Consider the following sequence:

1. A callback is triggered;
2. The callback initiates the AJAX call to the server;
3. While it's waiting for the server's response, a second callback is triggered;

At this point, if DiscardAll is used, then the second callback request will be discarded, otherwise it will be queued up, and when the first call is finished, the second call would be sent to the server.

So when DiscardAll is set, the queue buffer is 0. The difference between DiscardAll and KeepLast is KeepLast has a queue buffer of 1.

Thanks
Raine Lightner
Posted: Tuesday, October 16, 2007 1:30:10 PM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
Ok.. so right now I'm using KeepAll for the following scenario:

Google Map that allows a user to drag the map to pan and view Geocaches.

http://www.geocaching.com/seek/gmnearest.aspx?lat=47.6715&lon=-122.3413

Just noticed this option so now I'm moving to KeepLast as some people don't wait for the caches to load and we've seen queuing of calls.

Would KeepLast be a better option for it to cancel prior requests when users pan the map fast?

-Raine
eo_support
Posted: Tuesday, October 16, 2007 1:54:49 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Theoretically. :) Pratically there really isn't too much of a notable difference from end user point of view.
Raine Lightner
Posted: Tuesday, October 16, 2007 1:59:30 PM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
well if 10 things queue up then once they stop moving the map they have to wait for all 10 queries to finish updating the map. with the KeepLast it seems to just finish last move only.

-Raine
eo_support
Posted: Tuesday, October 16, 2007 2:04:23 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yes. There is a huge difference between KeepAll and the other two. But there aren't that much of difference between KeepLast and DiscardAll. Sorry for the confusion.
Raine Lightner
Posted: Tuesday, October 16, 2007 2:06:50 PM
Rank: Member
Groups: Member

Joined: 6/18/2007
Posts: 21
Ok, thanks for the help.

-Raine


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.