Re: Shoutbox suggestion needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The main issue with these systems is updating the client on a regular enough basis. If the content is time critical, like with Facebook chat, then you need to do long polling.

However for a Shoutbox, because it's more like an IRC channel with people 'shouting' to a channel, you can probably just set the client to automatically update on a regular basis. Or even more advanced, would be to get it to check in increasing intervals. Firstly it checks 0.5s later, then 1s later, then 2s, 4s, 8s, 16s, with a limit of 60s (i.e it checks at least once a minute for an update), upon new content being received the time is reset back to the 0.5s

If you need to do long polling <http://ajaxpatterns.org/HTTP_Streaming> then look into the Tornado Webserver <http://www.tornadoweb.org/> which Friendfeed <http://friendfeed.com/>, and more recently, Facebook use (for their LiveFeed system). For a PHP based implementation check this out <http://www.zeitoun.net/articles/comet_and_php/start>.




Michael Kubler
*G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz>
Mobile : 0433483008

I believe in a better world. I support the Zeitgeist Movement <http://www.zeitgeistsa.com>.



Ashley Sheridan wrote:
On Mon, 2009-11-16 at 12:06 -0500, Paul M Foster wrote:

On Mon, Nov 16, 2009 at 02:46:45PM +0000, Ashley Sheridan wrote:

I don't know of anything you can use like this, especially that runs
purely on Ajax. Just take a look at Facebook chat. That's Ajax, and
fails and falls over on a constant basis to the point where it is almost
useless. Imho, Java seems to be pretty good at this sort of thing, and
there are plenty of free options out there that you could use.
It's often been argued back and forth whether people have Javascript
turned off. I suspect the vast majority of people have Javascript turned
on. However, Java is another story. You may find that many more have it
turned off.

Paul

--
Paul M. Foster



Yeah, but then, generally, you can tell the people visiting this site
what they need enabled, as it looks like the visitors are going to be a
select few. Java is available on all the main browsers, and generally
only needs one to accept the applet. For a chat application to be
written using only Ajax technology, well, like I said before, if
Facebook tried it and still can't get it right with all the financial
backing they have, what hope for someone to release this sort of thing
open source and Facebook not be aware of it?

Thanks,
Ash
http://www.ashleysheridan.co.uk




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux