Re: Updating a database once per day - An example
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17974
interpreted = N
texte = >At 16:18 Uhr -1000 30.05.1998, Kenneth Grome wrote:>>>>Okay, so if my template closes a database on a busy server, then>>>[movefile]s in a newly uploaded copy of the database, it's possible for>>>WebCatalog to reopen this database between the closing and the file>>>transfer if it receives another request for it?>>>>Good question, I will have to leave this one for the guys at PCS ... :)>>I believe if you perform [closedatabase] AFTER you moved the new one in,>there will be no chance to open the old one - it simply does not exist>anymore.I hate to disagree, but this last recommendation is wrong ...You *must* close the database FIRST -- because closing it, or using [flushdatabases], or quitting WebCatalog -- are the only ways to purge the old data from RAM. And you *must* purge the RAM cache or that RAM-cached data will overwrite the newer disk file at the next [closedatabase] or [flushdatabases] or [quit].If you want to make sure this manual updating process works properly without any problems, other than *possibly* a visitor or two getting an Error: the database 'test.db' could not be found or opened message during the process (which should take no more than a second or two at the most), do this in your update template:[DELETEFILE] <--trash the current db file[CLOSEDATABASE] <--purge the RAM cache[MOVEFILE] <--move the new db file into placeThis insures that when it's time to move the new db file into position, the old data is already purged from RAM ... and the old db file could not be reloaded because it wasn't there to be reloaded -- it was already deleted from disk.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>At 16:18 Uhr -1000 30.05.1998, Kenneth Grome wrote:>>>>Okay, so if my template closes a database on a busy server, then>>>
[movefile]s in a newly uploaded copy of the database, it's possible for>>>WebCatalog to reopen this database between the closing and the file>>>transfer if it receives another request for it?>>>>Good question, I will have to leave this one for the guys at PCS ... :)>>I believe if you perform
[closedatabase] AFTER you moved the new one in,>there will be no chance to open the old one - it simply does not exist>anymore.I hate to disagree, but this last recommendation is wrong ...You *must* close the database FIRST -- because closing it, or using
[flushdatabases], or quitting WebCatalog -- are the only ways to purge the old data from RAM. And you *must* purge the RAM cache or that RAM-cached data will overwrite the newer disk file at the next
[closedatabase] or
[flushdatabases] or [quit].If you want to make sure this manual updating process works properly without any problems, other than *possibly* a visitor or two getting an Error: the database 'test.db' could not be found or opened message during the process (which should take no more than a second or two at the most), do this in your update template:
[deletefile] <--trash the current db file
[closedatabase] <--purge the RAM cache
[movefile] <--move the new db file into placeThis insures that when it's time to move the new db file into position, the old data is already purged from RAM ... and the old db file could not be reloaded because it wasn't there to be reloaded -- it was already deleted from disk.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Summarizing on two fields (1998)
OT (stupid redirect/refresh question) (2002)
Sorting by date (1997)
[WebDNA] showif/sendmail question (2008)
WebCatalog for Postcards ? (1997)
Ok here is a question? (1997)
This list is acting screwy (2000)
PayFlow Pro - Changing the Amount that was Authorized (2003)
Protecting webdelivery (1997)
Cart questions (1997)
Re:no template caching (1997)
test (2000)
[OT] DNS server swap (2003)
What am I missing (1997)
Newbie needs advice to learn to use WebDNA (2003)
Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997)
SQL Changes in 3.0.7? (2000)
[delete] problem (1997)
Date Formats (1997)
Dark Horse Comics success story (1997)