Concurrency and Me

I got to play with the java.util.concurrent package today and I have to admit that after some of the lessons I’ve learned in Scala it didn’t seem nearly as scary as all these people make it out to be. Of course I suppose that part of the danger is exactly that it doesn’t seem difficult but I’m optimistic.

The reason I was playing with it at all is because I’m trying to export data from Google Sites but the current exporter was producing broken links and a lot of HTML cruft. Admittedly the cruft is most likely from the generated markup and not the export but I wanted to try and clean it up anyway. Since it was open source I pulled it down (and imported it into git from mercurial) and started hacking away.

The easiest way I could think of to do XML manipulation was to include Scala and use it’s builtin libraries but after I did that I noticed the export was ‘hanging’ so I looked at the processes and saw it was only using the main thread so I hacked in some multi-threaded support with Executors. It isn’t perfect and I broke some tests but I can export most of my data in a timely fashion now. The work I did on this is visible on github