What prompted you to build it?
I had a few reasons for deciding to build mibbit.
Firstly, I install new o/s’s from time to time at home, and sometimes need a little help with installing/updating a particular driver/package etc, so would have to install an irc client. I wasn’t a massive irc user at the time, and so having to install a client each time I wanted to ask a question on #linux for instance irritated me.
Secondly, I tried other web irc clients. For me, the standard of java applet, sucked. Very slow to load, very very ugly kludgy.
So I thought ajax would be a good way to make an easy to use and convenient irc client for the masses.
After I had built most of it, I found cgi::irc which does a similar type of job.
Did you use any specific lib or is all of the DOM/Ajax/JS homegrown?
Can you explain a little bit about the underpinnings of the app so folks can know how it works?
The first part I got working was the communications between browser and server. That’s done using 2 XMLHttpRequests. The first one is simply to send data from browser to server. It utilizes keep-alive, to minimise new connections.
The second XHR is the ‘receive lazy polling’ one. It connects to the server, and the server holds it open until there are messages available, or a timeout expires. This one is also keep-alive, so the next request goes down the same connection.
What you end up with is 2 connections held open to the server, with packets (json in this case), and some http headers from time to time.
To make sure the server would scale, I wrote a custom webserver in java using nio. It handles all of the connections in a single thread and as I say, scales to tens of thousands of connections.
If the client requests a new connection, it sends a request to the webserver, which then connects out, and starts proxying etc. It also runs an ident server in the case of irc connections so that an irc server can identify individual browsers. I looked at existing frameworks etc to do this sort of thing, but I valued learning how it all works, and thought that my use case may be specific enough to be able to optimise more than general frameworks can.
What are the main features and what are future enhancements?
I’ve tried to pick cool features that perhaps some other clients don’t have, but this is a work in progress…
- Connect to multiple servers/channels
- Activity on blurred tabs shows up by tab turning yellow
- If the mibbit.com window/tab doesn’t have focus, it flashes “people said stuff” to notify you something happened
- Tab completion on nicknames
- Parsing of smilies, nicknames, urls, mIRC color codes
- Full utf-8 support
- Typing notify – people who are currently typing, and are using mibbit (They have a green top on), turn red.
- Recent chat – If you join a channel, which is currently joined by a fellow mibbit user, you’ll get a little recent chat from that channel to give you some idea of what’s going on (This is one of the features that would be hard to add to a desktop client – leveraging from the fact mibbit is centralized – same with the typing notifies which do not go over irc connections)
- Input history – up down arrows
- Runs an ident server and communicates the browsers IP address to the IRC server so that individuals can still be identified uniquely
In terms of future enhancements, I’d like to make everything fully customizable – people have very different opinions of what is nice (smilies/not smilies etc). Also more features that leverage off the fact that it is centralized, building on top of chat networks to add extra features such as the typing notify/recent chat.
Is this an OSS project? Can others help?
At the moment it is not open source. The idea is to first enable publishers to embed a client in their websites. This varies from embedding the whole client, or a specific channel, or a PM. For instance you could use it to have a link saying [PM me on irc] and that would open a new window with a chat pane in it PMing you on a given irc server. Or you could embed a specific channel in an iframe on your site. The next stage would be to allow further integration with an open API, customization etc.
Posted by Rey Bango at 6:46 am