What's the best way to implement a distributed, clustered Java application using Spring? (Without using EJBs...)
Does anyone have a good success story to share?
Thanks
What's the best way to implement a distributed, clustered Java application using Spring? (Without using EJBs...)
Does anyone have a good success story to share?
Thanks
From searching the web and these forums, there looks to be a few ways to do clustering:
- Tangosol Coherence
- Terracotta
- Cluster4Spring
- Homebrew lookup service using a distributed cache
Coherence is commercial, and probably requires a large time (and $$$) commitment to properly evaluate.
Terracotta has a lot of buzz, but I'd like to hear from people who've actually used it successfully in production.
Cluster4Spring I've only seen recently... not sure how viable it is.
And the homebrew option, while feasible, is hack-y... (why doesn't Spring support something like this out of the box?)
Thanks,
First of all, why do you want to distribute and cluster your application?
I know that "clustering" sounds cool, but what exactly do you plan to cluster?
E.g. if you want to cluster your Web load, you will be happy with Tomcat/Resin, they both support session clustering.
I'm not talking about clustering HttpSessions.
For example, I'd like to have an 3-tier architecture, with separate (Java-based) web-tier and services-tier. Both tiers should be clustered for failover and load balancing. In the web-tier, you're right, I can use HttpSession clustering. But what is the Spring way of clustering the services tier?
What is a clustering in your mind?
..:: non compos mentis ::..
What exactly are you trying to cluster in the middle (services) tier?
Typically all Spring beans are stateless singletons, or at least thread safe singletons, so there is very little value clustering them.
Maybe a concrete use case would be useful....
Colin Yates
SpringSource - http://www.springsource.com - Spring Training, Consulting, and Support - "From the Source"
Please read http://www.springframework.org/documentation
Co-Author of Expert Spring MVC + Web Flow.
Sorry, should have been clearer. I meant cluster in the same sense that you would cluster Stateless EJBs. There is no bean state to replicate, but you have load balancing and client-failover across multiple nodes.
Checkout: http://www.javaworld.com/javaworld/j...31-spring.html
Spring makes this solution so easy and non-invasive. It is easy to replace the author's JBoss cache with ehCache or Terracotta, without changing your service pojos.
Greg L. Turnquist (@gregturn), SpringSource/VMware
Project Lead: Spring Python and author of Spring Python 1.1 and Python Testing Cookbook.
Listen to Pond Jumpers, the international podcast for open source developers.
These comments are my own personal opinions, and do not reflect those of my company.