A Shared Virtual Machine at Last?

Share this article

Via TheServerSide.com, an article on java.sun.com discusses Project Barcelona, Sun’s research effort to implement a Multi-Tasking Virtual Machine (MVM). If successful, Barcelona will enable multiple desktop programs or Web applications written in Java to share the same Virtual Machine (VM). To each program, it will seem like it has the VM all to itself.

Up to and including Java 2 Standard Editon (J2SE) version 1.4, each Java program launched would load a new copy of the Java runtime environment (the VM) and the core Java classes into memory. J2SE 5.0 improved this situation somewhat by sharing a single copy of the core Java classes between all loaded VMs, but the resources used by those separate VMs still add up.

Many developers hope to see Mustang (the code name for Java 6.0, currently under development) take this the rest of the way and share a single VM between all active Java applications, though it may be more realistic to expect this in Java 7.0. To make this happen without breaking a lot of existing Java apps, Sun will need to share the VM without letting the apps step on each other’s toes. That’s what Barcelona is all about.

Here’s what the article has to say about the benefit of a Multi-Tasking Virtual Machine to Java Web development with J2EE:

The Java 2 Platform, Enterprise Edition (J2EE) is similar to an operating system in that a J2EE server can host multiple applications. In practice, this is rarely done due to limitations on scalability, weak inter-application isolation, and inadequate resource management facilities in the underlying Java platform. This leads to a proliferation of server instances, each typically hosting a single application, with a consequent dramatic increase in the total memory footprint and more complex system administration. The MVM supported multiple instances of the J2EE 1.3.1 Reference Implementation through an efficient implementation of isolates, thus, substantially increasing scalability, reducing memory footprint, and server startup time when compared with the Java HotSpot Virtual Machine. This was achieved without changing server code and with no loss of performance.

Kevin YankKevin Yank
View Author

Kevin Yank is an accomplished web developer, speaker, trainer and author of Build Your Own Database Driven Website Using PHP & MySQL and Co-Author of Simply JavaScript and Everything You Know About CSS is Wrong! Kevin loves to share his wealth of knowledge and it didn't stop at books, he's also the course instructor to 3 online courses in web development. Currently Kevin is the Director of Front End Engineering at Culture Amp.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week