Feeds

Java EE clustering

Muster for the cluster buster

New hybrid storage solutions

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

Reducing the cost and complexity of web vulnerability management

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
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?
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.