Pure Danger Tech


navigation
home

The Garthe JVM

09 Oct 2007

I was reading Mike’s post on how to illustrate the problem with using non-volatile shared state in Java. It reminded me of college where I once had to implement the TCP protocol in C based on a UDP layer and then an FTP app on top of the TCP layer. Since UDP can drop packets, reorder, duplicate, etc you have to deal with all that in the TCP code. Man, I wrote some horrifyingly bad code for that project. It even almost worked!

Anyhow, when the teaching assistants tested it, they inserted an evil UDP layer that would actively drop, reorder, and duplicate UDP packets. We really need the equivalent for the JVM – something that actively reorders your bytecode, does weird thread scheduling, doesn’t update shared memory, etc but stays within JMM constraints. If only Java was open source…. :)

I propose we call this the Garthe JVM in honor of Garthe Knight, the evil twin brother of Michael Knight (both played by David Hasselhoff) on Knight Rider. [Straying increasingly far from the topic, you might also recall that Garth drove KARR, an evil twin of Michael’s KITT car.]

We need Duke’s evil twin brother JVM. Lazy web, go build it! Sounds like a good student project.