Tutorial Thursday

7 Reasons to love JBoss AS7 - Part 2


1) Lightning fast

Fast, fast, fast. #@*%ing fast! No doubt, that’s the main reason to love JBoss Application Server 7. This release dispels a long-standing misconception that a Java EE application server is inherently slow. (Don’t worry, we checked and “slow” is not a requirement of the specification.)

JBoss Application Server 7 boasts a startup time that’s an order of magnitude (10x) quicker than previous versions, thanks to a highly optimized, parallel boot process. This speedy startup earned it the code name “Lightening.” A modern developer workstation using a tuned JVM can boot the server in as little as one second!* (A three second startup time is an indication that your machine is outdated). Join the competition if you’ve found a way to boot it faster. Not only does this startup time shatter the competition, it even gives Tomcat and Jetty a run for their money. When comparing JBoss Application Server 7 to Servlet containers, consider how much additional, yet essential, functionality you are getting out of the box, at a marginal cost. The benefits don’t end once the server starts. The deployment process has also received a speed boost. Small applications launch almost instantaneously, and medium to large applications can be deployed or restarted in seconds.

You may be wondering, “Why is it so fast?” The short answer is that JBoss Application Server 7 designed around Ahmdahl’s law (effective parallelization of work) as opposed to Moore’s law (a linear increase in clock speed over time). Almost every CPU inside desktops, laptops, and servers is now at least dual core, and the trend is rapidly expanding. It’s time to take advantage of it. Let’s briefly consider how.

Application servers are tasked with a core problem – managing services. Nearly all components in a modern application have some kind of life cycle, meaning there is some point at which the service must be started, and a later point at which it must be stopped. JBoss Application Server 7 starts and de- ploys all services in parallel and keeps non-critical services on ice until needed. The complex problem of managing these life cycles is solved by the new Modular Service Container (MSC). MSC is essentially an advanced concurrent state machine. It analyzes the dependencies between all services on the fly and attempts to start as many as it can at the same time, while still adhering to relationship requirements. This means that not only is startup lightening fast, you can also deploy multiple applications in parallel too. To complement parallel services, JBoss Application Server 7 also has modularity and concurrent classloading, which we’ll cover later.

Processing an individual deployment is also very efficient. A key optimization in JBoss Application Server 7 is indexing annotation information by quickly scanning a subset of the class file data. For even greater efficiency, it allows modules the ability to pregenerate a space efficient index which is designed to be loaded very quickly. Yet another deployment optimization is carefully caching and reusing reflection data, since the JVM is not very efficient at doing so. With these optimizations, you can expect that Application Server 7 will not get slower over time, no matter how many deployment cycles you throw at it.

The highly optimized startup and deployment processes saves unnecessary trips to the water cooler, which keeps you in the zone. It also has a very small memory footprint, which leaves more headroom for your application and avoids slowing down other running programs.


Dan Allen
Dan Allen

What do you think?

JAX Magazine - 2014 - 06 Exclucively for iPad users JAX Magazine on Android


Latest opinions