You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@algroup.co.uk> on 1998/05/15 20:39:22 UTC

Apache++

I have been asked to post the following. Please note that this is
intended to be an experiment, perhaps leading to a 2.0 candidate, not
some kind of splinter group.


Apache++ was initiated to demonstrate that C++ is a viable (even
preferred) alternative to C to implement a correct, reliable, high
performance, portable web server based on Apache.

Interested parties are invited to join the Apache++ mailing list. Send
mail to apache-plusplus-help@lists.aldigital.co.uk for more information.


Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: Apache++

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> To be honest, I would rather see this, and some of the other discussion
> and coding we're having (and will have) on an "apache-ng" mailing list
> hosted @apache.org... 

I don't have any particular objection to this - I only put it where it
is coz I had a mailing list server built for another purpose.

> well actually I wouldn't mind seeing it on
> new-httpd, but I figure that it's easier to get folks to join into
> something that doesn't start off with a high volume of unrelated mail :)

Err, yeah. Also, if you want to discuss something like C++ it helps to
do it where you don't get flamed every time you open your mouth :-)

> >From my point of view, the main thing C++ has to offer is an alternative
> API.  The rest (high performance, reliable, correct) is just a small
> matter of coding, and can be done just as easily in C++ as in C (although
> I reserve the right to bitch about lameness caused by C++ compilers
> inserting extra code to do indirect function calls,

Perhaps if we bitch enough someone will fix them...

> and if anyone so much
> as blinks at multiple inheritance, I'll strangle you ;)

Absolutely. I'll help.

> As far as portability goes, the platforms I'm interested in is essentially
> limited to the most recent stable versions of Linux, FreeBSD, Solaris,
> HPUX, and OSF/1.  For all of those we know we have g++.  There's WIN32
> where we know we have MSVC.  I don't really care about anything else,
> because folks shouldn't be running high-end webservers on them... we could
> always spin off apache 1.x to a group of folks that need to maintain it
> for "legacy" systems.  Kind of a radical opinion I suppose, and I wouldn't
> mind hearing from our "obscure" system folks (i.e. Martin, Mark Bixby, the
> IBM folks that popped up several months ago regarding some switching
> system they're using apache with...) ... the main thing that needs to be
> decided on is which subset of C++ we could use and still get working
> compilers on those systems.
> 
> That said, I'll go join your mailing list so I can bitch and moan and
> figure out how to integrate my NSPR work with your C++ work.

Cool - we seem to be converging - current theory seems to be that NSPR
is the correct starting point.

> i.e. I'm "in" on the C++ bandwagon... if only because I don't feel like
> arguing every time a "C++ can do it better than C!" post is made :)

Gosh!

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: Apache++

Posted by Dean Gaudet <dg...@arctic.org>.
To be honest, I would rather see this, and some of the other discussion
and coding we're having (and will have) on an "apache-ng" mailing list
hosted @apache.org... well actually I wouldn't mind seeing it on
new-httpd, but I figure that it's easier to get folks to join into
something that doesn't start off with a high volume of unrelated mail :)

>From my point of view, the main thing C++ has to offer is an alternative
API.  The rest (high performance, reliable, correct) is just a small
matter of coding, and can be done just as easily in C++ as in C (although
I reserve the right to bitch about lameness caused by C++ compilers
inserting extra code to do indirect function calls, and if anyone so much
as blinks at multiple inheritance, I'll strangle you ;) 

As far as portability goes, the platforms I'm interested in is essentially
limited to the most recent stable versions of Linux, FreeBSD, Solaris,
HPUX, and OSF/1.  For all of those we know we have g++.  There's WIN32
where we know we have MSVC.  I don't really care about anything else,
because folks shouldn't be running high-end webservers on them... we could
always spin off apache 1.x to a group of folks that need to maintain it
for "legacy" systems.  Kind of a radical opinion I suppose, and I wouldn't
mind hearing from our "obscure" system folks (i.e. Martin, Mark Bixby, the
IBM folks that popped up several months ago regarding some switching
system they're using apache with...) ... the main thing that needs to be
decided on is which subset of C++ we could use and still get working
compilers on those systems.

That said, I'll go join your mailing list so I can bitch and moan and
figure out how to integrate my NSPR work with your C++ work. 

i.e. I'm "in" on the C++ bandwagon... if only because I don't feel like
arguing every time a "C++ can do it better than C!" post is made :)

Dean

On Fri, 15 May 1998, Ben Laurie wrote:

> I have been asked to post the following. Please note that this is
> intended to be an experiment, perhaps leading to a 2.0 candidate, not
> some kind of splinter group.
> 
> 
> Apache++ was initiated to demonstrate that C++ is a viable (even
> preferred) alternative to C to implement a correct, reliable, high
> performance, portable web server based on Apache.
> 
> Interested parties are invited to join the Apache++ mailing list. Send
> mail to apache-plusplus-help@lists.aldigital.co.uk for more information.
> 
> 
> Cheers,
> 
> Ben.
> 
> -- 
> Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
> Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
> and Technical Director|Email: ben@algroup.co.uk |
> A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
> London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache
> 


Re: Apache++

Posted by Dean Gaudet <dg...@arctic.org>.

On Sat, 16 May 1998, Mike Belshe wrote:

> An interesting datapoint would be to try taking the Apache code base and just
> running it through a C++ compiler.  The stronger type checking will require some
> massaging to make the code compile, I'm sure.  But I'll bet it catches at least
> 3-5 real bugs without any changes to actual code.

I doubt it would catch anything without more agressive use of C++ typing
features.  Apache passes the various lint-like warnings that "gcc -Wall
-O" and other compilers give.  In fact I think someone did send us a patch
once which made the entire server compile under C++ and they only had to
fix the "pool" as-typedef vs. "pool" as-variable issues. 

Dean


Re: Apache++

Posted by Mike Belshe <mb...@netscape.com>.
> A shift to C++ would cause even more pain. I for one have resisted bending
> my head around C++ for years...just too much effort for little return in
> my busy day. (Ok, so I can read/write it if needed - but uggh, which class
> libraries was that code written with ?)
>
> The result of any change to C++ would be to drag the public (programmer)
> support down a bit. Lots of people will take my view - and not bother with
> trying to get a grip on a new core source tree. That means that the review
> process will be weakened - a fundamentally bad idea for the project, even
> if the technical foundation is theoretically (or actually) stronger.

Adding my opinion on this subject...

I think you are assuming that there are lots of C programmers out there that
simply cannot or refuse to grasp C++.  This assertion is often used as a reason to
stay with C over C++.  In fact, I have even used this argument in the past :-)
But, the reality is that the two are similar enough that C programmers can easily
make the transition.  Since C and C++ interoperate very well, C programmers can
chose to bite of as much or as little of C++ as they like  As long as this is
allowed during the migration process (which it would certainly have to because of
the volume of existing work in C), then moving to C++ is not that big of a deal.
And reading/debugging C++ code from a pure C point of view is just not that hard..

This is basically the "most programmers are to stupid to grok C++" argument.  When
you dig under that argument, you generally find a programmer who has just never
tried C++...  (I don't mean to flame anyone here- in my experience this is true)
However, once you have some C++ code in the product, you'll likely find that C
programmers are not burdened by it at all.  This is how I learned C++, and it was
not difficult.  There are a lot of other more interesting things to consider with
a transition from C to C++, I recommend ignoring this non-problem.

An interesting datapoint would be to try taking the Apache code base and just
running it through a C++ compiler.  The stronger type checking will require some
massaging to make the code compile, I'm sure.  But I'll bet it catches at least
3-5 real bugs without any changes to actual code.

Mike



Re: Apache++

Posted by Ben Laurie <be...@algroup.co.uk>.
Ron O'Hara wrote:
> 
> On Sat, 16 May 1998, Ben Laurie wrote:
> 
> > Ron O'Hara wrote:
> > >
> > > Ben,
> > >
> > > My uncolicited comment on the C++ v/s C question is this.
> > >
> > > Try to get a head count (rough estimate) of the people who can
> > > read/inspect/debug code written in C++ and in C.
> > >
> > > I dont have any numbers but it's a safe bet that 'C' programmers are more
> > > plentiful - after all, all C++ programmers can write C, but the reverse is
> > > not true.
> > >
> > > The size of the developer/review population is an important element in any
> > > Open Source project.
> > >
> > > Proposing the use of C++ is proposing a reduction in the manpower
> > > available to support Apache.. This directly undermines one of the main
> > > strengths behind the development method of the Apache group.
> > >
> > > For my $0.02, thats a bad idea. It outweighs any technical advantage of
> > > one language over another.
> >
> > If I were to buy that argument I'd be forced to suggest we write Apache
> > in Visual Basic or Perl.
> >
> > I certainly agree that the number of people who can read and write the
> > code is important, but it isn't the only factor.
> >
> > I would also argue that only the core C++ needs truly competent C++
> > programmers. Stuff around the edges can be done by those who are not
> > completely au fait with C++, just as already happens with C.
> >
> > Cheers,
> >
> > Ben.
> 
> Aw... really - VB or Perl...not technically suitable for high performance
> tuned system level stuff like Apache.

Ah, right, so when you said "it outweighs any technical advantage of one
language over another", that wasn't really what you meant, right? So
what did you mean?

> I dont dispute many of the arguments you present for C++ over C from a
> technical perspective. I just make the point that in the tools available
> for building Apache, C is the lowest common denominator. It is powerful
> (and fragile), and has the widest 'people' support.
> 
> As you know changing any basic tactic in an established product is only
> achieved with a degree of pain. Look at the symbol hiding changes (which I
> personally needed) - its a good change but will cause lots of grief when
> 1.3.0 is released. I'm still working on the impact to the modules I have.
> 
> A shift to C++ would cause even more pain. I for one have resisted bending
> my head around C++ for years...just too much effort for little return in
> my busy day. (Ok, so I can read/write it if needed - but uggh, which class
> libraries was that code written with ?)

This doesn't surprise me. Everyone I know who thinks C++ is a waste of
time doesn't actually know how to write C++. And, strangely, everyone I
know who can write C++ thinks it is a large improvement over C.

> The result of any change to C++ would be to drag the public (programmer)
> support down a bit. Lots of people will take my view - and not bother with
> trying to get a grip on a new core source tree. That means that the review
> process will be weakened - a fundamentally bad idea for the project, even
> if the technical foundation is theoretically (or actually) stronger.
> 
> Still only my $0.02 - but probably shared by good percentage of the Apache
> users around the world. My key point is that the peer review element is
> one of the powerful components that makes Apache (and Linux, PostgreSQL
> etc) work well. Weakening that for technical arguments that are not 'show
> stoppers' is a bad idea.

If this were really the way of the world we'd all still be programming
in assembler, there'd be no operating systems, the Internet wouldn't
exist, yadda yadda.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: Apache++

Posted by Ron O'Hara <ro...@pen.sentuny.com.au>.

On Sat, 16 May 1998, Ben Laurie wrote:

> Ron O'Hara wrote:
> > 
> > Ben,
> > 
> > My uncolicited comment on the C++ v/s C question is this.
> > 
> > Try to get a head count (rough estimate) of the people who can
> > read/inspect/debug code written in C++ and in C.
> > 
> > I dont have any numbers but it's a safe bet that 'C' programmers are more
> > plentiful - after all, all C++ programmers can write C, but the reverse is
> > not true.
> > 
> > The size of the developer/review population is an important element in any
> > Open Source project.
> > 
> > Proposing the use of C++ is proposing a reduction in the manpower
> > available to support Apache.. This directly undermines one of the main
> > strengths behind the development method of the Apache group.
> > 
> > For my $0.02, thats a bad idea. It outweighs any technical advantage of
> > one language over another.
> 
> If I were to buy that argument I'd be forced to suggest we write Apache
> in Visual Basic or Perl.
> 
> I certainly agree that the number of people who can read and write the
> code is important, but it isn't the only factor.
> 
> I would also argue that only the core C++ needs truly competent C++
> programmers. Stuff around the edges can be done by those who are not
> completely au fait with C++, just as already happens with C.
> 
> Cheers,
> 
> Ben.

Aw... really - VB or Perl...not technically suitable for high performance
tuned system level stuff like Apache.

I dont dispute many of the arguments you present for C++ over C from a
technical perspective. I just make the point that in the tools available
for building Apache, C is the lowest common denominator. It is powerful
(and fragile), and has the widest 'people' support.

As you know changing any basic tactic in an established product is only
achieved with a degree of pain. Look at the symbol hiding changes (which I
personally needed) - its a good change but will cause lots of grief when
1.3.0 is released. I'm still working on the impact to the modules I have.

A shift to C++ would cause even more pain. I for one have resisted bending
my head around C++ for years...just too much effort for little return in
my busy day. (Ok, so I can read/write it if needed - but uggh, which class
libraries was that code written with ?)

The result of any change to C++ would be to drag the public (programmer)
support down a bit. Lots of people will take my view - and not bother with
trying to get a grip on a new core source tree. That means that the review
process will be weakened - a fundamentally bad idea for the project, even
if the technical foundation is theoretically (or actually) stronger.

Still only my $0.02 - but probably shared by good percentage of the Apache
users around the world. My key point is that the peer review element is
one of the powerful components that makes Apache (and Linux, PostgreSQL
etc) work well. Weakening that for technical arguments that are not 'show
stoppers' is a bad idea.

Anyway - last word is yours..and then I think we should let this thread
die.

Regards
Ron O'Hara 


> 
> -- 
> Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
> Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
> and Technical Director|Email: ben@algroup.co.uk |
> A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
> London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache
> 


Re: Apache++

Posted by Ben Laurie <be...@algroup.co.uk>.
Ron O'Hara wrote:
> 
> Ben,
> 
> My uncolicited comment on the C++ v/s C question is this.
> 
> Try to get a head count (rough estimate) of the people who can
> read/inspect/debug code written in C++ and in C.
> 
> I dont have any numbers but it's a safe bet that 'C' programmers are more
> plentiful - after all, all C++ programmers can write C, but the reverse is
> not true.
> 
> The size of the developer/review population is an important element in any
> Open Source project.
> 
> Proposing the use of C++ is proposing a reduction in the manpower
> available to support Apache.. This directly undermines one of the main
> strengths behind the development method of the Apache group.
> 
> For my $0.02, thats a bad idea. It outweighs any technical advantage of
> one language over another.

If I were to buy that argument I'd be forced to suggest we write Apache
in Visual Basic or Perl.

I certainly agree that the number of people who can read and write the
code is important, but it isn't the only factor.

I would also argue that only the core C++ needs truly competent C++
programmers. Stuff around the edges can be done by those who are not
completely au fait with C++, just as already happens with C.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: Apache++

Posted by Ron O'Hara <ro...@pen.sentuny.com.au>.
Ben,

My uncolicited comment on the C++ v/s C question is this.


Try to get a head count (rough estimate) of the people who can
read/inspect/debug code written in C++ and in C.

I dont have any numbers but it's a safe bet that 'C' programmers are more
plentiful - after all, all C++ programmers can write C, but the reverse is
not true.

The size of the developer/review population is an important element in any
Open Source project.

Proposing the use of C++ is proposing a reduction in the manpower
available to support Apache.. This directly undermines one of the main
strengths behind the development method of the Apache group.

For my $0.02, thats a bad idea. It outweighs any technical advantage of
one language over another.

Regards
Ron O'Hara

On Fri, 15 May 1998, Ben Laurie wrote:

> I have been asked to post the following. Please note that this is
> intended to be an experiment, perhaps leading to a 2.0 candidate, not
> some kind of splinter group.
> 
> 
> Apache++ was initiated to demonstrate that C++ is a viable (even
> preferred) alternative to C to implement a correct, reliable, high
> performance, portable web server based on Apache.
> 
> Interested parties are invited to join the Apache++ mailing list. Send
> mail to apache-plusplus-help@lists.aldigital.co.uk for more information.
> 
> 
> Cheers,
> 
> Ben.
> 
> -- 
> Ben Laurie            |Phone: +44 (181) 735 0686|  Apache Group member
> Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
> and Technical Director|Email: ben@algroup.co.uk |
> A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
> London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache
>