7 ms·
A brief guide to the IRC protocol
- Mpdreamz 16y agoNice never thought i'd get to mIRC.net, a site i am an admin on, through hackernews. There are several great RAW tutorials on mirc.net and mircscripts.org and in fact theraw section this blog post links too is an excellent reference point for all network deviations of the RFC's.
- bluesmoon 16y agogood work. if only I'd had something like this when working on the IRC module for ayttm.
- thwarted 16y agoAgreed. I spent way too much time reading old mailing lists and server and client specific docs when trying to understand the protocol (not any specific software that used it) while writing nodebot (http://github.com/thwarted/nodebot http://github.com/thwarted/nodebot). RFC1459 is seriously lacking in real-world use, explanation of terms, and general robustness, despite that it was written to document a defacto protocol. On the other hand, you do see a lot of the organic evolution of a protocol in what is IRC, which is valuable from both an historical and educational perspective.
- Macha 16y agoI agree about the problems with the specs. For the most part, the best way to find out how a lot of the stuff worked was just to telnet a few IRC servers. For example, the thing about some servers needing a ping after user? Not mentioned in any spec, discovered while using a specific IRC network via telnet.
- paolomaffei 16y agoI recall I loved IRC so much when I was young I learned all the protocol even if I didn't want to actually use it.
- phpnode 16y agoI was one of a million other teenagers who learnt it trying to write an IRC client in VB5/6.
- _delirium 16y agoI think my first introduction to "Turing tar-pit" style programming was trying to write an IRC client in mIRC script, which even sorta worked.
- phpnode 16y agoI did that too, before mIRC supported multiple servers, I loved mIRC script, now, not so much
- Zev 16y agoI suppose that makes me one of the smaller handful of people who's learned the IRC protocol while making an iPhone app (Mobile Colloquy). And I even liked it so much that I then had to go and do some work on a second implementation of it (for Justin.tv's app)!
- cagenut 16y agoI've often wondered how well an ircd would scale as a twitter clone. Following someone would just joining a channel that only they could write to. I wonder how many clients are connected and receiving realtime messages during peak usage on say efnet. edit: sorry I clearly phrased this poorly, I said "an ircd" but in my brain I was thinking of an ircd network like efnet, freenode, etc.
- deleted 16y ago[deleted]
- ig1 16y agoNot that many, even the big IRC networks only run at around 65-85k simultaneous users. The netsplit website has been doing IRC analytics since '98: http://irc.netsplit.de/networks/top100.php http://irc.netsplit.de/networks/top100.php
- unwind 16y agoI might be naive, but to me "connected" to an IRC server implies having an open TCP/IP connection. That means that the server will run out of ports at roughly 65,000 clients. Of course, you could probably solve that by load-balancing, having multiple parallel ircd instances that share the backend, but then you're not having "an ircd" any longer.
- hackermom 16y agoNo, the server is only using a single port - the one it's listening to. It's also already standard to run multiple, local relays per server instance in the case of IRCds. Many servers run multiple instances that together span 3 or 4 ports; 6667, 6668, 6669 etc.
- dfox 16y agoHaving multiple instances of ircd is the main point of IRC protocol, that is what the R (as in Relay) stands for.
- wmf 16y ago
- tvon 16y agoSo, any speculation as to why jabber never replaced (or even really contended with) irc for developer chats?
- dfox 16y agoIRC client running in background is non-obtrusive, while Jabber is primarily intended for IM, which means frequent distractions. I know many developers who do not use any kind of IM, while they frequently chat on IRC.
- tvon 16y agoThere is nothing about Jabber group chat that requires any frequent distractions, and group chat Jabber apps I have used seem to behave somewhat identically to irc clients (granted, this was ~4 years ago).
- HerraBRE 16y agoYes, but the Jabber group chat implementation is actually half-assed at the protocol level. IRC actually does a much better job and has much better features for managing large group conversations.
- deleted 16y ago[deleted]
- Macha 16y agoAlong with dfox's reasons, IRC is also mainly intended for group conversations, while Jabber seems to mostly concern itself with one on one conversations. While both can do the other's task, it's not as pleasant an experience. The issue of critical mass also plays a part. IRC has been around longer, so developers are used to going to IRC rooms for chats. When they start their own projects, they use IRC because it's what they are familiar with. Then there is the fact that in the IRC chat, there are usually devs and users in the one room, and if someone asks a technical question, it's quite likely that there is a user in there who can answer the question, saving the dev work. Finally, there is another advantage of IRC: It doesn't need registration. Anyone can hop on, without going through an account creation process.
- hackermom 16y agoA truly wonky and stupid protocol that could've been done so much better. Good grief. And I say this not just being a permanent IRC resident since over 10 years, but having written both an IRC client and a bot-of-sorts.
- points 16y agoSame with many of the protocols that have taken off. Look at HTTP - it's an abysmal wasteful stupid protocol, but it kinda works well enough.
- JoeAltmaier 16y agoPretty much as soon as an implementation takes off, that becomes the de-facto spec, and it mutates from there.
- rogerclark 16y agoIt was easy for us to say this 15 years ago when a super-compact binary protocol just seemed to make oh so much sense, but now I'm not so sure. The IRC protocol does exactly what it sets out to do, and there isn't really much over-the-wire overhead for client connections. The only information that's repeated unnecessarily is user hostmask data; everything else is mostly 100% useful. It could really have only been a bit better if each event was described in a JSON- or YAML-like notation, but this was 1988, not 2008. Compared to tons of other legacy protocols in use today (FTP!?), IRC isn't all that bad.
- hga 16y agoWell ... FTP was very early, RFC 114 in 1971 going by the titles (http://tools.ietf.org/rfc/ http://tools.ietf.org/rfc/) and only coming after (at that level) a logger protocol (had to do with setting up terminal service), terminal services and RJE. But, yes, anyone who complains about a new boziod protocol should be forced to look at the wonders and horrors of FTP, especially in the context of NATs.
- joezydeco 16y ago
- akl 16y agoI have IRC to thank for learning a lot about basic client/server communications and networking back in my early teens. Certainly not the best protocol ever invented, but I have fond memories of figuring out how it worked.
- jpablo 16y agoIs there any developer that didn't developed and IRC bot or client in their youth ? I know I did it. It's a great learning experience in network programming. And one you can brag to your friends in #whatever.