Hi George,

The database question is independent of the continuation question and
I'm not sure how to help you solve that problem. However, it sounds
like you are asking if continuations can capture state like "display
sublist 2" or "display sublist 3". They definitely can. Any of the
continuation capturing functions (s/s or s/s/d) will work.

As for cleanup, eventually the continuation's memory will be freed.
The default policy is discussed here:

http://docs.racket-lang.org/web-server/servlet.html#%28def._%28%28lib._web-server%2Fmanagers%2Flru..rkt%29._make-threshold-.L.R.U-manager%29%29

Jay

On Sat, Apr 18, 2015 at 12:34 PM, George Neuner <gneun...@comcast.net> wrote:
> Hi all,
>
> I have an web server application in which I need to page results of a
> database query, but I also have to guarantee *exactly-once* statistical
> processing of each sent result row regardless of how many times it may be
> sent.
>
> The results are from a complex join, however the join is separable into one
> that gets a list of ids and then another that uses the ids to get the actual
> return data.  Since the ids are separable (and small), my first thought was
> to gather the list of ids and then to page through the list separately
> retrieving the associated data and doing statistical processing on the rows
> as necessary.
>
> However, to do this, I have to keep the initial id list across multiple
> requests and that is where I've run into trouble.  Thus far, I haven't had
> to use web server continuations.  It seems like send/suspend does not allow
> the browser to provide additional arguments (like paging direction).
> send/suspend/dispatch looks like it will do what I want, however I need to
> communicate the URLs to the browser in JSON and it (superficially) appears
> as if  embed/url is meant to work in generated HTML?
>
> The final problem is how to ensure that I eventually get to send/finish and
> clean up my thread.  This particular function is expected to be executed
> quite often.  Does the browser app have to invoke a URL that deliberately
> ends the thread or will the thread end if/when its continuations time out?
>
> Apologies if this is rambling - I'm trying to sort out a bunch of things all
> at once.
> Thanks,
> 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.



-- 
Jay McCarthy
http://jeapostrophe.github.io

           "Wherefore, be not weary in well-doing,
      for ye are laying the foundation of a great work.
And out of small things proceedeth that which is great."
                          - D&C 64:33

-- 
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