Kitkat Posted May 18, 2009 Share Posted May 18, 2009 Hey guys, I'm trying to create an _LIVE_ chatbox for my website along with a friend's website. I've created one before but our host contacted us and had it taken down because it was consuming too much bandwidth and was slowing down the server. What I was doing was simply running a script that pulled down new messages every half a second - yes, that was probably much too fast, but I wanted it to be as "live" as possible. What I'm asking is, has anybody else here created a truly live chat, and if so (or even if not), how is it possible? I've heard things about persistent connections but I don't know anything about them beyond that. Basically what I want to create is a live chat script that I can later edit to support multiple channels given that there may be up to a few hundred users on at a time. Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/ Share on other sites More sharing options...
premiso Posted May 18, 2009 Share Posted May 18, 2009 If you have that many users why not look into a Java/IRC Chat application ? That will be low bandwidth and probably be more responsive than an online php script. Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-836518 Share on other sites More sharing options...
nadeemshafi9 Posted May 18, 2009 Share Posted May 18, 2009 just pull down text and it should be ok to pull dowqn every milisecond if you like. Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-836519 Share on other sites More sharing options...
zq29 Posted May 18, 2009 Share Posted May 18, 2009 just pull down text and it should be ok to pull dowqn every milisecond if you like. 1000 requests a second per user should be ok? Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-836537 Share on other sites More sharing options...
RussellReal Posted May 18, 2009 Share Posted May 18, 2009 no, set up a server.. I released an opensource server script that you can turn your home computer into a server.. then simply start the server, and handle the connections and when sum1 sends a message, send it to the user associated with that message.. E.G. MSG UserName/Channel TI:ME:ST-A/M/P MSG TO SEND then just send it to them via their connection http://lovinglori.com/newServer.phps Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-836552 Share on other sites More sharing options...
nadeemshafi9 Posted May 19, 2009 Share Posted May 19, 2009 just pull down text and it should be ok to pull dowqn every milisecond if you like. 1000 requests a second per user should be ok? yeh why not lol Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-837081 Share on other sites More sharing options...
Ken2k7 Posted May 19, 2009 Share Posted May 19, 2009 just pull down text and it should be ok to pull dowqn every milisecond if you like. 1000 requests a second per user should be ok? yeh why not lol Are you serious? Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-837218 Share on other sites More sharing options...
nadeemshafi9 Posted May 19, 2009 Share Posted May 19, 2009 just pull down text and it should be ok to pull dowqn every milisecond if you like. 1000 requests a second per user should be ok? yeh why not lol Are you serious? not realy but im sure you can send text throgh ajax and receive it if you do it smart enogh without problems, how do you think javascript IM forum does it. Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-837298 Share on other sites More sharing options...
Daniel0 Posted May 19, 2009 Share Posted May 19, 2009 What are you talking about? Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-837305 Share on other sites More sharing options...
Ken2k7 Posted May 19, 2009 Share Posted May 19, 2009 Oooh! What JavaScript IM forum? I wanna know! Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-837312 Share on other sites More sharing options...
nadeemshafi9 Posted May 20, 2009 Share Posted May 20, 2009 Oooh! What JavaScript IM forum? I wanna know! http://www.ajaxim.com/ http://drupal.org/project/ajaxim Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-838238 Share on other sites More sharing options...
Kitkat Posted May 21, 2009 Author Share Posted May 21, 2009 Ah, thanks for all the replies everyone. To answer a few questions - yes, I would imagine every second would be fine, but apparently my host thinks differently. I'm also tempted to set up my own server but I'm afraid my internet speed isn't quite good enough for the job. I'll check out the links. Do you know if they can be integrated in with my current membership base? Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-838968 Share on other sites More sharing options...
nadeemshafi9 Posted May 21, 2009 Share Posted May 21, 2009 Ah, thanks for all the replies everyone. To answer a few questions - yes, I would imagine every second would be fine, but apparently my host thinks differently. I'm also tempted to set up my own server but I'm afraid my internet speed isn't quite good enough for the job. I'll check out the links. Do you know if they can be integrated in with my current membership base? iif its coded in php then it can be adapted to any php app. Quote Link to comment https://forums.phpfreaks.com/topic/158612-efficient-high-powered-live-chat/#findComment-839328 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.