Nov 21st, 2009, 05:19 PM
Best practices in splitting up web servers
I'm wondering what the best practices in splitting up web servers. I have a website which has jsp pages, login mechanism, etc. And then I have a visualization which gets pretty complex and generates a really tremendous amount of data and files. So I've separated the standard web serving and visualization into 2 clusters.
I still need my Spring configuration and most of my classes for both systems. But I can't have people visiting web pages on my visualization cluster. The 2 systems also have different tasks that need to be scheduled.
So what I've done is used the copy and replace ant tasks to make 2 different sets of Spring xml configuration files. I'd actually like to have all configuration annotated, but xml files makes this easier. To prevent users from visiting web pages in the visualization web servers, I just comment out the mappings property of the SimpleUrlHandlerMapping bean (well most of it).
My xml config files (spring and ant) are starting to look pretty ugly and hacked together. There must be a better way for what I'm assuming is a very common scenario. What's the best practice for this?
Nov 23rd, 2009, 09:01 AM
The dynamic modules approach used in Impala (http://www.impalaframework.org/) might be well suited to your application. You could divide your web serving and visualization into separate modules which can be deployed together or separately. Both of these could use code from one or more shared modules.
To handle security, you could stick a Spring security (or custom security) backed Filter.
You could still use one build - but just have different deployment options depending on whether you you want to deploy the web serving and visualization separately, or together.
Impala - simple dynamic modules for Spring
Nov 23rd, 2009, 08:10 PM
thank you Phil, I'll check out Impala