unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* integrating guile in an apache module
@ 2003-07-29 10:44 George Moschovitis
  2003-07-29 11:35 ` rm
  2003-07-29 12:19 ` Dale P. Smith
  0 siblings, 2 replies; 6+ messages in thread
From: George Moschovitis @ 2003-07-29 10:44 UTC (permalink / raw)


Hello everybody!

I am trying to code an apache2.0 module that uses guile for scripting
dynamic html pages. My problem is that i have to enclose the main loop
of the application in the scm_boot function for the gc to work according
to the manuals. 

When writing an apache module I do not have control over the main loop,
the http server just calls the handler method. Is there a way to
overcome this problem? Has anyone tried something similar (mod_guile
perhaps?)

Any info will be appreciated!


regards,
George Moschovitis

--
Navel



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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: integrating guile in an apache module
  2003-07-29 10:44 integrating guile in an apache module George Moschovitis
@ 2003-07-29 11:35 ` rm
  2003-07-30  3:21   ` Sergey Dolin
  2003-08-03  6:11   ` Per Bothner
  2003-07-29 12:19 ` Dale P. Smith
  1 sibling, 2 replies; 6+ messages in thread
From: rm @ 2003-07-29 11:35 UTC (permalink / raw)
  Cc: guile-user

On Tue, Jul 29, 2003 at 01:44:28PM +0300, George Moschovitis wrote:
> Hello everybody!
> 
> I am trying to code an apache2.0 module that uses guile for scripting
> dynamic html pages. My problem is that i have to enclose the main loop
> of the application in the scm_boot function for the gc to work according
> to the manuals. 

What version of Guile do you intent to use? Recent version do not
need to wrap the application's 'main()' function (using other means
to detect the bottom of the stack) -- have a look at the documentation
for scm_init_guile() vs. scm_boot_guile().

> When writing an apache module I do not have control over the main loop,
> the http server just calls the handler method. Is there a way to
> overcome this problem? Has anyone tried something similar (mod_guile
> perhaps?)

Well, with Apache2 you might encounter other, more severe, problems as
well. Apache2 might run in multithreaded manner and hence there's a 
high chance for several modules to execute in parallel. AFAIK guile
is'nt meant to be run in parallel (only one thread can use guile).

> Any info will be appreciated!

Hope that helps. BTW, are your trying to write an Apache2 mod_guile?


 Ralf Mattes
> 
> 
> regards,
> George Moschovitis
> 
> --
> Navel
> 
> 
> 
> _______________________________________________
> Guile-user mailing list
> Guile-user@gnu.org
> http://mail.gnu.org/mailman/listinfo/guile-user


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: integrating guile in an apache module
  2003-07-29 10:44 integrating guile in an apache module George Moschovitis
  2003-07-29 11:35 ` rm
@ 2003-07-29 12:19 ` Dale P. Smith
  1 sibling, 0 replies; 6+ messages in thread
From: Dale P. Smith @ 2003-07-29 12:19 UTC (permalink / raw)
  Cc: guile-user

George Moschovitis wrote:
> Hello everybody!
> 
> I am trying to code an apache2.0 module that uses guile for scripting
> dynamic html pages. My problem is that i have to enclose the main loop
> of the application in the scm_boot function for the gc to work according
> to the manuals. 
> 
> When writing an apache module I do not have control over the main loop,
> the http server just calls the handler method. Is there a way to
> overcome this problem? Has anyone tried something similar (mod_guile
> perhaps?)
> 
> Any info will be appreciated!

Have a look at http://savannah.nongnu.org/projects/mod-guile

-Dale

-- 
Dale P. Smith
dsmith at actron dot com



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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: integrating guile in an apache module
  2003-07-29 11:35 ` rm
@ 2003-07-30  3:21   ` Sergey Dolin
  2003-07-30  8:34     ` tomas
  2003-08-03  6:11   ` Per Bothner
  1 sibling, 1 reply; 6+ messages in thread
From: Sergey Dolin @ 2003-07-30  3:21 UTC (permalink / raw)
  Cc: George Moschovitis, guile-user


r> Well, with Apache2 you might encounter other, more severe, problems as
r> well. Apache2 might run in multithreaded manner and hence there's a 
r> high chance for several modules to execute in parallel. AFAIK guile
r> is'nt meant to be run in parallel (only one thread can use guile).

 It's worth to look on guile-fcgi.

http://isc.uu.ru/~dsa/guile

-- 
Sergey                                 30 July, Wednesday 09:20(YEKST +0600)
Gnus v5.9(GNU/Emacs 21.2)*Debian GNU/Linux woody*Fvwm-2.4


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: integrating guile in an apache module
  2003-07-30  3:21   ` Sergey Dolin
@ 2003-07-30  8:34     ` tomas
  0 siblings, 0 replies; 6+ messages in thread
From: tomas @ 2003-07-30  8:34 UTC (permalink / raw)
  Cc: guile-user

On Wed, Jul 30, 2003 at 09:21:43AM +0600, Sergey Dolin wrote:
> 
> r> Well, with Apache2 you might encounter other, more severe, problems as
> r> well. Apache2 might run in multithreaded manner and hence there's a 
> r> high chance for several modules to execute in parallel. AFAIK guile
> r> is'nt meant to be run in parallel (only one thread can use guile).
> 
>  It's worth to look on guile-fcgi.
> 
> http://isc.uu.ru/~dsa/guile

While putting things into separate processes has definitely
its advantages, it still strikes me that Guile kicks and
bites so much when one tries to embed it into an application
(since it was born with embedding as an explicit goal).

Hmmm.

Sorry for rambling

-- tomas


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: integrating guile in an apache module
  2003-07-29 11:35 ` rm
  2003-07-30  3:21   ` Sergey Dolin
@ 2003-08-03  6:11   ` Per Bothner
  1 sibling, 0 replies; 6+ messages in thread
From: Per Bothner @ 2003-08-03  6:11 UTC (permalink / raw)
  Cc: George Moschovitis, guile-user

rm@fabula.de wrote:
> On Tue, Jul 29, 2003 at 01:44:28PM +0300, George Moschovitis wrote:
> 
>>Hello everybody!
>>
>>I am trying to code an apache2.0 module that uses guile for scripting
>>dynamic html pages.
> 
> Well, with Apache2 you might encounter other, more severe, problems as
> well. Apache2 might run in multithreaded manner and hence there's a 
> high chance for several modules to execute in parallel. AFAIK guile
> is'nt meant to be run in parallel (only one thread can use guile).

You might consider using Kawa for scripting dynamic html web pages in
Scheme.  Kawa supports compiling a Scheme program to a "servlet" which
can run quite efficiently in a "servlet engine" such as Tomcat.  And
of course servlets are designed to be run using multiple threads.

This article show how simple it can be:
http://www.gnu.org/software/qexo/simple-xquery-webapp.html
The article uses the XQuery language, but using Scheme should
also work in the same way (though I haven't tried writing a
Scheme version of the example).  (To avoid mis-understandings:
Kawa is now a multi-language framework, providing implementations
of Scheme, Emacs Lisp, XQuery, and other languages.)

You might also consider BRL: http://brl.sourceforge.net/
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/




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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-08-03  6:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-29 10:44 integrating guile in an apache module George Moschovitis
2003-07-29 11:35 ` rm
2003-07-30  3:21   ` Sergey Dolin
2003-07-30  8:34     ` tomas
2003-08-03  6:11   ` Per Bothner
2003-07-29 12:19 ` Dale P. Smith

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).