httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: "embeding" apache(-apr)
Date Tue, 27 Apr 1999 21:23:13 GMT
> > My wish - if you can "expose" more internal methods ( as CORE_PRIVATE for
> > example, or just make them non-static). ( I have a small list of methods 
> > I used ).
> The hybrid server is a moving target. I hope your code won't rely on
> too many of the internal details of the server, because it can all
> potentially change.
> But first, what functions do you have in mind?

In my snapshot ( 04/16 ):
In http_main.c:
 server_rec *server_conf;
 pool *pperm;             /* Pool for permananent stuff */
 pool *pconf;		/* Pool for config stuff */
 pool *ptemp;		/* Pool for temporart config stuff */

 int setup_listeners(pool *p)
 void common_init(void)
 void process_socket(pool *p, struct sockaddr *sa_client, int csd, int my_child_num, int my_thread_num)
 void *thread_starter_thread(void *thread_arg) {
 void child_main(int child_num_arg)
 void server_main_loop(int remaining_children_to_start)
 void one_config_cycle(void)

In http_accept.c:
  void *accept_thread(void *dummy)

With the above methods non-static, apache is running fine ( at least on my
Linux ) as a library ( 1 process/multiple threads model, I used the
library from Java - but it can be used from other applications ).
I still have some problems with the threads ( i.e. if Java creates the
threads and calls accept_thread(), everything is great, but I can't let
apr handle the threads).

> I think this would be a great change. It would be cool to have
> pluggable modules that would let us have an XML-based configuration
> module, a "legacy" configration module that supports the 1.3 syntax as
> much as possible, an SNMP-enabled config module that would actually
> return different values back to the server on-the-fly when told to do
> so, etc.

In my tests, everything worked fine except 2 lines in http_core.c
I read the http.conf from Java, and called the ap_handle_command() for
each line. ( I could have read an XML file).

The only problem - http_core calls recursively ap_srm_command_loop(), so
no section can be initialized this way.

> This kind of support (especially the last one) would require some
> serious work, though. I need to read Harrie's post on the subject
> now...
I know, that's way I will not try anything in this area for a while,
but it is not imposible.


View raw message