You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Harrie Hazewinkel <ha...@covalent.net> on 2001/04/12 16:27:19 UTC
[PATCH] mpm_query_2
Hi all,
I have made a new patch for the mpm_query functionality.
1) This patch extends the information that can be retrieved.
2) It also allows to return an MPM_TYPE which is a string.
This is used to provide some additional information
about the MPM used. It even could be used by an MPM
developper to provide an arbitrary human readable
string which can be used for management purposes.
3) The AP_MPMQ_IS_FORKED and AP_MPMQ_ISTHREADED now return
a capability. It now can return 3 values:
- NOT_SUPPORTED = 0
- STATIC = 1
- DYNAMIC = 2
This mechanism is to enable other module to figure
out the capabilities for threading and forking.
If one wants to have the same results as previous
(which was not more then a true/false) you can
consider value 0 (not supported) as false and
static and dyniamc true.
There is actually no need to make even a capabilities
value besides the IS_FORKED and IS_THREADED.
The patch is attached (in unified form and does not rely
on the previous mpm_query).
Harrie
--
phone: +39-3474932300
http://www.lisanza.net/
Re: [PATCH] mpm_query_2
Posted by "William A. Rowe, Jr." <ad...@rowe-clan.net>.
Pretty much +1, thanks Harrie. Note that you ought to be using apr_int32_t
for something more explicit. As I've said, I like returning the MPM string.
Suggest we might even have a 'version' for MPM's in that string [subrevision
could be bumped by CVS itself.]
I keep having visions of MPM's that are maintained outside the core, so it
may not be realistic to assume that mpm_foo and apache v2.0.35 correspond.
Bill
From: "Harrie Hazewinkel" <ha...@covalent.net>
Sent: Thursday, April 12, 2001 9:27 AM
> Hi all,
>
> I have made a new patch for the mpm_query functionality.
>
> 1) This patch extends the information that can be retrieved.
> 2) It also allows to return an MPM_TYPE which is a string.
> This is used to provide some additional information
> about the MPM used. It even could be used by an MPM
> developper to provide an arbitrary human readable
> string which can be used for management purposes.
> 3) The AP_MPMQ_IS_FORKED and AP_MPMQ_ISTHREADED now return
> a capability. It now can return 3 values:
> - NOT_SUPPORTED = 0
> - STATIC = 1
> - DYNAMIC = 2
> This mechanism is to enable other module to figure
> out the capabilities for threading and forking.
> If one wants to have the same results as previous
> (which was not more then a true/false) you can
> consider value 0 (not supported) as false and
> static and dyniamc true.
> There is actually no need to make even a capabilities
> value besides the IS_FORKED and IS_THREADED.
>
>
> The patch is attached (in unified form and does not rely
> on the previous mpm_query).
Re: [PATCH] mpm_query_2
Posted by Peter Moore <pe...@cdws.com.au>.
<snip>
>
>You definitly have not understood the use of it.
>But that does not matter. I know you act like the APACHE
>2.0 police.
Even though i don't contribute code (yet) i think that you should really
understand that there are people in this group who understand the way the
core Apache works and they are not going to allow snippets into the
repository just because you think your understanding of the world is better
than the knowledge of the way that Apache works that the rest of the "major
contributors" have.
>
>I now start thinking that the MPM_TYPE should be an MPM_DESCR.
>and for what the ap_show_mpm goes it can use the mpm_query to
>provide the proper values. IMHO, the ap_show_mpm
>is a not wrapper around ap_mpm_query.
>
I have to disagree.....a description and type are a lot different....from
what i have been looking at in the code anyway.
regards
peter
********************************************
Peter Moore
Director
CDWS
ACN 070 000 065
peter@cdws.com.au
http://www.cdws.com.au/
Mobile +61 4 111 86230 (in Aus 04 111 86230)
ICQ 926967 (old) 95022055 (new - Oct 18, 2000)
********************************************
Re: [PATCH] mpm_query_2
Posted by Harrie Hazewinkel <ha...@covalent.net>.
Hi,
If you really want to split it
you should name the functions
ap_mpm_int_query
and
ap_mpm_string_query.
Those are at least names that express the difference
and even allow extensions for the future. Maybe
we don't see them today, but tomorrow is a different
day. :-))
I know I ask now even for to much, but it would be
nice if the configurable values (MAX_DAEMONS
and MAX_THREADS) would be writable.
Harrie
--
phone: +39-3474932300
http://www.lisanza.net/
Re: [PATCH] mpm_query_2
Posted by "William A. Rowe, Jr." <ad...@rowe-clan.net>.
From: <rb...@covalent.net>
Sent: Thursday, April 12, 2001 10:37 AM
> On Thu, 12 Apr 2001, Harrie Hazewinkel wrote:
>
> > rbb@covalent.net wrote:
> > >
> > > On Thu, 12 Apr 2001, Harrie Hazewinkel wrote:
> > >
> > > > Hi all,
> > > >
> > > > I have made a new patch for the mpm_query functionality.
> > > >
> > > > 1) This patch extends the information that can be retrieved.
> > > > 2) It also allows to return an MPM_TYPE which is a string.
> > > > This is used to provide some additional information
> > > > about the MPM used. It even could be used by an MPM
> > > > developper to provide an arbitrary human readable
> > > > string which can be used for management purposes.
> > >
> > > -1 for returning the string from this function. It makes the function
> > > harder to read and to use. If you absolutely must have a way to query the
> > > MPM name, then use a separate function for it. Something like
> > > ap_show_mpm() like Sander suggested yesterday.
> >
> > You definitly have not understood the use of it.
>
> What?!? How have I not understood the use of it? I have simply said that
> adding the ability to return a string from that function makes the code
> unnecessarily ugly. I have suggested using a separate function for
> getting the same information that you want. I am not removing
> functionality, I am asking to make the code and the API simpler.
>
> ap_show_mpm should definately not be a wrapper around ap_mpm_query. if
> you are going to do that, then just don't create ap_show_mpm. The goal is
> to keep the API simple, not to make it overly complex by having two ways
> to get the exact same information.
or ap_mpm_something, since that appears to be the convention.
Yes, I'll +1 adding Harrie's patch (sans string) and a string getname function
as you've suggested.
Unless we have a massive list of other 'string' queries, which I doubt. This
makes both functions more typesafe and simpler.
Re: [PATCH] mpm_query_2
Posted by rb...@covalent.net.
On Thu, 12 Apr 2001, Harrie Hazewinkel wrote:
> rbb@covalent.net wrote:
> >
> > On Thu, 12 Apr 2001, Harrie Hazewinkel wrote:
> >
> > > Hi all,
> > >
> > > I have made a new patch for the mpm_query functionality.
> > >
> > > 1) This patch extends the information that can be retrieved.
> > > 2) It also allows to return an MPM_TYPE which is a string.
> > > This is used to provide some additional information
> > > about the MPM used. It even could be used by an MPM
> > > developper to provide an arbitrary human readable
> > > string which can be used for management purposes.
> >
> > -1 for returning the string from this function. It makes the function
> > harder to read and to use. If you absolutely must have a way to query the
> > MPM name, then use a separate function for it. Something like
> > ap_show_mpm() like Sander suggested yesterday.
>
> You definitly have not understood the use of it.
> But that does not matter. I know you act like the APACHE
> 2.0 police.
>
> I now start thinking that the MPM_TYPE should be an MPM_DESCR.
> and for what the ap_show_mpm goes it can use the mpm_query to
> provide the proper values. IMHO, the ap_show_mpm
> is a not wrapper around ap_mpm_query.
What?!? How have I not understood the use of it? I have simply said that
adding the ability to return a string from that function makes the code
unnecessarily ugly. I have suggested using a separate function for
getting the same information that you want. I am not removing
functionality, I am asking to make the code and the API simpler.
ap_show_mpm should definately not be a wrapper around ap_mpm_query. if
you are going to do that, then just don't create ap_show_mpm. The goal is
to keep the API simple, not to make it overly complex by having two ways
to get the exact same information.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: [PATCH] mpm_query_2
Posted by Harrie Hazewinkel <ha...@covalent.net>.
rbb@covalent.net wrote:
>
> On Thu, 12 Apr 2001, Harrie Hazewinkel wrote:
>
> > Hi all,
> >
> > I have made a new patch for the mpm_query functionality.
> >
> > 1) This patch extends the information that can be retrieved.
> > 2) It also allows to return an MPM_TYPE which is a string.
> > This is used to provide some additional information
> > about the MPM used. It even could be used by an MPM
> > developper to provide an arbitrary human readable
> > string which can be used for management purposes.
>
> -1 for returning the string from this function. It makes the function
> harder to read and to use. If you absolutely must have a way to query the
> MPM name, then use a separate function for it. Something like
> ap_show_mpm() like Sander suggested yesterday.
You definitly have not understood the use of it.
But that does not matter. I know you act like the APACHE
2.0 police.
I now start thinking that the MPM_TYPE should be an MPM_DESCR.
and for what the ap_show_mpm goes it can use the mpm_query to
provide the proper values. IMHO, the ap_show_mpm
is a not wrapper around ap_mpm_query.
>
> > 3) The AP_MPMQ_IS_FORKED and AP_MPMQ_ISTHREADED now return
> > a capability. It now can return 3 values:
> > - NOT_SUPPORTED = 0
> > - STATIC = 1
> > - DYNAMIC = 2
> > This mechanism is to enable other module to figure
> > out the capabilities for threading and forking.
> > If one wants to have the same results as previous
> > (which was not more then a true/false) you can
> > consider value 0 (not supported) as false and
> > static and dyniamc true.
> > There is actually no need to make even a capabilities
> > value besides the IS_FORKED and IS_THREADED.
>
> I like this section. I'll commit it today if I have the time to rip out
> the string handling.
-1 on taking out the string section.
>
> Ryan
>
> _______________________________________________________________________________
> Ryan Bloom rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------
--
phone: +39-3474932300
http://www.lisanza.net/
Re: [PATCH] mpm_query_2
Posted by rb...@covalent.net.
On Thu, 12 Apr 2001, Harrie Hazewinkel wrote:
> Hi all,
>
> I have made a new patch for the mpm_query functionality.
>
> 1) This patch extends the information that can be retrieved.
> 2) It also allows to return an MPM_TYPE which is a string.
> This is used to provide some additional information
> about the MPM used. It even could be used by an MPM
> developper to provide an arbitrary human readable
> string which can be used for management purposes.
-1 for returning the string from this function. It makes the function
harder to read and to use. If you absolutely must have a way to query the
MPM name, then use a separate function for it. Something like
ap_show_mpm() like Sander suggested yesterday.
> 3) The AP_MPMQ_IS_FORKED and AP_MPMQ_ISTHREADED now return
> a capability. It now can return 3 values:
> - NOT_SUPPORTED = 0
> - STATIC = 1
> - DYNAMIC = 2
> This mechanism is to enable other module to figure
> out the capabilities for threading and forking.
> If one wants to have the same results as previous
> (which was not more then a true/false) you can
> consider value 0 (not supported) as false and
> static and dyniamc true.
> There is actually no need to make even a capabilities
> value besides the IS_FORKED and IS_THREADED.
I like this section. I'll commit it today if I have the time to rip out
the string handling.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------