Dan Farino About MySpace’s Architecture
Dan Farino talks about the system architecture and the challenges faced when building a very large online community. Dan explains how a .NET product scales on hundreds of servers.
Tracking change and innovation in the enterprise software development community
Posted by Charles Humble on Sep 25, 2007 05:06 PM
At JavaOne, along with JavaFX announcement, Sun's Ethan Nicholas and Denis Gu presented a session providing some details of their work on the consumer JRE that is expected to ship during 2008. "Filthy Rich Clients" author Chet Haase followed up on this with a blog entry on the topic. Not all of the details are available yet, but it is clear that this marks a significant shift of focus within Sun towards the desktop and end user experience, with a great deal of effort going into the Windows version of the JRE in particular.
To address the initial download problem, the Windows version of the Consumer JRE will introduce the Java kernel originally planned for Java 7. This works by fetching the common, essential parts of the Java Runtime such as the Virtual Machine, garbage collector and class-loader, then downloading the other dependencies the application specifies, downloading any "class not found" classes as they are encountered, and then downloading the rest of the JRE in parallel until the entire release exists on the system. To make this work, Sun has needed to make some changes to the way the Java libraries are organized, producing a much smaller rt.jar file and then grouping the missing classes and libraries into components generally along package boundaries. The result is a significant reduction in the amount that needs to be downloaded before an application can start. Limewire, for example, comes down in under 4MB.
The reduction in the physical size of the individual files that make up the Java Runtime may reduce disk seek time a little and thereby help with cold-start up times, but Sun has an altogether more radical solution for reducing the number of times a cold start-up is required. Warm start-up, where portions of Java are already resident in the disk cache, has been reasonable in Java for some time - a typical application taking around 2-3 seconds to launch. However cold start-up can be painfully slow as the OS seeks the various bits it needs in the sometimes very large Java libraries. A common workaround for this (used by applications like QuickTime and Internet Explorer) is to launch the VM into memory on start-up. However if you're not using any Java programs it is something of a waste of RAM and may result in a perception that just installing Java makes a machine run more slowly. The alternative which Sun is pursuing for the Windows Consumer JRE, would be to keep the core Java files in the disk cache. This is done by running a background service which touches the relevant files periodically. In consequence Java applications achieve start-up times comparable to a warm start. The service has a minimal effect on the overall machine performance since, if system memory becomes short, the OS just flushes the disk cache and reclaims memory (as opposed to having to write some pages to the disk before reclaiming as it has to for applications and data in RAM). On a seriously constrained machine the service shuts itself down and leaves the system alone.
To help developers get the right version of Java onto a user's machine Sun is introducing some new JavaScript commands that allow developers to determine which versions of the JRE are installed and prompt users to get a new version if required. The current list is as follows:
So for example the script below will check if JRE 1.5 or higher is installed. If it is the applet will start, if it isn't the user will be asked to download the JRE:
<script>
deployJava.runApplet({code:"Applet.class", archive:"applet.jar", width:320, height:240}, null, “1.5”);
</script>
The script does have some limitations. Specifically it can only detect the highest installed JRE version and can only detect the family version (1.5 rather than 1.5.0_11) but will be available on all the platforms Sun supports. The Windows version of the Consumer JRE will also include browser plug-ins that can perform these functions using native code and thereby get more accurate information. This is handled in a seamless way from a developer point of view - the JavaScript functions simply delegate to the plug-in if it is available.
There are a number of other enhancements. A new Swing cross platform look and feel, Nimbus, has been developed and is covered on InfoQ here. Sun has completely re-written the installer so that it looks a great deal less intimidating than the previous version. There will be a way to access the native FileChooser if you’d rather use it than the Swing FileChooser, and Sun is also hinting that there will be new media components in the Consumer JRE, although the details are currently under wraps.
Continuous Application Performance and Transaction Analysis eKit
The Agile Business Analyst: Skills and Techniques needed for Agile
White Paper: Writing Good Use Cases
Offshore software development: Making it a success with Agile Practices
Dan Farino talks about the system architecture and the challenges faced when building a very large online community. Dan explains how a .NET product scales on hundreds of servers.
Bernd Mathiske discusses Maxine VM, Java compatibility, swapping major VM components, research areas, Object handling, code examples, optimizing compiler, snippets, bytecode generation, JNI and JIT.
Joe Armstrong speaks on various aspects of the Erlang language, presenting its roots, how it compares with other languages and why it has become popular these days.
The java double-check singleton pattern is not thread safe and can’t be fixed. In this article, Dr. Alexey Yakubovich provides an implementation of the Singleton pattern that he claims is thread-safe.
Diana and Jim talk about patterns observed in CTOs' activity. CTOs emerge as real people caring for other people in their organization, and are put under a lot of pressure and constraints.
Cloud computing feels like a tomorrow technology. Simon Thurman shows how developers can use Biztalk to create an Internet Service Bus which can be deployed locally or in the cloud.
InfoQ takes a look at the JavaFX preview build and talks to Sun Staff Engineer Joshua Marinacci about the upcoming version 1 release expected this autumn.
Jeff Sutherland, co-creator of Scrum, and Guido Schoonheim, CTO of Xebia, present an actual case of reaching hyper-productivity with a large distributed team using XP and Scrum.
No comments
Reply