Re: New command suggestion (was Re: Modifying databasesmanually)

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13829
interpreted = N
texte = >Changing out databases has become a problem for us, since we generally have >20 or more connections at any given time. I hate to deny users access to >our site by quitting Webstar or Refusing Connections for ANY amount of >time, so I have a proposal. > >A new command called $Reload with the argument db=file.db. This command >would cause Webcat to throw away the database in RAM and reload the data >from disk. In other words, what you really would like to have is a new tag that purges the xxx.db data from RAM *without* writing it to disk. Yes, that would make it possible to do everything you need, automatically, in a single template like this:[CloseDatabase xxx.db] [AppleScript] Move the xxx.db file to the trash and rename the xxx.db copy file to xxx.db [/AppleScript] [PurgeDatabase xxx.db]It won't make any difference how many people are searching the xxx.db while the AppleScript is working, because they will be working off a RAM-cached version of the original database anyways, at least until WebCat receives an [append] or [closedatabase] or [flushdatabases] or [PurgeDatabase] command.And once the AppleScript is done working and the data is purged from RAM with the [PurgeDatabase] command, you really don't have to worry about loading the new xxx.db into RAM, because it will be loaded automatically into RAM the first time one of your templates needs to deal with that database again.And if you're really in a hurry to reload the new xxx.db file *before* one of your users has a chance to reload it, you can easily put a [search] or a [lookup] after the [PurgeDatabase] tag, which will make the database reload immediately after being purged from RAM.It seems the critical function of this proposed tag should be simply to purge the RAM without writing it to disk (thus my suggested PurgeDatabase name). Everything else can be done with WebDNA's existing capabilities and with AppleScript. Sincerely, Ken Grome WebDNA Solutions 808-737-6499 http://www.hui.net/dna/webdna.html Associated Messages, from the most recent to the oldest:

    
>Changing out databases has become a problem for us, since we generally have >20 or more connections at any given time. I hate to deny users access to >our site by quitting Webstar or Refusing Connections for ANY amount of >time, so I have a proposal. > >A new command called $Reload with the argument db=file.db. This command >would cause Webcat to throw away the database in RAM and reload the data >from disk. In other words, what you really would like to have is a new tag that purges the xxx.db data from RAM *without* writing it to disk. Yes, that would make it possible to do everything you need, automatically, in a single template like this:[CloseDatabase xxx.db] [AppleScript] Move the xxx.db file to the trash and rename the xxx.db copy file to xxx.db [/AppleScript] [PurgeDatabase xxx.db]It won't make any difference how many people are searching the xxx.db while the AppleScript is working, because they will be working off a RAM-cached version of the original database anyways, at least until WebCat receives an [append] or [closedatabase] or [flushdatabases] or [PurgeDatabase] command.And once the AppleScript is done working and the data is purged from RAM with the [PurgeDatabase] command, you really don't have to worry about loading the new xxx.db into RAM, because it will be loaded automatically into RAM the first time one of your templates needs to deal with that database again.And if you're really in a hurry to reload the new xxx.db file *before* one of your users has a chance to reload it, you can easily put a [search] or a [lookup] after the [PurgeDatabase] tag, which will make the database reload immediately after being purged from RAM.It seems the critical function of this proposed tag should be simply to purge the RAM without writing it to disk (thus my suggested PurgeDatabase name). Everything else can be done with WebDNA's existing capabilities and with AppleScript. Sincerely, Ken Grome WebDNA Solutions 808-737-6499 http://www.hui.net/dna/webdna.html 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:

WebCat2b12 Mac.acgi--[searchstring] bug (1997) Re2: frames & carts (1997) spawn (1998) includes (2003) tabs as delimiters (2004) Attn: Bug in GeneralStore example b15 (1997) Javascript/WebCatalog form population (2001) expired beta (1997) how to check for no value while using [URL] to prevent cr (1999) available times? (2003) Can ShowNext do this? (2000) RE: [WebDNA] How to valuate a domain name? (2010) Can't find templaes (1997) WebCat2 beta 11 - new prefs ... (1997) Problem displaying search result (1997) OSX - webDNA 4.51 (2003) Creating 404 Not Found pages (1999) database freeze (1997) PCS Frames (1997) textarea to page display (1998)