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:
Using a database with a short url (2000)
international time (1997)
WebCatalog for guestbook ? (1997)
unusual search problem (1998)
Text data with spaces in them... (1997)
ShowIf inside formulas (1997)
For those of you not on the WebCatalog Beta... (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
Hello??? (1997)
emailer (1997)
WebCatalog NT beta 18 now available (1997)
Has anyone on the list heard of i2? (2000)
Problems appending to database (1997)
template not found error (1998)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
WebCatalog can't find database (1997)
relogin same user? (1998)
Multiple cart additions (1997)
Fedora Core 3 and WebDNA (2005)
Generating unique SKU from [cart] - Still Stumped... (1997)