Are they using COMET technology?
What do you recommend to use, and probably a simple description on how to implement it using the suggested technology/ies?
Hi what ajax technology does these sites use?
I did a quick inspection of Bidzinga's source-code and it looks like they are doing just simple polling(frequently!). For example in this javascript file(http://www.bidzinga.com/js/default.js) I show part which does polling frequently:
setInterval(function(){
var gettime = '/gettime.php?' + new Date().getTime();
$.ajax({
url: gettime,
success: function(data){
bidOfficialTime.html(data);
}
});
}, 1000);
This is a pretty bad approach if you ask me and will kill your server under load. If this server which as you can see is using PHP(/gettime.php
) does not have APC(You need to at least install/compile this for good performance) then you you can bet the server can't cope, because every time PHP needs to compile bytecode. Also it needs to get every request from disc(sometimes cached) when not using APC or any in-memory database (Redis, Memcached). Even though polling in frequent intervals is never a smart approach and you can be sure your server will die under the load.
Are they using COMET technology?
Bidzinga is NOT using COMET, because it uses plain polling.
What do you recommend to use, and probably a simple description on how to implement it using the suggested technology?
I guess it depends on your scale(size).
but I think in the beginning I would recommend you to use pusher because it is a hosted solution which is pretty good documented and even has a free plan.
Our free Sandbox plan includes up to 20 connections and 100,000 messages per day
I have to remind you that the free/cheap plans do NOT have SSL so you should NEVER send any private information over the wire. The bigger price plans do have SSL, but will cost $50 monthly. I think you can go cheaper if you implement this yourself, but then again that will cost you time(time equals money). Here are some other hosted solutions which might fit your bill:
First off I would like to mention that none of these are PHP, because I don't think PHP is designed to handle this. Even Facebook which was an entirely PHP-shop(now uses HipHop a lot) agrees with me and implemented chat using erlang. For these open-source products which are pretty good documented you are going to need to a VPS. For some of them it is really nice if you can install software as root. While a VPS is not really needed for all these products, but you should have the ability to compile software.