MPD Music Server – A followup

So a week or so ago I posted about setting up a music server based on MPD. The whole setup has been running along for a few days now, and so far I’m impressed.

There were still some loose ends from the original install. One was getting audio streaming working properly (the initial install was just playing through my Bose Lifestyle system via a patch cable). I wanted to be able to stream audio to laptops and other computers. This required setting up Icecast – a feat not as complex as I feared. Icecast is in the Ubuntu package archives, so installing it was just a matter of “aptitude install icecast2”.

(no subject)Configuring Icecast and MPD was pretty simple as well – I followed a few references on the net, and had it running in about 10 minutes.
One of the other changes I did was moved from using Sonata to using GMPC from Qalaxy. I found it has a much better interface and is more comprehensive in it’s functionality.

The other client I installed is called ‘Pitchfork’ – a PHP + Ajax based web client. Unfortunately, it appears to have gone into abandonware mode, and it’s website is down. I found someone on #mpd on Freenode that had a copy of it, and I installed that directly. It’s a handy, decent web front end that has the added bonus of having a built in audio streamer – so you can listen to the Icecast stream directly via the browser. Nifty.

The rest of my time has been taken up importing music. I had various music archives lying around, and of course my own fairly hefty CD collection. Ripping CD’s seems to go fairly well using Grip – even so, it’s a slow process. Fortunately I can do it while doing other things – I just haul down one of my cd books, and start feeding them to the laptop. When I finish a few gigs, I copy the entire directory over to the server, and tell MPD to update.

dbs@yawl:~$ mpc stats
Artists:   1459
Albums:    2066
Songs:    25235
Play Time:    2 days, 16:12:08
Uptime:       3 days, 12:05:52
DB Updated:   Fri Nov 28 22:15:14 2008
DB Play Time: 73 days, 7:11:13

I’ve introduced the roommates to the server, and pointed out how they can listen to music stored there. Having only one audio stream is going to be a problem as more folks are interested in listening to what is stored there, but for now, being able to save and update shared playlists and switching the current music around remotely is a big enough win, I’m not going to worry about the next stages until after we move.

Modernized Maxims

From a conversation on IRC today:

“Never underestimate the bandwidth of a backpack full of USB thumb drives and a bike messenger.” -Nathan Mehl

This arose after I remarked that copying files to a pen drive and walking it over to the server is a faster way of moving a couple gig of data than uploading it over the wire.

Compiz memory leak?

Recently I’ve started working on an all-linux laptop (named ‘algol’, more on this later), and I’m enjoying using Compiz as my compositing window manager.

Unfortunately, I’ve noticed a problem with memory usage. It appears to be connected with suspending and resuming the machine (which works fine, except for this). Compiz memory usage skyrockets on restart:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
4610 dbs       20   0  848m 626m 5068 S    1 31.2  13:40.13 compiz.real  

(Yep, that’s a resident size of 626 megabytes, on a 2gig laptop. I’m a Java developer, I’m used to large memory footprints, but when your window manager outshadows the footprint of your IDE, J2EE server, and compiler by a factor of 4, something is amiss).

After a logout / login, the footprint drops to ‘sane’ :

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
14990 dbs       20   0  221m  17m 6552 S    0  0.9   0:00.98 compiz.real 

A very fast suspend / resume I just did did not make the footprint grow… I’m wondering if it has to do with big screensavers or something (since last time I restarted, it came back up running a GL screensaver). More details when I have ’em, but anyone have an idea what might be causing this? I hate having to restart my entire desktop environment when I resume.

Music Server Remote Access with MPD.

It seemed like a simple question. Consider the problem of [a], a collection of ripped music from a large CD collection, [b] a server containing said mp3’s, located on a bookshelf in the corner, [c] a very nice Bose Lifestyle 48 audio system, and [d] a couch potato like myself wanting to listen to that music, but not willing to walk over to the workstation, hook up a monitor (it’s normally headless), and play something.

There were several things I wanted under the general heading of “I want to listen to music stored on that machine,” but no clear path in sight.

So how to approach this problem?

Continue reading “Music Server Remote Access with MPD.”

OLPC G1G1 Program via Amazon is now up

For those who missed the first Give One Get One program, the OLPC group has made them available again, this time in a partnership with Amazon.com. This means laptops will be shipped and managed by Amazon, thereby avoiding all the shipping and support delays that cropped up with the first program last year

Zach has had his XO since January, and still uses it regularly, particularly for Scratch programming, and also playing on a mud. He’s going to be graduating to programming in Python soon, and this is an excellent platform this.

By the way, there’s a Fedora distribution from Redhat that sold through Amazon on an SD card. Buy the card, drop it into the XO, and it’ll boot up as a fully functional Redhat Linux box with your favorite desktop manager and other application support.

Remember, the G1G1 program is designed primarily to support the developing countries, and get more laptops into the hands of kids that need them. These laptops are by far the greenest laptops ever manufactured, with the lowest impact on the environment possible. If you’re serious about education, environmental support, and getting technology into the hands of people who want it the most, please consider the OLPC project.

Frustrating Eclipse + Ubuntu + JVM Crash

I’m spending some time setting up a new Linux environment for CONGO development – mostly because I haven’t used a Linux desktop for heavy J2EE work in quite a while, and I have a decent laptop available to run it on.

The problem is the JVM is crashing regularly on the machine. I end up with a huge crashdump file, but the gist of it is:

# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f22e44e025a, pid=31427, tid=1077770576
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b23 mixed mode linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x1f125a]

Normally the JVM under Linux is amazingly stable, so this sort of internal crash is really puzzling. I’m going to post on the Sun forums for help, but just wanted to vent a little frustration here. Grr!

UPDATE Apparently this is a known bug in the JVM that is tickled on 64 bit systems, and has been around for a while. There’s a couple workarounds posted on the bug page at bugs.sun.com

Randomness…

Misc ramblings, just have to get them out there.

  • KDE4 – Not Ready
    KDE4 is so not ready for prime time. Or maybe it’s whatever version is currently bundled with Hardy. Ick ick ick. Not stable, unuseable, bleah.

  • Struts2 – So far so good
    I’m getting into the proper mindset to go “Make that, wire it up, go.” in S2. I’m missing a good powerful JPA layer though – too late to roll Hibernate into v2.0, but I so see it in the future.

  • Laptop battery, not so good
    clipper has a dying battery. After 3.5 years, I’m not surprised, but it is sad. I’m only getting 15-20 minutes out of it now, the question is replace the battery or the laptop and the battery. Decisions decisions.

  • Scratch is still cool
    Zach is still totally emfatuated with Scratch. I watched him ‘program’ for a bit today, and he clicks and moves components around with the best of them. He even figured out how to get it to generate an error and pop up a diagnostic window (“Cool, huh? What is that?” “That’s smalltalk.” “Neat!”), etc. Ahh, my little hacker.

  • Work kicks my ass
    Tech Barbie says “Work is hard!”. It is – it’s taking up a huge portion of my brain and focus, which is something I’m not used to. I finish the day drained and wrung out, but still force myself to get code done for Congo before falling over for the night.

  • Hudson is cool
    We have a hudson install going on one our servers. It’s doing continuous integration builds and deployments. FAR better than the hacked up scripts of yor. Need a new build? *click* Build in progress!

  • Perl made tolerable
    I’m still stuck with working on perl sometimes. But if I have to go total immersion, I’ll likely use EPIC. It’s a Perl IDE plugin for Eclipse, and actually seems to work. Very tasty.

Nuff rambling. Back to the grindstone.

Mom and her MacBook




momsmac

Originally uploaded by eidolon

Mom’s mac mini has been acting up lately, throwing disk errors, refusing to boot, etc. It’s 3.5 years old, out of Apple warranty, and, well, it was time to upgrade.

After a brief discussion and a glance at Apple’s refurb listings, we picked up a Macbook. 120gig of disk space, 1gig ram, dual core 2.1gig, combo drive, the whole works – for a mere $850.

This is Mom’s first laptop, and by appearances, she seems to be taking to it just fine.

And so ends our busiest month.

So here we are on November 1st (I could tell it was a new month because of all the Mailman notices in my inbox this morning).
But there’s another reason this is an important milestone.
Whenever I make a change to CONGO, I submit it into our SVN repository. That submission generates a mail message letting other interested parties know a change has been made, and they should update their local copies.
My philosophy, and one that is the ‘unwritten rule’ for SVN usage is “Commit Early, Commit Often. The idea is that the repository should reflect the most recent version of working code, and avoids the “I have had such and such code checked out for months, and you went and changed the repository on me! Now I can’t merge my code in!” problem.
Because my pattern really hasn’t changed, I can use my commit timing to judge how busy I’ve been on a project.
Last month, October, 2008, was the busiest, and therefore (arguably) the most productive month of coding on CONGO since the project started. The congo-dev mailing list statistics show that during October there were 119 commits against he repository. The previous ‘record’ month was December, 2004.
Virtually all of this work is reflected int he progress being made in Congo V2, and I would be remiss in not giving thanks to Owen Jacobson’s help in porting Congo to a Struts / Spring model – his commits are in there too.
V2 is coming along. I’ll have something to show soon!