You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alex Karasulu <ao...@bellsouth.net> on 2005/02/02 07:16:28 UTC

[OT] [Trivia] How big is our code base?

I got curious after Emmanuel asked me how big our code base was.  I took 
a guess and figured the whole directory project probably had like 200K 
lines of code in it.  Emmanuel guessed like 250K lines.  It nagged me a 
little cuz we really had no clue so I wrote and checked in a script to 
occationally report the number of lines within each trunk.  Here's what 
the first run reported:

lines of code in ./ldap/trunk = 99386
lines of code in ./naming/trunk = 15850
lines of code in ./apacheds/trunk = 63578
lines of code in ./asn1/trunk = 30759
lines of code in ./sandbox/trunk = 3630
lines of code in ./ntp/trunk = 1618
lines of code in ./apseda/trunk = 15177
lines of code in ./kerberos/trunk = 12947
lines of code in ./dns/trunk = 4242
lines of code in ./changepw/trunk = 2291
lines of code in ./network/trunk = 14353
lines of code in ./protocol/trunk = 583
lines of code in ./dhcp/trunk = 4911
lines of code in ./authx/trunk = 8071
Total: 277396

I was a little shocked to see these numbers.  That's a boat load - this 
is mostly from 16 months of incubation.  I guess we were both off a 
little bit.  Overall too much code is a bad thing so this number might 
not be something to be proud of.  However note that a lot of code within 
the ldap and apacheds trunks is generated by antlr and the directory 
plugin.  It would be interesting to see just how much hmmmm....

-Alex

Re: [OT] [Trivia] How big is our code base?

Posted by Emmanuel Lecharny <el...@iktek.com>.
WC rules !

NB : All your code base are belong to us...

Le mercredi 02 février 2005 à 01:26 -0500, Alex Karasulu a écrit :
> --------------------------------------------------------
> Total: 250201                                                 90.20%
> 
> So Emmanuel either you ran a wc on the code or you're really good at 
> guessing how many jelly beans are in a jar.
> 
> -Alex
> 
> 
> 



Re: [OT] [Trivia] How big is our code base?

Posted by Alex Karasulu <ao...@bellsouth.net>.
Alex Karasulu wrote:

> I got curious after Emmanuel asked me how big our code base was.  I 
> took a guess and figured the whole directory project probably had like 
> 200K lines of code in it.  Emmanuel guessed like 250K lines.  It 
> nagged me a little cuz we really had no clue so I wrote and checked in 
> a script to occationally report the number of lines within each 
> trunk.  Here's what the first run reported:
>
> lines of code in ./ldap/trunk = 99386
> lines of code in ./naming/trunk = 15850
> lines of code in ./apacheds/trunk = 63578
> lines of code in ./asn1/trunk = 30759
> lines of code in ./sandbox/trunk = 3630
> lines of code in ./ntp/trunk = 1618
> lines of code in ./apseda/trunk = 15177
> lines of code in ./kerberos/trunk = 12947
> lines of code in ./dns/trunk = 4242
> lines of code in ./changepw/trunk = 2291
> lines of code in ./network/trunk = 14353
> lines of code in ./protocol/trunk = 583
> lines of code in ./dhcp/trunk = 4911
> lines of code in ./authx/trunk = 8071
> Total: 277396
>
> I was a little shocked to see these numbers.  That's a boat load - 
> this is mostly from 16 months of incubation.  I guess we were both off 
> a little bit.  Overall too much code is a bad thing so this number 
> might not be something to be proud of.  However note that a lot of 
> code within the ldap and apacheds trunks is generated by antlr and the 
> directory plugin.  It would be interesting to see just how much hmmmm....

Ok here's what we get after blowing away all the target directories 
where generated code is deposited:

(% on RHS is the amount of code that is hand written)

lines of code in ./ldap/trunk = 95101               95.69%
lines of code in ./naming/trunk = 15850          100.00%
lines of code in ./apacheds/trunk = 44675        70.27%
lines of code in ./asn1/trunk = 26752               86.97%
lines of code in ./sandbox/trunk = 3630         100.00%
lines of code in ./ntp/trunk = 1618                 100.00%
lines of code in ./apseda/trunk = 15177         100.00%
lines of code in ./kerberos/trunk = 12947      100.00%
lines of code in ./dns/trunk = 4242                100.00%
lines of code in ./changepw/trunk = 2291      100.00%
lines of code in ./network/trunk = 14353       100.00%
lines of code in ./protocol/trunk = 583           100.00%
lines of code in ./dhcp/trunk = 4911              100.00%
lines of code in ./authx/trunk = 8071              100.00%
--------------------------------------------------------
Total: 250201                                                 90.20%

So Emmanuel either you ran a wc on the code or you're really good at 
guessing how many jelly beans are in a jar.

-Alex



Re: [OT] [Trivia] How big is our code base?

Posted by Enrique Rodriguez <er...@apache.org>.
Vincent Tence wrote:
>>> 2)  Move LDAP to MINA.  NTP, Kerberos, DNS, Changepw, and DHCP currently
>>> all uni-jar with MINA.  We of course want to have LDAP on MINA and 
>>> Trustin has this for February.
>>>
>> ++++1
> 
> 
> Could you elaborate a bit more on this for my own comprehension. Thanks.

You should be able to go into any one of the protocol directories and 
with a similar set of commands do something like:

bash-2.05b# cd org.apache.directory/ntp/trunk/
bash-2.05b# maven -o multiproject:install
bash-2.05b# cd main/
bash-2.05b# maven -o javaapp:jar
bash-2.05b# java -jar target/ntp-0.4-SNAPSHOT.jar
Apache NTP listening on port 123

All of the protocols (NTP, Kerberos, DNS, Changepw, and DHCP) except 
LDAP will do this and they do it with MINA.  Since LDAP is now the 
anomaly, I was suggesting that it be a target for an update soon.  The 
main benefit being that if you grok one of the simple protocols, like 
NTP, you can move up to DNS, Changepw, or DHCP and on to Kerberos and 
LDAP.  Similarly, to the rest of my email, I have worked to keep the 
component and package layout the same.  I don't think it is yet stable, 
the convention, but when it is I will be sure to add a page to the website.

Note #1:  I could make javaapp:jar the default target in main but I 
don't since it adds a lot of time to build some of the larger protocols.

Note #2:  on Linux NTP is using port 123 by default so you might see a 
java.net.SocketException, in which case just 'service ntpd stop' prior 
to executing the jar.

> 
>>> 3)  Consolidate ASN.1.  LDAP and Kerberos use different ASN.1 codebases,
>>> a result of their independent development.  We've discussed this and of
>>> course work has begun.
>>
>>
>>
>> ++++1
> 
> 
> +1
> 
> - Vincent

Re: [OT] [Trivia] How big is our code base?

Posted by Vincent Tence <vt...@videotron.ca>.
>> 1)  Move all the protocol providers into their own folder, including
>> LDAP.  This would remove NTP, Kerberos, DNS, Changepw, and DHCP from the
>> top level.  Within each of these subprojects I further propose to keep
>> the component and package layout the same.  Right now I have been using
>> core, main, and protocol.  It would be great to get LDAP and the other
>> protocols into a unified convention.
> 
> 
> Absolutely ++++1 to that.

+1

>> 2)  Move LDAP to MINA.  NTP, Kerberos, DNS, Changepw, and DHCP currently
>> all uni-jar with MINA.  We of course want to have LDAP on MINA and 
>> Trustin has this for February.
>>
> ++++1

Could you elaborate a bit more on this for my own comprehension. Thanks.

>> 3)  Consolidate ASN.1.  LDAP and Kerberos use different ASN.1 codebases,
>> a result of their independent development.  We've discussed this and of
>> course work has begun.
> 
> 
> ++++1

+1

- Vincent

Re: [OT] [Trivia] How big is our code base?

Posted by Alex Karasulu <ao...@bellsouth.net>.
I agree with all of this - I'm really glad someone took the inititive to 
stand up and lead us to a better path.  All the +++1's are inline.

Enrique Rodriguez wrote:

> Alex, Trustin,
>
> In light of the size of the codebase, this is a good time to take a step
> back and review the conceptual homogeneity of the component and package
> layout.  Some suggestions:

Good advice true - I was getting a bit worried about the size.

>
> 1)  Move all the protocol providers into their own folder, including
> LDAP.  This would remove NTP, Kerberos, DNS, Changepw, and DHCP from the
> top level.  Within each of these subprojects I further propose to keep
> the component and package layout the same.  Right now I have been using
> core, main, and protocol.  It would be great to get LDAP and the other
> protocols into a unified convention.

Absolutely ++++1 to that.

>
> 2)  Move LDAP to MINA.  NTP, Kerberos, DNS, Changepw, and DHCP currently
> all uni-jar with MINA.  We of course want to have LDAP on MINA and 
> Trustin has this for February.
>
++++1

> 3)  Consolidate ASN.1.  LDAP and Kerberos use different ASN.1 codebases,
> a result of their independent development.  We've discussed this and of
> course work has begun.

++++1

>
> 4)  Break out a kerberos-common.  Right now changepw depends on
> kerberos-core, which is one big package.  In the future kerberos-common
> could also be used for kerberos and changepw clients.

Yeah I see what you mean.  This is similar to the way we have LDAP 
partitioned right now.  There's the ldap trunk with common library code 
and clients and other pieces of the puzzle for LDAP.  Then you have the 
server core and then the server protocol that talks LDAP over the wire 
in the apacheds side.  This approach you are suggesting makes even more 
sense than the LDAP case because you have other protocols that depend on 
the Kerberos common and utilties classes you have such as changepw.  
Plus other protocols that are unrelated like DNS or LDAP will need to 
depend on this kerberos common library.  It will be nice to depend on 
this and not have deps on the ApacheDS Kerberos service.

Yeah this is definately a good route to go.

++++1

> To reiterate:
> Enrique:    move protocols to protocols dir.
> Alex:       break out LDAP protocol, move to protocols dir.

fine by me

> Trustin:    convert LDAP to MINA, adopt package conventions.
> Alex et al: new ASN.1 library.

yep I think we have some help with this thanks to Emmanuel and perhaps 
even Allan

> Alex et al: move LDAP to new ASN.1 library.

no problem

> Enrique:    move Kerberos and Changepw to new ASN.1 library.
> Enrique:    break out kerberos-common and update kerberos and changepw.
>
> Other than the ASN.1 library, the rest should be easy to do this month.

Perhaps we can fit it all in ;)  - I'd love to release a 0.9 that has 
serious performance and feature advances in the next one or two months.  
We want to release often.

>
> -enrique
>
>
> Alex Karasulu wrote:
>
>> I got curious after Emmanuel asked me how big our code base was.  I 
>> took a guess and figured the whole directory project probably had 
>> like 200K lines of code in it.  Emmanuel guessed like 250K lines.  It 
>> nagged me a little cuz we really had no clue so I wrote and checked 
>> in a script to occationally report the number of lines within each 
>> trunk.  Here's what the first run reported:
>>
>> lines of code in ./ldap/trunk = 99386
>> lines of code in ./naming/trunk = 15850
>> lines of code in ./apacheds/trunk = 63578
>> lines of code in ./asn1/trunk = 30759
>> lines of code in ./sandbox/trunk = 3630
>> lines of code in ./ntp/trunk = 1618
>> lines of code in ./apseda/trunk = 15177
>> lines of code in ./kerberos/trunk = 12947
>> lines of code in ./dns/trunk = 4242
>> lines of code in ./changepw/trunk = 2291
>> lines of code in ./network/trunk = 14353
>> lines of code in ./protocol/trunk = 583
>> lines of code in ./dhcp/trunk = 4911
>> lines of code in ./authx/trunk = 8071
>> Total: 277396
>>
>> I was a little shocked to see these numbers.  That's a boat load - 
>> this is mostly from 16 months of incubation.  I guess we were both 
>> off a little bit.  Overall too much code is a bad thing so this 
>> number might not be something to be proud of.  However note that a 
>> lot of code within the ldap and apacheds trunks is generated by antlr 
>> and the directory plugin.  It would be interesting to see just how 
>> much hmmmm....
>>
>> -Alex
>
>
>


Re: [OT] [Trivia] How big is our code base?

Posted by Enrique Rodriguez <er...@apache.org>.
Alex, Trustin,

In light of the size of the codebase, this is a good time to take a step
back and review the conceptual homogeneity of the component and package
layout.  Some suggestions:

1)  Move all the protocol providers into their own folder, including
LDAP.  This would remove NTP, Kerberos, DNS, Changepw, and DHCP from the
top level.  Within each of these subprojects I further propose to keep
the component and package layout the same.  Right now I have been using
core, main, and protocol.  It would be great to get LDAP and the other
protocols into a unified convention.

2)  Move LDAP to MINA.  NTP, Kerberos, DNS, Changepw, and DHCP currently
all uni-jar with MINA.  We of course want to have LDAP on MINA and 
Trustin has this for February.

3)  Consolidate ASN.1.  LDAP and Kerberos use different ASN.1 codebases,
a result of their independent development.  We've discussed this and of
course work has begun.

4)  Break out a kerberos-common.  Right now changepw depends on
kerberos-core, which is one big package.  In the future kerberos-common
could also be used for kerberos and changepw clients.

To reiterate:
Enrique:    move protocols to protocols dir.
Alex:       break out LDAP protocol, move to protocols dir.
Trustin:    convert LDAP to MINA, adopt package conventions.
Alex et al: new ASN.1 library.
Alex et al: move LDAP to new ASN.1 library.
Enrique:    move Kerberos and Changepw to new ASN.1 library.
Enrique:    break out kerberos-common and update kerberos and changepw.

Other than the ASN.1 library, the rest should be easy to do this month.

-enrique


Alex Karasulu wrote:
> I got curious after Emmanuel asked me how big our code base was.  I took 
> a guess and figured the whole directory project probably had like 200K 
> lines of code in it.  Emmanuel guessed like 250K lines.  It nagged me a 
> little cuz we really had no clue so I wrote and checked in a script to 
> occationally report the number of lines within each trunk.  Here's what 
> the first run reported:
> 
> lines of code in ./ldap/trunk = 99386
> lines of code in ./naming/trunk = 15850
> lines of code in ./apacheds/trunk = 63578
> lines of code in ./asn1/trunk = 30759
> lines of code in ./sandbox/trunk = 3630
> lines of code in ./ntp/trunk = 1618
> lines of code in ./apseda/trunk = 15177
> lines of code in ./kerberos/trunk = 12947
> lines of code in ./dns/trunk = 4242
> lines of code in ./changepw/trunk = 2291
> lines of code in ./network/trunk = 14353
> lines of code in ./protocol/trunk = 583
> lines of code in ./dhcp/trunk = 4911
> lines of code in ./authx/trunk = 8071
> Total: 277396
> 
> I was a little shocked to see these numbers.  That's a boat load - this 
> is mostly from 16 months of incubation.  I guess we were both off a 
> little bit.  Overall too much code is a bad thing so this number might 
> not be something to be proud of.  However note that a lot of code within 
> the ldap and apacheds trunks is generated by antlr and the directory 
> plugin.  It would be interesting to see just how much hmmmm....
> 
> -Alex