Feeds

Java EE clustering

Muster for the cluster buster

Choosing a cloud hosting partner with confidence

Java EE Oriented Clustering

As well as the use of load balancers/dispatchers, Java EE clustering facilities tend to be supported at three levels:

  • Web-tier via HTTPSession clustering.
  • EJB component clustering.
  • JMS Technology.

However, the Java EE specification does not incorporate explicit support for clustering technologies. Thus the support provided for each of the above can vary widely from vendor to vendor. Java EE compliant applications can also be written that may or may not be clusterable. This can result in the following issues affecting a Java EE application when it is to be used within a clustered environment:

  • Applications built on a stand-alone Java EE server may not run in a clustered environment. This may be due to un-intended dependencies or associations between one tier and another which remain unnoticed until the application is clustered.
  • Applications may run within a cluster, but run far more slowly than without clustering - this may be due to the amount of state information that must be replicated etc.
  • Applications may run in one vendor’s clustered environment but not another. This may be due to restrictions imposed by, or support features provided by, one or another vendor.

This last issue relates to the fact that different server vendors may offer different clustering policies, different failover policies and different approaches to the level of failover supported. They may also provide vastly different default optimizations that may allow implementations to work (e.g. utilizing local interfaces if the Web tier and the EJB tier are run within the same JVM).

Developing an application to execute within a cluster is not a trivial matter, and should be taken into account form the ground up when the system is being designed. For example, there are several design patterns which are used extensively within the Java world, that can if implemented inappropriately, cause problems within a clustered environment. For example:

Object Caches Object caches are often used to improve the performance of Java applications. However, most cache implementations assume that the application part using the cache is in the same JVM as the cache itself. If the application runs in two or more JVMs the cache may at best become less useful and at worst may cause system failures.

Static variables Static variables are often used with a number of different design patterns, such as factory and singleton. Again, this approach may assume that all objects using the static singleton use the same singleton object in the same JVM. However, in a clustered environment, various parts of the application may run in different JVMs.

Event based services Event based services may be services triggered due to some situation occurring, such as a timer being triggered, or something happening within the application. In many cases such event-based services rely on the fact that they are running within a single JVM for effective operation.

Summary

Java EE clusters are a very effective way of providing for high availability of Java systems, however clustering should be taken into account from day one and incorporated into the design of the system. This means that issues such as whether the system should be co-located or not, whether servers should be homogeneous of not, and ensuring that the design does not preclude clustering techniques should all be considered as part of the basic analysis of the system. ®

Secure remote control for conventional and virtual desktops

More from The Register

next story
ONE MILLION people already running Windows 10
A third of them are doing it in VMs, but early feedback focuses on frippery
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Sway: Microsoft's new Office app doesn't have an Undo function
Content aggregation, meet the workplace ... oh
Sign off my IT project or I’ll PHONE your MUM
Honestly, it’s a piece of piss
Do Moan! MONSTER 6-day EMAIL OUTAGE hits Domain Monster
Customers freaked out by frightful service
Return of the Jedi – Apache reclaims web server crown
.london, .hamburg and .公司 - that's .com in Chinese - storm the web server charts
NetWare sales revive in China thanks to that man Snowden
If it ain't Microsoft, it's in fashion behind the Great Firewall
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Win a year’s supply of chocolate
There is no techie angle to this competition so we're not going to pretend there is, but everyone loves chocolate so who cares.
Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.