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:
Banner Ad (1998)
[SHOWIF AND/OR] (1997)
I am dumb. No see [variable] (2003)
Nutscrape Doesn't Render Right (2002)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
WebDNA 5.0 upgrade policies (2003)
Resume Catalog ? (1997)
I found a bug ... (1997)
[OrderFile] error (help) (1999)
Slightly OT: [sendmail] help (2003)
Bug Report, maybe (1997)
WCS Newbie question (1997)
no [search] with NT (1997)
Custom formulas.db (1998)
Notepad problems (1998)
New public beta available (1997)
What am I missing? (1998)
Db design question (relational vs. flat?) (1998)
Webcatalog and foreign languages (1998)
limitation found on group searching (1997)