mod-guile-devel
[Top][All Lists]
Advanced

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

Re: [Mod-guile-devel] Autoconf files


From: Dale P. Smith
Subject: Re: [Mod-guile-devel] Autoconf files
Date: Sat, 27 Jul 2002 23:10:49 -0400

On Sun, 28 Jul 2002 00:58:43 +0200
address@hidden wrote:

> Got it, thanks. BTW, from what i understand now, mod_guile
> handles 'Content' - handlers pretty much like FastCGI or 
> mod_perl in 'Registry' mode, i.e. reading a file and inter-
> preting it every time an URL gets requested (the speedup mainly
> comes from the persistent interpreter). What do you think 
> about an aproach like mod_perl's PerlHandler: have a apache directive
> 
> <Location /flob>
>  SetHandler guile-handler
>  GuileHandler (foo bar)  
> </Location>
> 
> with the following semantics: whenever there's a request for
> '/flob' have guile call the method 'handler' from the module
> (foo bar). Maybe we need to have an optional second parameter
> (like mod_perl does) that specifies the method name for those
> cases where one would want to group several handlers int one
> module. That way code needs to be loaded only once (the first time
> a module is seen. This type of cacheing should happen authomatically
> in guile). What do you think?

The current method of just load'ing .scm files was just so I could get
something going.  I actually want to make mod_guile flexible enough to
do just about anything.  The current mg_scm_handler needs to be written
in scheme and a good way of abstracting it so other kinds of handlers
could be written easily.

I see a whole spectrum of scheme-enabled web pages.  There is the basic
html with a little bit of scheme thrown in here or there, possibly
written using a gui web development tool. There is just raw scheme that
uses display to generate html. How about something like a scheme based
markup language? Like laml or some of the stuff that address@hidden has
done.  I'd like to see handlers for all of these, or rather, I'd like
the hooks to be there so that these (and any other) handlers are easy to
write.

At any rate, I was planning to at least have some kind of caching of
.scm files to speed things up. The .scm file would only be re-read if it
changed.  I also don't like the idea of passing the request rec in the
Request global variable. Ugh!  But .sch files don't really have
arguments.  There are lot's of questions on how to go about doing these
things, and I was getting stuck.  I was hoping wiser and more
experienced people could offer suggestions and insight. ;^)

> Oh, i also would suggest adding a 'guile-script-handler'. I have mo-
> dified mod_guile.c that way, so one can do the following:
> 
> <Location /guile-scripts>
>   AddHandler guile-script-handler
>   ...
> </Location>
> 
> That way one can configure guile as the (script) content handler
> for a whole directory (or subtree of the server) without having to
> rely on mime types/file endings. Anything within the Location will
> be handed over to guile, no matter how it's named.

Yes.  Have you ever looked as quixote?  It's in Python, not Scheme, but
there are some ideas in there that are ver interesting.  Like the way
the module namespace and the url name space sort of blend together.

> I try to provide a patch against the CVS by tomorrow (way to late
> over here ;-)

Thanks.

-Dale
-- 
Dale P. Smith
Senior Systems Consultant,      | Treasurer,
Altus Technologies Corporation  | Cleveland Linux Users Group
address@hidden            | http://cleveland.lug.net
440-746-9000 x339               |



reply via email to

[Prev in Thread] Current Thread [Next in Thread]