Hi Jay,

On 4/24/2015 7:03 AM, Jay McCarthy wrote:
On Fri, Apr 24, 2015 at 6:31 AM, George Neuner <gneun...@comcast.net> wrote:
> On 4/23/2015 1:45 PM, Jay McCarthy wrote:
>
>> The values of the parameters are saved in the continuation and
>> inherited from the thread.
>
>
> That's going to be a problem because there's a large amount of state - not
> simply control variables, but also an open database connection and a complex
> dynamic database query that is expensive to re-execute.  Many clients may be
> simultaneously executing separate instances of the query - if I can't keep
> the database connection open, I can't use per client temporary tables to
> cache results and will have to do something ugly with a permanent table.
>

I'm surprised that you use so many parameters:
http://docs.racket-lang.org/guide/parameterize.html?q=parameter#%28tech._parameter%29

Why?  Web applications are as complicated as native ones.

There are 9 arguments to the initial request which are used to construct a complex [expensive to execute] dynamic SQL query. This query may return hundreds of results so the results need to be paged to the client. Also, there is "exactly once" accounting that must be done on results that actually are sent to the client [ not simply returned by the query ].

So it's not "parameterized" per se like a thread, but there is a lot of state that needs to be maintained to service subsequent result page requests: the open database connection [which maintains the query results until closed], several pieces of client information used for accounting, the current page of results, etc.

George

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to