DebConf10 Talk "A battle cry for a system level JVM in Debian" by Pablo Duboue
Channel: Pablo Duboue
Date: 2015-01-26

If you are running an ant build, trying to get it right, how many times do the Java API methods Just-in-Time compile from Java bytecodes into machine code? For every invocation of /usr/bin/ant, a JVM is spanned and relevant methods are compiled. This is a clear waste of work. Moreover, just-in-time compilation is one of the main reasons of Java perceived sluggishness. As Java is enjoying a sort of renaissance in the Free Software world after the release of OpenJDK, we can expect more and more times our system will be just-in-time compiling yet another copy of java.util.regexp.Pattern.

A better solution would be to have system-wide JVM where well behaved (also known as "Debian packaged") programs and libraries can co-exist.

Luckily, researchers at Sun Research Labs were working five years ago in project Barcelona [1] (now concluded) which produced a research prototype of a system level JVM (they call this a Multi-tasking Virtual Machine or MVM for lack of a more confusing name) to address this very issue.

Their approach resulted in JSR 121 (isolates) [2] for JVM extensions allowing multiple Java applications (classes with a public static void main) to be executed concurrently in the same JVM.

Implementing JSR 121 inside OpenJDK is clearly outside the scope of Debian but even in the presence of a JVM with isolation capabilities, there is plenty of system-specific work that needs to be tackled (what happens with /usr/bin/java? it is really system-wide or user-specific? how "well behaved" do the applications need to be?).

In this talk, we will summarize relevant bits of project Barcelona's ample list of publications and focus on simple, JSR 121-alike simulations to show what can we expect from having this technology incorporated into Debian.

http://penta.debconf.org/dc10_schedule/events/583.en.html