You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by cizaire_liste <ci...@yahoo.com> on 2000/05/16 18:52:25 UTC

Embeding apache into an application

Hello,

I want to embed apache into an already written application 
(on solaris, linux and NT), by loading it as a shared library, 
and that raises some points :
- how to use apache when my application provides the main
(maybe something to do with REALMAIN)
- how to prevent apache to fork (but multi threading is ok)
(maybe something to do with MULTITHREAD but I am not sure it
is handled on unix)
- how to get the http requests
(maybe something like a mod_... to develop)
- what is the minimal configuration
- how to do it well

I hope that I can have some good advices from you.

Regards,

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Re: Embeding apache into an application

Posted by cizaire_liste <ci...@yahoo.com>.
Greg Stein a écrit :
> 
> On Tue, 16 May 2000, cizaire_liste wrote:
> > Hello,
> >
> > I want to embed apache into an already written application
> > (on solaris, linux and NT), by loading it as a shared library,
> > and that raises some points :
> > - how to use apache when my application provides the main
> > (maybe something to do with REALMAIN)
> > - how to prevent apache to fork (but multi threading is ok)
> > (maybe something to do with MULTITHREAD but I am not sure it
> > is handled on unix)
> > - how to get the http requests
> > (maybe something like a mod_... to develop)
> > - what is the minimal configuration
> > - how to do it well
> >
> > I hope that I can have some good advices from you.
> 
> Apache is not designed for this at all. It presumes that it has control
> over the process, its threads, the main loop, etc.
> 
> I'm not sure what the advantage of embedding Apache would be. What are you
> actually trying to do? Somehow control the embedded app?
I have an application that is a distributed objects integration platform 
(nice isn't it :) ). And I like to add an object that is able to
translate 
http request into platform requests. So I need to embed an httpd into 
this object, as the apache main is prety small, robust, efficient and 
broadly used. So I feel enough confident in it to use it, except 
the raised points, an other solution can be to build an IPC between
apache 
and the platform but I do prefer to embed it if possible.

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Re: Embeding apache into an application

Posted by Greg Stein <gs...@lyra.org>.
On Tue, 16 May 2000, cizaire_liste wrote:
> Hello,
> 
> I want to embed apache into an already written application 
> (on solaris, linux and NT), by loading it as a shared library, 
> and that raises some points :
> - how to use apache when my application provides the main
> (maybe something to do with REALMAIN)
> - how to prevent apache to fork (but multi threading is ok)
> (maybe something to do with MULTITHREAD but I am not sure it
> is handled on unix)
> - how to get the http requests
> (maybe something like a mod_... to develop)
> - what is the minimal configuration
> - how to do it well
> 
> I hope that I can have some good advices from you.

Apache is not designed for this at all. It presumes that it has control
over the process, its threads, the main loop, etc.

I'm not sure what the advantage of embedding Apache would be. What are you
actually trying to do? Somehow control the embedded app?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/