C libraries

pll at lanminds.com pll at lanminds.com
Fri Feb 7 14:35:13 EST 2003


In a message dated: Fri, 07 Feb 2003 13:55:26 EST
Erik Price said:

>I have recently encountered something called the Apache Portable Runtime 
>library.  Would this be used in place of, say glibc, or in addition to? 
>  And is the goal of something like this that you try to use it to the 
>exclusion of other libraries as much as possible so that you can be 
>assured that your program will work on any platform that is compatible 
>with the Apache Portable Runtime?
>
>I'm not really so much interested in the APR itself as I am in the whole 
>notion of portable runtimes and issues facing people who want to develop 
>in C.  I know there are some C programmers on this list.  These are not 
>things that I have had to think much about, since I use Java where I 
>work, but I am interested in learning more about C.

The APR is meant as a means of extracting the networking code out 
from the apache server code itself to provide a sense of modularity, 
and, to allow other projects which have a need to use networking code 
re-use this already written work rather than re-writing their own 
networking engine.

For example, CVS, which is the revision control system of choice in 
the Free/Open source world is really nothing more than a bunch of 
shell scripts layered on top of RCS and stuck together with a lot of 
duct tape and chewing gum.  It has no inherent knowledge of a 
network, or of client/server architecture.  Many efforts have been 
made to rectify this situation, however, everyone really knows, deep 
down, that what CVS needs is a complete re-write from the ground up.

Incidently, that's exactly what the Subversion project aims to do; 
write a replacement for CVS.  And, rather than trying to fix the 
brokeness of CVS's networking capability, they decided to chuck it 
all, and write a replacement.  But, rather than write all that 
networking code from scratch, they're using the APR, which already 
has an inherent understanding of things like URL parsing, etc.

So, in this case, APR is serving as a drop in replacement for what 
the Subversion team would otherwise need to write themselves.

I think the term "portable runtime" is a little misleading in this 
sense.  You still need to compile your code with APR.  It's portable 
I think, in that it's not restricted for any one particular use, like 
a web server.   I recommend reading the APR docs at the apache web 
site for a better understanding of what it is and how it works.

Also, the Subversion architecture docs might be pretty informative 
about how they're using the APR as well.  You can find subversion 
here:

	http://subversion.tigris.org/

Oh, and no, you never really replace glibc, but you may well use 
other libraries which are wrappers around it.

HTH.
-- 

Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE

	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

	 If you're not having fun, you're not doing it right!





More information about the gnhlug-discuss mailing list