Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

LRWP for Xitami Using REBOL

 [1/3] from: cybarite:sympatico:ca at: 18-Oct-2001 6:40


LRWP for Xitami Using REBOL ===Xitami Long Runnung Web Processes ---Xitami I just started to use the Xitami Web server to serve static pages (very nice -- easy to setup) and now want to do a bit more with it. ---Example Needed Can anyone provide an example REBOL script that is running as a Long Running Web Process? ---Rationale The doc indicates that this will give some performance improvements over the CGI approach. ---LRWP Process I read the documentation. I think it works as follows: a. add the process name and url to the LRWP config section b. start the script to listen on that port c. the script provides a response is similar to cgi A LRWP process listens on its port and provides a response like webserver.r does. The documentation reads like the Xitami server will manage the scheduling of its LRWProcesses - queue the requests until there is a free process, manage the timeout when none become available. ---LRWP Location I think the LRWP processes can be served from any place that I wanted to put them - like on another server for that purpose. ---Performance Findings? Are there any results of the performance of REBOL being the LRWPs? ---Coming To Terms I want to try this by putting a dictionary of terms in the LRWP script and use REBOL's ability to access and format them for display. Then hundreds of terms can be included and linked from a single dictionary definition such as: terms: [ LRWP [ title "Long Running Web Process" definition {An Xitami approach similar to Fast CGI that allows} usage {Not yet used in this environment.} see-also ['cgi] ] CGI [ title "Common Gateway Interface" definition {} usage {Suitable for } see-also ['lrwp] ] ] And emitting standardized format HTML after finding a term in that dictionary is pretty easy to do. ---Experience Anybody been there, done that, got the tee-shirt?

 [2/3] from: koopmans::itr::ing::nl at: 18-Oct-2001 13:37


Hi, See below....
> A LRWP process listens on its port and provides > a response like webserver.r does.
No. Like a CGI program does. You return the content by passing your content as a string to lrwp/respond
> The documentation reads like the Xitami server will > manage the scheduling of its LRWProcesses - queue the > requests until there is a free process, manage the timeout > when none become available. >
Yes. Cool huh?
> ---LRWP Location > > I think the LRWP processes can be served from any place that > I wanted to put them - like on another server for that purpose. >
Yes.
> ---Performance Findings? > > Are there any results of the performance of REBOL being > the LRWPs? >
No, but... you miss the startup overhead of launching a CGI process. Provided that you have enough LRWP processes for a certain url they will act almost as static pages (depending on your logic).
> ---Coming To Terms > I want to try this by putting a dictionary of terms in the LRWP
<<quoted lines omitted: 17>>
> And emitting standardized format HTML after finding a term in that > dictionary is pretty easy to do.
You can download lrwp.r from the script lib, under CGI. The last few commented lines are a sample. You include lrwp.r in you script and start the service by using the commented lines. HTH, Maarten

 [3/3] from: cybarite:sympatico:ca at: 18-Oct-2001 22:26


Re: [REBOL] Re: LRWP for Xitami Using REBOL Thanks Maarten (and Robert) I can't say it worked the first time but in about 30 minutes I was up and running. I have the dictionary script that I proposed running as a long running web process from Xitami and drove some load against it...started new instances of the script and drove some more load. Seemed to handle well 10 instances of the dictionary script without problem. I ran a thousand requests in a few minutes against those 10 instances. Still no problem. Seems to be a bit better experience than the PWS CGI stuff that I see. Looks like some potential here... I can see why you're impressed with the Xitami server.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted