ADC: Protocol simplicity
Wednesday, August 23, 2006 9:15:50 PM
That is a server in 500 lines of code
The ADC protocol is stabilizing and maturing, and now the implementations are popping up quickly. I've been working on QuickDC for a while now, and implementing an ADC back-end was a dream.
First of all, all messages have a consistent layout. They are completely text and line based, and thus human readable. And very easy to parse and generate.
From a server's perspective, messages should only be checked for syntax, only well formed messages should be forwarded to clients. Each message starts with a four character code (FOURCC), where the first byte determines how the server should route the message. The server can easily be extended to support messages it does not support - with precautions, of course.
Back to QuickDC, when the message handling was implemented, using QuickDC's own architecture as a file sharing client, I successfully implemented a hub in one day. It has now been running as a public service for 3 months, with only minor bug fixes done. That is a server in 500 lines of code, and that is how easy to implement this protocol is.
The latest protocol draft is here.
QuickDC is not ready for prime time yet, but in the mean time there are a few other open source implementations you can have a look at: