Hi
I am considering to develop an web application with Spring and OSGi. It seems like they fit together nicely. What are the options for clustering and loadbalancing such an app and what are the pros and cons of each?
Thanks
Hi
I am considering to develop an web application with Spring and OSGi. It seems like they fit together nicely. What are the options for clustering and loadbalancing such an app and what are the pros and cons of each?
Thanks
I'm providing building blocks links for what you want, the pages will give explanations better than I could provide for you here:
Apache ServiceMix 4:
http://servicemix.apache.org/SMX4NMR/13-clustering.html
Or Fuse ESB:
http://fusesource.com/products/enterprise-servicemix/
Apache CXF:
With Distributed OSGi:
http://cxf.apache.org/distributed-osgi.html
Apache Camel:
With Jetty:
Neither OSGi nor Spring were created to solve problems such as high-availability, clustering or load-balancing. You could, of course, build a clustered and load-balanced system using Spring and OSGi, but you are probably going to need something else as well, such as a way to detect and communicate node failures and load levels.
Since you are building a web application, most likely you will be using one of the many application servers. Good AS products provide clustering for you. Some also provide load balancing. You can also achieve load balancing through a completely independent setup of your own, using Apache for example to front your main application servers.
If you are really bent on creating your own solution, I have seen JGroups being used in multiple products to provide the necessary infrastructure to build a clustering and/or load-balancing solution. Some of the distributed in-memory caching products use JGroups, for example.
Talking about distributed caches, products such as Ehcache can help with scaling and load-balancing problems.