[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Web server questons



At Fri, 26 Apr 2002 01:36:14 +0400 (MSD), Kirill Lisovsky wrote:
> Hello!
> 
> 
> On Thu, 25 Apr 2002, Paul Graunke wrote:
> 
> > At Thu, 25 Apr 2002 23:26:41 +0400 (MSD), Kirill Lisovsky wrote:
> > > 1. What it the best way to use byte-compiled servlets?
> > 
> > You can use mzc to byte compile any .ss file.  If (most of) the code is
> > in a collection, you can create an info.ss file, so setup-plt will compile
> > the collection.  Check help-desk for mzc and for info.ss.
> > > 
> Is it possible to load .zo _servlet_ if it is available and .ss otherwise?
> (As load/use-compiled does it for regular files?)
> 

You're right.  I changed load to load/use-compiled in the server and
checked it in.  It will load .zo files now, too.

> It seems that web server always use some-servlet.ss instead of 
> compiled/some-servlet.zo which is ignored by web server, isn't it?
> 
> > > 3.                  ... to load a bulk of Scheme data in RAM and access it
> > >  from multiple servlets?   
> > >   Is it possible to save it before server shutdown?
> > > 
> > Same as 2.  Functions are data, too :-)
> > 
> The point is: how to save _modified_ data on server _shutdown_ (it may be a common
> situation for a particular server) rather than on data update operation invoked
> by a servlet?
> 
There's not a callback that runs on shutdown currently.  I'm not sure how
to add one reliably anyway since someone could kill -9 the server process.

You could write a "sync to disk" servlet and always remember to call it, or
you could checkpoint the data every N seconds.

If you have a better idea, please let us know!

> Thank you for the fast reply!
> 
> Best regards, 
>          Kirill.
> 

Thanks,

Paul