Michdd Posted November 14, 2009 Share Posted November 14, 2009 Is it true that http://meebo.com runs on AJAX? How is that possible? Isn't AJAX far too slow to maintain a real-time application like this? Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/ Share on other sites More sharing options...
Mchl Posted November 14, 2009 Share Posted November 14, 2009 Ajax is not slow. [added] From quick scanning of their JavaScript code it appears that they are indeed using Ajax. Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957644 Share on other sites More sharing options...
Michdd Posted November 14, 2009 Author Share Posted November 14, 2009 Hm.. I was always under the impression that AJAX was pretty slow. Even if it's faster how is it possible to create something 'live' without being extremely inefficient? Isn't AJAX just low-level http requests? Wouldn't you have to run an Ajax request every few seconds to query the server to see if there are any updates? Or is there another way that I'm just completely oblivious to? Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957650 Share on other sites More sharing options...
Daniel0 Posted November 14, 2009 Share Posted November 14, 2009 Push Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957652 Share on other sites More sharing options...
TheFilmGod Posted November 14, 2009 Share Posted November 14, 2009 what about facebook chat? - Same idea. The webpage makes an ajax request every few seconds. If you have enough dedicated servers its not an issue. Remember, Meebo doesn't have to query its OWN servers. it queries the servers by AIM, Yahoo! chat, myspace, etc. to see if any new messages were posted. Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957653 Share on other sites More sharing options...
Michdd Posted November 14, 2009 Author Share Posted November 14, 2009 I find it shocking that meebo / facebook use blind http requests.. Especially with the amount of processing that needs to be done in certain instances, having this called every 1-2 seconds by every client seems overwhelmingly inefficient.. Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957657 Share on other sites More sharing options...
Michdd Posted November 15, 2009 Author Share Posted November 15, 2009 I guess I have another question about systems like these, it's probably pretty obvious but I'm just not sure. Would systems like these pass information through an AJAX request then the script that it queries relays information to a socket server? Is it something like that? Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957691 Share on other sites More sharing options...
keldorn Posted November 15, 2009 Share Posted November 15, 2009 what about facebook chat? - Same idea. The webpage makes an ajax request every few seconds. If you have enough dedicated servers its not an issue. If you had something huge like Facebook going on. You probably would quite a few dedicated boxes just for the chat. Multiple 1,000,000 users sending http request via ajax every 2 seconds, you will be going like 500,000 requests per second. That would quickly become unwieldy. It would cost a lot of $ to have that feature. (My opinion) Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957725 Share on other sites More sharing options...
TheFilmGod Posted November 15, 2009 Share Posted November 15, 2009 Yes, it would require a lot of dedicated servers, but facebook already had the resources, even before it launched its chat feature. And I'm sure the effort was well worth too. Firing an ajax request every few seconds seems necessary. This is really the only way the server can track if a person is online. Most people don't bother logging off; they simply click the "x" on their browser. Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-957743 Share on other sites More sharing options...
corbin Posted November 15, 2009 Share Posted November 15, 2009 AJAX isn't inherently slow. I think it would be more accurate to describe it as difficult to properly scale. Quote Link to comment https://forums.phpfreaks.com/topic/181553-ajax/#findComment-958022 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.