Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 6th, 2004, 03:01 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default DNS propagation time

The issue I have now does not have anything to do with ASP. But I am not able to find an appropriate forum to discuss it. So I am putting it in my default forum.

Recently, I have completed a fairly big web site. The web site owners are getting suggestions for changes from visitors in large quantity. They want all those changes to be implemented asap. Since most of them involve table changes, changes in stored procedures, as well as pages, I would like to establich a staging site. After it is approved, I can make them live.

However, the client does not want to block the site even for 1 hour. To have this, I am planning it as below.

I will make a set of changes in staging server. The client can check and approve them. Then I will change the domain pointing to the staging server. Subsequently, the earlier live site will become staging site for the next batch of additions / modifications.

But I have a doubt. Does the changing of pointing take time to get propagated to ISPs ? Once I change, will all people get the changed pages immediately ? How can I byepass the DNS cache on ISPs ?(I am not allowing my ASP / HTML pages to go to cache).

Is there any other brilliant solution for this ? i.e. to make changes to site without blocking it.
 
Old July 6th, 2004, 03:26 AM
Authorized User
 
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

According to my ISP you should allow at least 24 hours for full worldwide propagation, but it can take longer (and I know this from personal experience).

In the same situation, I set a second version of the site with the changed pages up in a separate folder with a non-standard name for the home page. The user accesses the alternative home page in order to test the changes. When he is happy, I just rename the alternative home page to default.htm or whatever. No uploading required, and no downtime.

Pat

-------------------
System 3 2000 Limited
www.system3-2000.co.uk
 
Old July 6th, 2004, 05:09 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Hi Pat,

This is a brilliant solution. It saves me uploading the pages again. It relieves the client from paying additionally for the staging site. Thanks a lot.

But anyway, the db changes needs to be copied. Do you know any tool which will compare the test database with live one (both on same SQL server) and copy the changes to live database ?

Thanks

Madhu.
 
Old July 6th, 2004, 01:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Madhu,

You always have a replica of the entire site ASP files within itself or somewhere on the same location and call it "prototype". Any changes required, you do it on the prototype copy, send that URL to the clients for testing, and once approved, just copy that from prototype and overwrite the one on live folder. This should also reduce the downtime and bring changes within a minute or so. Also it is a good practice for making ASAP kind of changes and bringing them online, without much of an effort. This is what I followed long back when I needed to do make such adhoc changes and bring them online ASAP.

In this case, the Live URL may look like http://yoursite/default.htm
Prototype URL may look like http://yoursite/prototype/default.htm

And regarding Database, I am not sure about any 3rd party tools that does the replication of changes. But IMO, setting up MERGE Replication on that would be the right choice and this can be setup to merge the changes at sometime everyday. I am not sure about how to set that up. But I was having similar setup when I had to develop an intranet site, live version was hosted in the US office, and my test environment was setup on my PC. Someone from US office then had setup this kind of replication for me. I didnot have any problem with that, the structural changes(table, stored proc and other object changes) were replicated once everyday(just before daytime in US), but the data replication happened then and there. So I would make changes during my day, and they would be able to see them effected during their daytime.

But if you cannot set that up, then probably you can do all those changes through sql statements or keep/prepare the sql statements that you used for making those changes, get that tested in test server and once approved, you can run the same statements on the live server to keep that up to date. Possibly the table changes can be imported/exported onto live server, stored procs can be created by executing the script you used in testbed onto live server within a minute. Still it is a pain to do so, without having a replication setup. But I would say that, you won't be making too many changes at a day/any point of time. So that way you can manage doing it manually yourself.

One disadvantage I would see in replication setup is that if the link is down between these to DB servers, say LiveDB in hosting end, and testDB in your office, and the link goes down, then replication gets broken, and one has to manually attend to it, which the guy in my US office was facing often, due to fluctuation in link. But I am not so good at replication setup, as I was not much involved in it. So I would suggest you to do it manually then and there, till it gets stabilised at some point, after which you won't have to do such changes often. Also you would be responsible for anything happening there, by doing it manually, else youwill have to blame the replication setup, for not doing it ontime or when expected.

Hope I have shed some light on that from my end. Now, you got to take a call on that.;)
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 7th, 2004, 01:14 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

hi Vijay,

Thanks for your solution.

I have decided to do it as below.

There will be 3 folders. live, test and dev.

I will create a script to compare the last modification time of all files of target folder and source folder. Then it will copy all the new files from source folder to target folder. It will overwrite all files of target folder whose date of modification is earlier than that of source folder. It will also delete unnecessary files from target folder.

There will be 3 versions of database.

dbs_<project_name>_live, dbs_<project_name>_test and dbs_<project_name>_dev. The files of above 3 folders will connect to the appropriate database alone and work with that.

Then there will be another script to compare databases and copy all changes. This tool will do following tasks.

a) create any new tables
b) drop any table
c)Create new fields.
d)Drop fields that are not needed after copying data to alternative fields appropriately. Fields need be dropped only if it is necessary.
e)Alter data types of changed fields. The tool will only widen the fields. It won't narrow down the data capacity of a field. This will help reduce any bugs in future.
f)Drop and re-create changed stored procedures.
g)Drop and re-create triggers
h)In the development stage itself, the new indices to be used should be determined. The current indices should be dropped and new ones to be created.
i)Copy any data that are to be copied. There may be some records in some tables that are inputted manually. They may be needed for the error free performance of site. (I would prefer not to use such manually entered data. It is better to define a master table and a set of management pages for it. However, there are situations where this cannot be avoided.)

With the help of these folders, I can achieve it. Initially work will happen at dev folder. Then it will be copied to test folder with the help of these tools. Client can test from test folder. Once approved, it will be copied to live folder.

Since there is an intermediate folder between dev folder and live folder, it will not cause any problem even if there are some flaws for the tools. If any of the tool fails, it will not work from test folder. This gives me a chance to explore the tool further and improve it.

Thanks everybody who gave suggestions for a seemingly feasible solution.
 
Old July 7th, 2004, 02:25 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes Madhu, That looks quite good. But you would be having tough time creating DB replication tool. I am sure this is nice chance for learning too. Should have good time with. All the best. And let me know once the tool is ready, I am really curious in taking a look at how it works.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 8th, 2004, 12:52 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default

Hello Vijay,

I am planning to do it as a com component so I can use it in many project including VB projects. It will take some time.

Sure. I will let you know once it is ready.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing from DNS to DNS less connection dudeshouse Classic ASP Databases 4 February 7th, 2007 12:02 PM
secondary DNS vs. second primary DNS gangu1971 Linux 1 March 1st, 2005 10:40 AM
dns ghari Classic ASP Professional 3 October 27th, 2004 02:12 AM
DNS kilika Classic ASP Professional 5 August 4th, 2004 12:53 PM
ODBC and Viruses Propagation - Is it possible rooroo Access 0 December 9th, 2003 05:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.