Help

The short answer is that it is designed around Ahmdahl's law (effective parallelization of work) as opposed to Moore's law (waiting for hardware with a faster clock rate). Almost every CPU powering desktops, laptops, and servers is now at least dual core, and the trend is rapidly expanding. The days of the frequency race are essentially over. So, now software must adapt to tap into the power of the hardware of today and tomorrow.

JBoss AS underwent an aggressive transformation to achieve this critical evolution. With AS 7 we started from scratch and built an entirely new, highly performant, and manageable core architecture from the ground up. With some truly amazing engineering effort we were able to go from a tiny prototype on github, to the full blown Java EE Web Profile compliant container of today in a little over a year (not to mention that during all of this we also delivered AS 6 which allowed JBoss users early access EE6 technology).

Before explaining, allow me to provide some background. The core problem an application server is tasked with is managing services. Nearly all components in a modern application have some kind of life-cycle, meaning that there is some point at which it must be started, and some later point at which it must be stopped. We label anything that has a life-cycle a service. Another important property of a service is that they typically have relationships that impact their respective life-cycles. As an example, we might say that a servlet's service depends on a web server. In addition we would probably say that if that servlet uses some other resource like a database connection or an EJB that it depends on those being being available as well. When an application server starts or deploys it must make sure that it starts all of the various services in the correct order. Further if any of these services are somehow stopped, it must stop all dependents first (essentially reverse order). This is a fairly simple problem when this is done in a single thread.

JBoss AS 7 on the other hand starts and deploys all services in parallel. This complex problem is solved by our new service container, the JBoss Modular Service Container. 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 the relationship requirements. This means that not only is startup blazing fast, but you also now can deploy multiple deployments in parallel.

In addition to parallel services, JBoss AS 7 also has modularity and concurrent class loading. By segmenting classes into proper modules, the app server can naturally optimize access patterns, and only look in the spot that truly owns the classes. Also, since the visibility between modules is intentionally limited, searching is cheap. In the case of JBoss Modules, module resolution and class lookup are O(1). All of this has a very high degree of concurrency, even a significant portion of class definition.

Deployment processing is also very efficient. One major optimization is that we index annotation information by quickly scanning a subset of the class file data. For even greater efficiency we allow modules the ability to pregenerate a space efficient index which is designed to be loaded very quickly. Yet another deployment optimization is that we carefully cache and reuse reflection data, since the JVM is not very efficient at doing so.

Finally the last major reason I wanted to highlight is that we have and will continue to be very militant about our CPU and memory usage on the start and deploy path. This is all about making good choices starting at the design phase. An interesting example is our moratorium on using JAXB (or any other introspection driven binder) to parse configuration that is only read once. It ends up spending the same or more time figuring out how to parse than it does doing the actual parsing. This adds up. In fact, just the XML processing in AS 5 and 6 took longer than the entire 7 boot time.

Hopefully this provides a better picture as to how we made the efficiency gains, and why some things are very different in 7 than in the past. This, however, is just the beginning. Stay tuned for my next blog which will talk about the overall 7 roadmap.

Thanks!

14 comments:
 
25. Jul 2011, 20:27 CET | Link

Great article Jason, thanks for the insight.

 

Author of Seam Catch

ReplyQuote
 
26. Jul 2011, 05:17 CET | Link
Kevin
All of this sounds fantastic but it sounds mostly like it speeds up start up and deployment. What about application performance, especially related to concurrent users.. can it handle more users at the same time making servlet requests? Can the EJB @Asyncronous handle more threads than say GlassFish? We've been talking about switching to JBoss 7, and this may be reason enough, but I am interested in seeing some sort of benchmarks with say 1000's of simulated users compared to GlassFish, Tomcat, Resin, Jetty... that would be great.
27. Jul 2011, 07:41 CET | Link
Philippe Marschall
Where can I find more information about this per module annotation index?
 
27. Jul 2011, 08:49 CET | Link
Kevin wrote on Jul 25, 2011 23:17:
All of this sounds fantastic but it sounds mostly like it speeds up start up and deployment. What about application performance, especially related to concurrent users.. can it handle more users at the same time making servlet requests? Can the EJB @Asyncronous handle more threads than say GlassFish? We've been talking about switching to JBoss 7, and this may be reason enough, but I am interested in seeing some sort of benchmarks with say 1000's of simulated users compared to GlassFish, Tomcat, Resin, Jetty... that would be great.

We have made a number of runtime perf improvements over past AS releases, but no benchmark results to share yet (other than hornetq http://planet.jboss.org/post/82millionmessagessecondwithspecjms). After 7.1, which will offer the EE full profile, we will have some more data for you.

27. Jul 2011, 09:02 CET | Link
Philippe Marschall wrote on Jul 27, 2011 01:41:
Where can I find more information about this per module annotation index?

Take a look at the jandex project: https://github.com/jbossas/jandex

and this: https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7

31. Jul 2011, 07:18 CET | Link
Kevin
Hey Jason,

This looks very promising. When is 7.1 coming out?

I am a little concerned with regards to the new classloading though. Are there any issues with using custom classloaders in my application code? For example, I have a JEE6 deployed app that takes advantage of the @Asynchronous EJB thread handling of method invocations, so that I can return immediately for long running processes and later my methods send a status update. But, the ejb method itself uses a custom loaded "plugin" class found at deployment time and loaded at that point. I break the normal delegation model to make sure the .zip file a plugin resides in can also include a lib/ folder for dependent jar files it uses in its code. So my custom classloader first searched in the lib/ and classes/ folders within the zip file, then delegate to parent loaders if a class is not found. Is this going to be a problem or need special coding to make work within Jboss AS 7+?

02. Aug 2011, 04:18 CET | Link
Kevin wrote on Jul 31, 2011 01:18:
Hey Jason, This looks very promising. When is 7.1 coming out?

Current plan is late November/

I am a little concerned with regards to the new classloading though. Are there any issues with using custom classloaders in my application code? For example, I have a JEE6 deployed app that takes advantage of the @Asynchronous EJB thread handling of method invocations, so that I can return immediately for long running processes and later my methods send a status update. But, the ejb method itself uses a custom loaded plugin class found at deployment time and loaded at that point. I break the normal delegation model to make sure the .zip file a plugin resides in can also include a lib/ folder for dependent jar files it uses in its code. So my custom classloader first searched in the lib/ and classes/ folders within the zip file, then delegate to parent loaders if a class is not found. Is this going to be a problem or need special coding to make work within Jboss AS 7?

I can't see a reason why that wouldn't work. Although it sounds like you basically wrote a home grown module system. You might find that our module system also fits your needs, or serves as a foundation for a custom approach.

 
13. Apr 2012, 13:55 CET | Link
Tair | ts(AT)bee.kz

Thanks Jason! Translated your post into Russian: http://habrahabr.ru/post/142028/

29. Oct 2014, 07:50 CET | Link

Best Software Testing Training in Chennai,

softwaretestingtraining
 
01. Nov 2014, 17:13 CET | Link

Jason you have done a great jobs,is it your personel efforts or you have taken help from other freinds visit this site

 
10. Nov 2014, 14:52 CET | Link
thanks

Filmmaker Ravine Change , Datascrip said Reedlike soul sophistication and hybrid ink method printer, gives author evaluate for its users to play the situation illustrator wild and sensual , if you need the driver printer, you can check at Download driver printer They all go together with Epsons built piezo-electric subject proverbial as PrecisionCore that, per the companys spokespersons, doubles photograph grade whereas doubling if you need the driver printer, you can check at free printer drivers From the leaked it , mentioned the Samsung Collection Set 2 performed with sib SIM , 4.5 in. WVGA direct ( 480x800 pixels ) and a quad-core processor 1.2 GHz , quicker than their predecessors that the if you need the gadgets info, you can check at smartphone specifications Request the exclusive angle , not notable manifestly his sincere write , yet by worldcarfans , weekday ( seventeen / 04 ) , if you need the last info about car automotive, you can check at car photos Canon Pixma Mp560 Driver For Windows, Mac OS X, and Linux Download, but let me to review the printer first. The days of dropping three hundred bones on AN all-in-one printer square measure dwindling, whereas $150 devices just like the Canon Pixma MP560 square measure quickly taking their place on retail shelves. The MP560 appearance nice ANd offers helpful options like an auto-document if you need the last info update about technology, you can check at tips twitter To any raise human publication caliber, PIXMA MG7570 adopts a 6-color mortal ink scheme with the element of achromatic ink tank to spicery up the vesture sound in B W someone printing, understandably sharing the hatched and shining if you need more info about geophysics, you can check at Download driver printer

 
17. Nov 2014, 11:37 CET | Link

It's a decent application server begins with a base memory prerequisite. This utility has been supplanted by a more advanced interface named the Command Line Interface. The vast majority of the individuals have no clue why it runs so quick. Be that as it may i must admire you for your magnificent clarification. When i have perused an article with respect to this which was composed by essaytigers.

 
23. Nov 2014, 13:11 CET | Link

review samsungClick HELP for text formatting instructions. Then edit this text and check the preview.

New Auto 2000

Sharing IT

Download Driver Printer

Download Driver Free

Post Comment