Convert AJAX Chat to Socket.io or HTML 5 WebSocket to reduce overhead?

105 views
Skip to first unread message

Brandon Green

unread,
Nov 21, 2014, 9:28:45 PM11/21/14
to ajax...@googlegroups.com
Hi, I've installed and been using AJAX Chat for quite some time now and I do love how open sourced it is and easy to modify. Thanks to the creator(s).

I'm at the point now where I'm looking into ways to optimize the chat, via socket protocol. I saw there were some legacy Socket files and I enabled those, but they didn't really help me. I've looked into Socket.io and HTML 5 Web Sockets and they both seem like a viable solution that would greatly reduce overhead of sending ajax requests every 2 seconds for every user. I've got about 30 users using the chat and my CPU stays around 8% usage just from that. Which is okay for now, until we double, triple or quadruple user counts.. Then it starts to become an issue.

Didn't know if anyone else was blazing this front yet or if I should start hacking it myself.

Thanks for any and all responses.
Brandon Green

Kevin Ingwersen (Ingwie Phoenix)

unread,
Nov 22, 2014, 1:30:27 PM11/22/14
to Brandon Green, ajax...@googlegroups.com
Hey Brandon.

So as you, I also seeked to optimize the chat. And in fact, I will soon begin to apply a lot of patches to the chat to allow this very behavior.

I am working on a new version of my site, whose source code I have posted online so far. After the User related code is done, I cam base the other stuff on that. One of the other things is the chat itself.

Once I begin to write optimization for this chat to allow socket.io communication, I will let you know. In fact, I am thinking of extending the chat with a JavaScript interface that one can extend within custom.js to allow own implementations.

Kind regards, Ingwie
--
You received this message because you are subscribed to the Google Groups "AJAX-chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages