Jan 3 2010

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.

Comments

SEO link vine

SEO link vine wrote on 04/18/10 8:45 PM

I know about Java. But I don't know about VMware. What is it ? Is it any kind of software or platform or framework ? If more information, post here.
zentai

zentai wrote on 05/27/10 1:13 AM

Please trust us. Choose us! spider man costume.We will bring you more exciting zentai unitard and better service.

Write your comment



(it will not be displayed)



Leave this field empty: