Thursday, May 18, 2006

Java liberated a little

The biggest news from JavaOne this year is the little-noticed fact that Sun's Java license has been loosened up a little. The idea is to make it possible to preinstall Java on Linux distributions.

It's always struck me as extremely annoying that Java wasn't properly integrated in Linux distributions. It's not just the annoyance of clicking through license agreements, downloading and then ending up with files unmanaged by the package system. It's also the difficulties it causes for anyone wanting to distribute Java software on Linux: You can't just specify a standard distribution version as a prerequisite. This is even worse if you wanted to include a Java program in the standard distribution.

Now if Sun had been charging money for Java on Linux it would be clear why it couldn't just be in the standard Linux distributions. But Sun were giving Java away the whole time, they just weren't giving it away in a way that was usable for Linux distributions.

There are of course open source alternatives to Sun's Java. None of them are quite as bug-free or complete as Sun's version as far as I can see, and none of them come preinstalled on the distributions I've tried.

Now Red Hat (and by extension Fedora) have a history of developing GCJ, an alternative to Sun's Java tools. So they may not be interested in including Sun's Java on Fedora. But there are 3rd party RPM repositories, like ATrpms, and thanks to the wonders of Yum they are fairly easy to use. Debian probably won't use Sun's Java until it is hopefully open sourced properly, but some of the Debian-based distributions like Knoppix or Ubuntu may not be so holy.

So I guess my main question re. Java on Linux is why did it take so long

Friday, May 12, 2006

BitTorrent goes legitimate

The inventor of BitTorrent has struck a deal with Warner Bros. to distribute movies online. I'm not sure why Warner Bros. feel they need to pay Bram to use his technology, but I'm sure he's happy enough about it.

Of course, Warner Bros. are getting into P2P technology not as a way share the videoware. The new system will be fully encumbered, and apparently no cheaper than buying a DVD in the shops. The main motivation for Warner Bros. seems to be getting free bandwidth for the huge download volumes involved.

It's worth asking where this free bandwidth is coming from. After all, someone must be providing it. Unfortunately it seems that BitTorrent just distributes the cost amongst all the ISPs involved. That wouldn't be so bad, but BitTorrent doesn't make particularly good use of the bandwidth. A file in a BitTorrent download swarm ends up crossing the expensive transcontinental links multiple times because BitTorrent users are downloading from each other.

I wonder whether this is why ADSL Internet providers always give such paltry upload speeds. Here in Europe, transatlantic traffic costs the ISP real money, and the more their users make use of file sharing, the more transatlantic traffic they cause.

It was considerations like this that motivated my patch to Azureus which was later turned into a rather popular plugin by some guys I never met. In its current incarnation it displays flags to show the locations of the peers you are currently downloading to or from. (In my version you just got the 2-letter country codes, which was probably more informative, but less colorful.) In fact I think what is really needed is for the peer selection heuristics to be modified to automatically take the distance to the peers into consideration. In a lot of countries there is a free exchange point that the ISPs can use to exchange data without a volume charge. If BitTorrent preferred 1) peers on the same ISP 2) peers on the same exchange 3) peers on the same continent, it would be much more ISP-friendly, which ultimately is good for everyone. It would probably be faster too.

The Julia system addresses some of these concerns. As far as I can work out they use heuristics to determine which peers are close to each other. In fact I think this data could easily be provided by the ISPs, and it would clearly be in their interest to do so. An obvious way to do it would be by storing configuration information in the Domain Name Service database, which is provided for you by your ISP. It's not the first time that the DNS has been abused to store information unrelated to its original purpose. (I seem to remember that someone even 'uploaded' the pgp source code to the DNS back when it was export controlled, thus causing Internet name servers to circumvent the export restrictions.)

It will be interesting to see whether the deal means that P2P technologies are becoming legitimate or whether the project will just confirm the adage that the only part of Video on Demand that is missing is the demand. Given the draconian DRM restrictions planned for the project that's not unlikely. Also, last I checked, the firewall changes needed to make BitTorrent work well were a little daunting for an individual. Finding a way to simplify this would be a big step forward for P2P protocols.

Friday, May 05, 2006

International Symposium on Memory Management

I'm off to Canada in June to present my paper, Optimisitic Stack Allocation in Java-Like Languages. Funnily enough (!) we don't implement it in our own system (OSVM). One of the reasons for that is that it is actually better suited to larger devices with deep caches than to real time small devices with often no cache at all.

Since ISMM is colocated with PLDI, and since PLDI is one of the top venues in the business I'll also be going to PLDI. I'll be at PLDI mostly as a lowly spectator, though there will be a poster about our VM and the VM we are doing for the PalCom project.

Needless to say I am very much looking forward to the trip. Apart from the flying over the Atlantic part. Still, it should be comfortable enough compared with the route two acquaintances of mine took. It seems that the phrase 'sore behind' doesn't even begin to describe the experience.