unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: rm@fabula.de
Cc: rm@fabula.de, guile-devel@gnu.org
Subject: Re: scm_* API extension? [was] scm_* API question
Date: Wed, 31 Jul 2002 20:21:24 +0200	[thread overview]
Message-ID: <20020731182124.GD6561@www> (raw)
In-Reply-To: <ljeldkfbsk.fsf@burns.dt.e-technik.uni-dortmund.de>

On Wed, Jul 31, 2002 at 12:10:19PM +0200, Marius Vollmer wrote:
> rm@fabula.de writes:
> 
> > Would it be usefull to provide a scm_* function for it?
> 
> Yes.  I will add this to CVS.
> 
> However, I'd say it is better to code all module system manipulations
> in Scheme and try to keep the C code 'module system ignorant' if that
> is possible.
> 
> Why do you want to perform module system operations from C?  Maybe
> there is a more elegant way.

Ok this is for my current (frankensteinish) hacking with Dave's mod_guile:
i'm working on implementing a mod_guile mode in which URLs get mapped to
so-called 'handlers' in modules - meaning i (ab?)use the hierarchical module
space a namespace enclosures. Hmm, i guess this sounds rather confusing, so
here is a small example. I the server configureation on can do the following:

<Location /cool/stuff>
  SetHandler             guile-handler
  GuileContentHandler    (web linkdatabase cool)
</Location>

<Location /biblio>
  SetHandler             guile-handler
  GuileContentHandler    (web apps biblio)
</Location>

Whenever a request for http://localhost/biblio comes in the
webserver invokes the 'handler' method from the module (web apps biblio).
Ah, in case one wants a different name, 'GuileContentHandler' will also
accept a pair of the form '(module-spec . handler)' that allows us to 
specifiy the name of the function that gets invoked (and hence we can define
more than one handler within one module). I'll also plan to add something like

 GuileBind a-symbol '(arbitrary (guile data) structure)

i.e. i want guile to 'read' from the configuration file and bind 'a-symbol' to
whatever was read. As a side note: as a quick hack i put the symbol into
the module but i'd rather like to use something like an environment i can
set up myself (i hope setting up an environment isn't to expensive performance
wise), but i have way too little understanding about how to do this right now.
But it would make a _way_ cool web environment -- full control over the env.
means secure execution as well as probably some nice passing on of context.

BTW, one reasons i do use the module system is the impicit cacheing i get:
a module gets loaded only once, and that does make a difference in response
time compared to the initial 'eval a file per request' aproach of mod_guile.

 Ralf Mattes

> _______________________________________________
> Guile-devel mailing list
> Guile-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/guile-devel

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-07-31 18:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 12:14 scm_* API question rm
2002-07-31  1:09 ` Christopher Cramer
2002-07-31 10:03   ` scm_* API extension? [was] " rm
2002-07-31 10:10     ` Marius Vollmer
2002-07-31 18:21       ` rm [this message]
2002-07-31 21:59         ` Rob Browning
2002-08-01 10:10           ` rm
2002-08-01 16:51             ` Rob Browning
2002-08-05 15:08         ` Marius Vollmer
2002-08-05 16:06           ` rm
2002-08-05 16:49             ` Marius Vollmer
2002-07-31 20:06       ` Christopher Cramer
2002-07-31 22:14         ` Rob Browning
2002-08-01  9:41         ` rm
2002-08-05 17:51           ` Marius Vollmer
2002-08-05 18:12             ` Han-Wen Nienhuys
2002-08-05 18:45               ` Rob Browning
2002-08-05 18:31             ` Rob Browning
2002-08-05 18:33             ` rm
2002-08-05 15:12         ` Marius Vollmer
2002-07-31 10:11 ` Marius Vollmer
2002-07-31 10:30   ` rm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020731182124.GD6561@www \
    --to=rm@fabula.de \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).