Re: Fast openldap schema parser : completed

2018-06-22 Thread Emmanuel Lécharny


Le 22/06/2018 à 14:04, Radovan Semancik a écrit :
> Hi,
> 
> Good news. It works with AD! ... Of course, for full schema support
> there is still a need for some ugly hacks on client side, as AD does not
> declare matching rules in the schema. I have just lowered log level of
> "no syntax"  log message in Value, as AD cannot be bothered to even
> declare syntaxes and therefore the log files got filled up quite quickly.
> 
> API almost worked with OpenDJ. Looks like someone missed a space in
> OpenDJ schema (just before EQUALITY):
> 
> ( 1.3.6.1.4.1.42.2.27.5.1.10 NAME 'SolarisProfileType' DESC 'Type of
> object defined in profile'EQUALITY caseIgnoreIA5Match SYNTAX
> 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'Solaris Specific' )
> 
> ... therefore I have "fixed" the parser to tolerate this (in relaxed mode).
> 
> OpenLDAP was without any problems (as expected).
> 
> My 389ds and eDir test environment is broken right now. I'll test those
> later.


Many thanks, Radovan ! This is very encouraging !

Hopefully, it will do the job, and way faster than with the antlr parser ;-)

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org



pEpkey.asc
Description: application/pgp-keys


Re: Fast openldap schema parser : completed

2018-06-22 Thread Radovan Semancik

Hi,

Good news. It works with AD! ... Of course, for full schema support 
there is still a need for some ugly hacks on client side, as AD does not 
declare matching rules in the schema. I have just lowered log level of 
"no syntax"  log message in Value, as AD cannot be bothered to even 
declare syntaxes and therefore the log files got filled up quite quickly.


API almost worked with OpenDJ. Looks like someone missed a space in 
OpenDJ schema (just before EQUALITY):


( 1.3.6.1.4.1.42.2.27.5.1.10 NAME 'SolarisProfileType' DESC 'Type of 
object defined in profile'EQUALITY caseIgnoreIA5Match SYNTAX 
1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'Solaris Specific' )


... therefore I have "fixed" the parser to tolerate this (in relaxed mode).

OpenLDAP was without any problems (as expected).

My 389ds and eDir test environment is broken right now. I'll test those 
later.


--
Radovan Semancik
Software Architect
evolveum.com



On 05/16/2018 10:25 AM, Emmanuel Lécharny wrote:

Hi !

I finally committed the new parser. I did my best to have the same 
API, so ou can use it as if it were the previous version, except that 
it does not use AntLR anymore.


The final performance results :

new parser, core schema parsed 100 000 times : 31s
old parser, core schema parsed  10 000 times : 100s

ratio : 32 times faster (it's a bit slower than what I said in my 
previous mails, but I have added various checks that slow down the 
parser - mainly checks on OID validity -.



Radovan, you are free to check with your various LDAP server if the 
code is ok for you, and if not, I'm ready to fix it.


Side notes :
- I'm now using static methods for the various schema parsers, so 
there is no synchronization anymore

- I found *many* errors in the previous implementation...
- the Strict mode is not as strict as it could be : we typically 
accept OID macros (that allows us to have things like "attributeType ( 
MyRootOid:2.3.4 ...)" to be used, where 'MyRootOid' is defined using a 
ObjectIdentifier element. This is ultra convenientt, and does not put 
us at risk.

- The code has been pushed in the API 2.0 branch.

I haven't yet tested Studio with this new code, this is soemthing I'll 
do soon.


Hope you'll find that convenient !





Re: Fast openldap schema parser : completed

2018-05-16 Thread Emmanuel Lecharny
Ok, I have fixed Studio to have it working fine with the modified API.

It seems to be faster to open now (15s when launched from Eclipse, against 21" 
for a previous version).

Stefan, can you confirm that it's the case ?

Thanks !

On 2018/05/16 08:25:42, Emmanuel Lécharny  wrote: 
> Hi !
> 
> I finally committed the new parser. I did my best to have the same API, 
> so ou can use it as if it were the previous version, except that it does 
> not use AntLR anymore.
> 
> The final performance results :
> 
> new parser, core schema parsed 100 000 times : 31s
> old parser, core schema parsed  10 000 times : 100s
> 
> ratio : 32 times faster (it's a bit slower than what I said in my 
> previous mails, but I have added various checks that slow down the 
> parser - mainly checks on OID validity -.
> 
> 
> Radovan, you are free to check with your various LDAP server if the code 
> is ok for you, and if not, I'm ready to fix it.
> 
> Side notes :
> - I'm now using static methods for the various schema parsers, so there 
> is no synchronization anymore
> - I found *many* errors in the previous implementation...
> - the Strict mode is not as strict as it could be : we typically accept 
> OID macros (that allows us to have things like "attributeType ( 
> MyRootOid:2.3.4 ...)" to be used, where 'MyRootOid' is defined using a 
> ObjectIdentifier element. This is ultra convenientt, and does not put us 
> at risk.
> - The code has been pushed in the API 2.0 branch.
> 
> I haven't yet tested Studio with this new code, this is soemthing I'll 
> do soon.
> 
> Hope you'll find that convenient !
> -- 
> Emmanuel Lecharny
> 
> Symas.com
> directory.apache.org
> 
> 


Fast openldap schema parser : completed

2018-05-16 Thread Emmanuel Lécharny

Hi !

I finally committed the new parser. I did my best to have the same API, 
so ou can use it as if it were the previous version, except that it does 
not use AntLR anymore.


The final performance results :

new parser, core schema parsed 100 000 times : 31s
old parser, core schema parsed  10 000 times : 100s

ratio : 32 times faster (it's a bit slower than what I said in my 
previous mails, but I have added various checks that slow down the 
parser - mainly checks on OID validity -.



Radovan, you are free to check with your various LDAP server if the code 
is ok for you, and if not, I'm ready to fix it.


Side notes :
- I'm now using static methods for the various schema parsers, so there 
is no synchronization anymore

- I found *many* errors in the previous implementation...
- the Strict mode is not as strict as it could be : we typically accept 
OID macros (that allows us to have things like "attributeType ( 
MyRootOid:2.3.4 ...)" to be used, where 'MyRootOid' is defined using a 
ObjectIdentifier element. This is ultra convenientt, and does not put us 
at risk.

- The code has been pushed in the API 2.0 branch.

I haven't yet tested Studio with this new code, this is soemthing I'll 
do soon.


Hope you'll find that convenient !
--
Emmanuel Lecharny

Symas.com
directory.apache.org