| Ken Hygh 2007-02-21, 7:27 am |
| kunal.kishan@gmail.com wrote:
> Background :
> I have got an Application which takes 10 mins for Starting up. I have got servers with Vertical Scaling and I have 10 Application Clones. The amount of time and manpower it needs to Start up the application is then 10*10 + Co-ordination.
> Problem Statement :
> My Application uses Properties files like which URL it has to direct to Users etc etc. These files are read and loaded at the start of the Application Clone.In a Production sceanrio such huge time for getting the application up is time consuming.
> Now is there a way that any Change in these properties file should reflect immediatley and hence i will consume no time in Clone Startups ? Will A WebService providing such behaviur of fetching data like these be a solution ?
>
>
There are a number of solutions to this common problem. I've solved it by:
1) looking up the value from JNDI or HTTP or a WebService. Problem with
this approach can be that this adds at least one network call every time
a property is looked up. So then I've created a cache for these, and
only look up new values every n seconds.
2) use JMX to 'push' updates. In this design I've created a Singleton in
each application server instance that's the Configuration object. At
startup it loads the Properties file. Using a custom-built JMX MBean, I
can trigger the MBean to call a method on the Singleton to reload the
properties file or get the config info from somewhere else.
Ken
|