[RevServer tips] Spreading the load or why wise developers use asynchronous workflows

Devin Asay devin_asay at byu.edu
Wed Aug 4 18:53:04 EDT 2010


On Aug 4, 2010, at 4:07 PM, Jeff Massung wrote:

> This is a typical, safe setup:
> 
> 1. Client web browser clicks a button on a web page.
> 2. Web server sends a command to a CGI script (running on the server).
> 3. CGI script makes a connection to the database and runs a SQL function.
> 4. The SQL function executes a transaction on the database.
> 
> #1 is executed at some random, remote, external machine.
> #2 is the only socket action that actually takes place.
> #3 is run through the localhost loopback device to gain DB access.
> #4 is entirely done within the database server code.
> 
> Something you can usually do as a quick test is to set your database up so
> that it only accepts connections from the localhost. Then run through all
> your tests. If any of them fail, that's a point where you are trying to
> access the database remotely and need to fix it.

Thanks, Jeff! This is a really useful outline that I can easily adapt to my work. I assume you'd want to follow this procedure even if you are making the db requests directly from a stack? So send a get or post http request to the CGI script from the stack and then process the returned data in the stack?

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the Use-livecode mailing list