Imagine a bacon-wrapped Ferrari. Still not better than our free technical reports.

The Ultimate Java Web Frameworks Comparison: Spring MVC, Grails, Vaadin, GWT, Wicket, Play, Struts and JSF

6. Throughput/Scalability

What you choose in development will need to be supported in production. Throughput and scaling are very important factors as you don’t want to bottleneck your application because of a framework decision. This category takes a look at what each framework has to offer to help you application when there are more users and requests than lines of code!

Spring MVC

Spring applications are meant to scale as Spring is used in large-scale applications worldwide. It contains necessary components for parallel processing and solutions like EhCache can be attached easily to scale memory. Spring Batch enables to build multi-threaded apps, partition applications and do bulk processing.

Spring apps can be modularized and different modules can be set up on different hosts. These components can talk with each other using JMS (Java Message Service) for example.

Score: 4/5 — There is wide variety of options how to scale apps using in-memory caching or dividing applications into different parts and connecting them with messaging.


Grails

Grails is an abstraction over Spring and Hibernate. Are those two scalable? Yes. Will this extra layer negatively impact the throughput? Unlikely, it’s all Java bytecode in the end. Still not sure? Read the Testimonials and Sites sections on the Grails’ website to see what kind of big and fast applications are build using Grails.

Score: 4/5 — Standing on the shoulders of giants – Spring and Hibernate.


Vaadin

As Vaadin relies so heavily on it’s GWT implementation, it leverages many of it’s positives (while trying to reduce the pitfalls). One of the advantages is the way in which GWT turns Java code into JavaScript. Why is this an advantage? Well, JavaScript runs in the browser and so as an environment scales, the server back ends don’t run all the logic, the clients take a large portion of it. Does Vaadin add any complexity to the scaling nature of GWT? We don’t believe so.

Score: 4.5/5 — Takes the scaling value from GWT and doesn’t add any additional scaling complexity.


GWT

If GWT was created for one thing, it was created for scalability. GWT code looks similar to many other standard toolkit APIs but with asynchronous calls (though a Remote Procedure Call infrastructure is provided to make it feel like standard event processing). The included compiler is what makes GWT stand out.

The Java to JavaScript compiler hides browser differences so you can focus on the actual code without worrying about adapting to different browsers and browser versions; it analyzes your source for unreachable code and removes it; and it eliminates method call overhead by inlining code. So, whether you have a small app or a big app, GWT will analyze and compress the returned JavaScript to be as efficient as possible no matter what browser you’re using.

Score: 4.5/5 — GWT’s included compiler that converts Java to JavaScript is magic for efficiency and scalability.  


Wicket

Wicket comes up a little short on the scalability front. Because it is a server-side framework, building the resulting page to be rendered to the user is done on the server and will thus consume server resources. It may not be the best option for applications where throughput is a top priority. However, it does have great AJAX support so Wicket could be used to render the initial page skeleton and have the rest of the communication with the server done via AJAX requests. Just make sure you configure your components to use AJAX if possible.

Score: 3/5 — Wicket works well for scalability if that is your goal when developing the foundation; otherwise, you’re better off using another framework that doesn’t have such a huge server resource consumption problem.


Play

Play is incredibly scalable with high throughput. When coupled with the native integration for Akka actors, Play enables ridiculously performant asynchronous applications ready your Big Data needs. The notion of Future really enables Play to deliver on the promise of high concurrency and large datasets. Built in JSON support assists with integrating into other web services, enabling your code to be more modularized. Even Netty is non-blocking, which should cut down on useless waiting.

Score: 5/5 — Play uses Akka actors to be incredibly scalable and allow for high throughput. It does require learning how to use Akka.


Struts

Similarly to Wicket, Struts is a fully server-side framework. If you need more power for rendering the pages, then adding more servers to your cluster should be the answer. Luckily, Struts-jQuery AJAX plugin can make things a bit more asynchronous.

Score: 3/5 — No extra features that would improve scalability, other than AJAX support.


JSF

JSF applications can be performant, but really the performance gains come from clustering Java EE application servers. JSF itself does not provide explicit support for asynchronous calls, and relies on the Java EE specification to provide @Asynchronous and @Schedule annotations on the business logic EJBs.

Score: 4/5 — JSF provides annotations that are useful for job management with asynchronous calls.

web-frameworks-throughput-scalability

Framework Score

Play

5

Vaadin

4.5

GWT

4.5

Spring MVC

4

Grails

4

JSF

4

Wicket

3

Struts

3

What if you no longer had to redeploy your Java code to see changes? The choice is yours. In just a few clicks you can Say Goodbye to Java Redeploys forever.

DOWNLOAD THE PDF