Logo

The History of GNUMP3d

After receiving a few emails from interested individuals I've decided to document the history of this server here.

I've had a large MP3 collection for a few years now which I've ripped from my large CD collection.

(Nowadays I prefer to encode my songs as OGG Vorbis files - but I'd guess my archive is 50/50 at the moment).

Introducing Edna

Once I'd setup my home network (three GNU/Linux machines) I wanted a simple solution for streaming them from a central location. After looking around for a while I came across Edna which is a small media server written in Python.

Edna sufficed my needs for a very long time. Although it appears that all practical development has ceased it serves it's purpose extremely well.

Edna's deficiencies

After a few months use I found that I was missing several things which would have made the server a lot nicer - Such as the ability to search the archive, and view statistics.

Unfortunately my Python knowledge is minimal. I hacked around with a for a little while but then decided to recode the server in Perl, I did this because it seemed sensible to move from one scripting language to another.

The Perl Server

The perl server whas quite honestly a mess. I only used it for a short while before thinking of recoding it in C.

This was mostly due to me attempting to rewrite the Python code in Perl, something that was a mistake; picking a more appropriate design would probably have resulted in a great server right from the start.

The C server

As an excuse to play with writing a server in C with threading support I began to recode the server one rainy weekend. Although it wasn't very complete, in 2 days I'd managed to build a nice simple server which did the basic listing and streaming of MP3's. This sufficed my needs for a short while.

The C code was released to Freshmeat.net on the following Monday.

I received around 20 emails that week from users who liked it. To my intense suprise I actually started to recieve patches for various things too.

Like many other developers I'd released software before but this was the first time I'd received patches from multiple users in such a short amount of time. (I put this down to the fact that there aren't many simple streaming servers, and the server has the magic three letters 'MP3' in its name ;).

Development continued with regular bugfix releases and feature updates.

The Move To C++

After a few releases it became apparent that there were several problems with the codebase that weren't going to be simple to fix. (Mostly because of complications with the multi-threaded nature of the server)

The flaws in the codebase were primarily concerned with string handling and memory management. (Two areas where C is traditionaly prone to misuse and abuse).

I've previously written a lot of code in Java but I didn't want to alienate any users who were without a Java runtime environment. This meant that C++ was a natural choice for the new implementation as it led to a natural reuse of the existing code.

(Looking back on it maybe I would have been better of going for Java; it has built in support for both threading and networking - who can tell what the server would look like if I'd decided to go with Java instead?)

Migrating the code to C++ took a couple of days. Really making the code object orientated took slightly longer - but eventually it was done.

There were a few problems with the first C++ release, but they were fixed fairly quickly and know I made the correct choice in doing the re-write.

More Users

After a while I started getting curious as to how many users I had - so I started running websearches - this is when I discovered it had made it into Gentoo GNU/Linux, and the FreeBSD ports collection.

Many people were beginning to complain that the server was too hard to modify; which I thought was a shame, especially since I'd put such a lot of effort into the plugin system.

Two other problems were starting to show up:

Database support was something that originally I'd resisted - as it would increase the dependancies of the code. But with an active userbase of people with large collections of music I was coming round to the idea of supporting this.

Around this time I decided that the idea of using a scripting language with good database interoperability would be a good thing.

Perl was the obvious candidate for me, Ruby was an interesting contender but a little too new for me.

Python I'd already moved away from, and it's still a language I don't know.

The Future?

In the past I had considered the version 1 release to be feature complete; it did everything I'd ever wanted it to do. Streaming, searching, stability, and extensibility were all there.

But now with the added power of Perl tm interesting new possibilities are presenting themselfs - the ability to rate songs, and choose to listen only to songs that have been rated positively, the ability for the server to track your music and suggest similar things, both these ideas and more will be possible in the future.

After that .. who knows?

I guess it will come down to people making interesting suggestions.

GNU

I was recently contacted by RMS who asked if I intended the program to become part of the GNU Project. I hadn't considered this, despite the name of the software.

However after some discussion we both decided it would be.

This led to the migration of all the webpages from SourceForge to the hosting facilities that are provided at Savannah, and closes another chapter in the projects history.