bod1467 on Nov 4, 2010 at 2:46:37 AM (# 12) This message has been edited.I wasn't extolling the virtues of AJAX over JQuery/JSON per se; more that typical uses of JQuery use the non-compacted library and so have several hundred KB of library to download unnecessarily. That said, it only downloads once and is then cached. :-) (Although I don't agree that there's a massive code overhead for AJAX - my earlier post is all you really need to enable an AJAX/XML interface in just about any browser).
I can't argue with your metrics of JSON vs AJAX as I've not done (or looked at) any evaluations. However I see we are both agreed that the suggested methodology is sound. :-) Monte on Nov 4, 2010 at 7:50:06 AM (# 13)I'm working on this, guys. I'll let you know how it goes as it progresses... ChrisRickard on Nov 5, 2010 at 7:34:14 PM (# 14)I'm sorry guys but as a self appointed SE mod I can't allow a non-spam or random tech support question thread to continue. brian on Nov 8, 2010 at 12:41:34 AM (# 15):D Oh go on...it'll be fun. Monte on Nov 9, 2010 at 6:23:33 AM (# 16)Just an update...
Silverlight + PHP/JSON seems to be working at this point...
I decided to go with a 10-second timer. Terry Young on Nov 15, 2010 at 3:12:25 PM (# 17) This message has been edited.I agree with all the replies in this thread, ChrisRickard's included :D
Except for one thing, stress on server is not directly related to how you strike the balance on the timer interval. It does, but it's not a primary factor. The number of users is.
My two cents adds to the timer approach, and that is, I would only do the Ajax HTTP Request only if the previous one had already returned, and I would abort the request if there is no response in X-seconds then initiate a new request. Taking it even further, for X consecutive number of timeouts, then you might want to let the user know about it, or do something accordingly.
I once had a 5-second-or-so timer (eventually ended up being 10 or so, not the point), and while jQuery was out of the picture for me at that time, this is what helped me done the job instead: http://www.ajaxtoolbox.com/request/documentation.php
I particularly like that library for it's support for grouped ajax request, the ability to do something if a timeout occurs, and it internally aborts the request if that timeout occurs.
Life gets easier if you can already handle timeouts and abort requests if needed, and IMHO there's no perfect timer or interval until timeouts and aborts are handled. Monte on Feb 10, 2011 at 8:14:54 AM (# 18)I figured I would give another update on this. Silverlight + PHP is the way I decided to go. I have to modify the PHP file to get the data (I'm using static data right now), but I think it might work.
|