[plt-scheme] processing requests
On Tue, 18 Apr 2006, Shriram Krishnamurthi wrote:
> Are you aware that there's a Web server built into the PLT Scheme
> distribution that explicitly saves you the hassle of any of the things
> you're trying to do? If not, please search for "web server" in the Help
> Desk.
Hi Shriram and Amar,
But I think Amar knows about the web server, since the message did mention
send/suspend.
I suspect what Amar's trying to do is have two independent servlets that
communicate.
> 1.how do i receive and process the bindings received from First.ss in
> B.ss?
>
> 2.Is there any core procedure that can be used( examples like add.ss etc
> deal with 1 scheme file & they extract the bindings from the return
> value of send/suspend) & how should i structure B.ss 3. Are there any
> examples for this
But things might be simpler if the control structure were in just one
file. Would it be possible to do something like this?
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(module First mzscheme
(require (lib "servlet.ss" "web-server")
"B.ss")
;; ... other add servlet goodness here
(define (start initial-request)
; ... stuff here, and then:
(section-b
(send/suspend ...)))
(module B mzscheme
(provide section-b)
(define (section-b bindings) ...))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
You could then pass section-b any other parameters or bindings that are
interesting.
Best of wishes!