Feeds

Java EE clustering

Muster for the cluster buster

Boost IT visibility and business value

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. ®

Boost IT visibility and business value

More from The Register

next story
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
Leaked Windows Phone 8.1 Update specs tease details of Nokia's next mobes
New screen sizes, dual SIMs, voice over LTE, and more
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Mozilla keeps its Beard, hopes anti-gay marriage troubles are now over
Plenty on new CEO's todo list – starting with Firefox's slipping grasp
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
Backing up Big Data
Solving backup challenges and “protect everything from everywhere,” as we move into the era of big data management and the adoption of BYOD.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.