Coding For Application Mobility - Clustering
Posted by Mike Brunt at 9:49 PM
3 comments - Categories: Web Servers | .NET | DataBase | CloudComputing | ColdFusion | JRun-J2EE
One thing we have stressed at everyone of our presentations on clustering ColdFusion, is the need to code from day one with the assumption that one day there will be multiple copies of the code. What that means is that we need to avoid anything that is server/network specific.
We are currently assisting a client to move to clustering from a single web-CF server and they have had to spend hours recoding parts of the application which were server specific.
Here are our guidelines as to what to avoid...
- IP Addresses: Avoid the use of IP Addresses totally in code, whether they be internal and specific to the server the code is running on or any external servers. IP Addresses will change, whether it be because of the move to multiple servers for clustering, the move to a new hosting company etc.
- Directory Paths: Never hard code directory paths in code, once again they can change.
- Server (Host) Names: Here again we should avoid using server names in code, there is always the chance that they will change.
The broad view is to avoid the use of anything that is related to the environment the code is running in. One more tip, please also avoid storing this values in an external mechanism, such as a database that is almost the worst of all as we cannot search for those values in the code itself.
kaixinyixia2013 wrote on 03/19/10 5:04 AM
http://www.louboutinshoesonline.com_blank