JAX London 2014: A retrospective
Soaring like crazy?

Taking WildFly 8 for a test drive

BernhardLwenstein
wildfly

The final version of WildFly 8 has officially dropped – Bernhard Löwenstein analyses all the key features and explains what’s new.

The final version of WildFly 8 is available for download as of today. This article gives an overview of the key features and changes to the open-source Java enterprise application server.

To resolve confusion over all the JBoss names flying around, Red Hat put the version 7 title, “JBoss Application Server”, out to pasture, and, after consulting the community, arrived on the name “WildFly” for future releases.

The final version of Wildfly 8 is now available – however, even before this point was reached, the first release candidate had officially passed the Java EE 7 compatibility test. The only releases to achieve this previously were the reference implementations of GlassFish Server Open Source Edition 4.0 and TMAX JEUS 8.

Now that Oracle has severed commercial support for GlassFish and will only be backing its WebLogic Server, going forward, WildFly 8 is currently the only fully supported fully profile compliant Java EE 7 open-source application server with a concrete roadmap.

Undertow

A feature that really stands out in this new release is newly integrated web server Undertow, which was a Tomcat Fork in previous versions. This relatively fresh project from the JBoss community aims to produce a particularly high-performing and scalable web server. It’s likely this ambitious goal has already been attained: Even with more than one million concurrent connections, the system operates in a way which is more than performant.

All this is made possible mainly by exploiting the functionalities provided by the NIO interface. The web server supports blocking and non-blocking handlers, traditional and asynchronous servlets, and WebSocket handler.

Additionally, Undertow is very well adapted to individual challenges, which, among other things, demonstrates that you can integrate your own protocols. Furthermore, it can be quite efficient to use compared to a non-blocking reverse proxy Web server. Embedded operation is also possible. For this, one must only embed a JAR library of roughly 1MB. During runtime, a simple instance only consumes around 4 MB heap space. As a  demonstration of the lightness of Undertow, these facts speak for themselves.

Reduction of Ports

By exploiting the possibilities offered by the HTTP upgrade, the number of ports in WildFly 8 could be reduced  to two, so that there is now only one HTTP port for management concerns (default: 9990) and one for application concerns (default: 8080). This is of course a great advantage, especially in cloud environments, as there are often hundreds of instances running in parallel on a single server.

Access Control and Patching

Access control for server administration has also been introduced to WildFly 8. Previously, each administrator had universal rights and could view and modify the entire configuration of the server. Now, rights can be moderated and appropriate restrictions can be put in place. You can assign to users or groups specific management roles that determine the extent to which the server is visible and configurable.

A distinction is made here between monitor, operator, maintainer, deployer, auditor, administrator and superuser. Someone with a monitor role can see only non-critical runtime information, and a superuser has, as with JBoss AS7, the same rights as an administrator. There are various optional levels of control in between.

Another interesting innovation to report on is patching. It has recently been made possible to introduce modules and binary files into an existing installation of the application server using the WildFly management protocol remotely.

Fit for Java EE 7

In addition to the previously described features and changes that relate to the application server itself, there are many that are also attributable to WildFly 8’s Java EE 7 support. I want to pick out the most important ones.

In June 2013, Oracle released the official Java-Edition of the standardized client-API for accessing RESTful Web Services. WildFly 8 comes with RESTEasy – a JAX-RS implementation you can use at home. This was already included in the 7 version.

The newly added WebSocket technology allows the direct exchange of text, binary, and control messages between a web client and its associated web server – in both directions. In recent years various solutions for this have emerged, however, from a technical point of view, these were only auxiliary solutions.

Unlike previous solutions, Java EE 7 now provides for such concerns with WebSockets – a standardized technology that organizations can use as an elegant and scalable programming solution.

For JSON, the platform now has a new API. It allows for the construction of JSON objects using builder pattern and processing by eventdriven streaming API or Object Model API. The feature of JSON Binding, however, was deferred to Java EE 8.

For the first time in over a decade, JMS has undergone a facelift. For sending a message, you’ll now find that a single line of code suffices – provided you can inject the required JMS objects from the container. In addition, there are extensions in terms of parallel processing. An executor service is also available now in the enterprise environment  which processes the tasks that are passed to it by utilizing the available system resources.

Finally, new technology for the processing of mass data (without user interaction) should be mentioned. The individual steps for batch jobs are in this case defined in XML form. Each step executes according to the familiar batch Pattern – i.e. reading, editing and writing a specific task. WildFly 8 is now ready with all the aforementioned features. There are also many other minor adjustments and additions, but there’s not room to cover them all here.

Conclusion

In contrast to the extensive architectural changes in versions spanning from 6 to 7, WildFly 8 follows the set JBoss AS7 pattern.  Although the Red Hat Application Server now flies under a new banner, it’s merely a further development to the very successful 7 Series version, rather than being an all-out reimplementation.

The biggest change is certainly the replacement of the existing Web server. Developers are already reporting successful results from initial tests now that Undertow is in place. Furthermore, the reduction to two HTTP ports, the introduction of management roles to assign to the server, the fact that administrators can tailor rights, and integration with a patching infrastructure are all positive changes. WildFly 8 is a great fit for Java EE – this project can be considered very successful.

This is a translation of an article which was originally published in German on JAXenter.de

Author

BernhardLwenstein

All Posts by BernhardLwenstein

Comments
comments powered by Disqus