Friday, 21 September 2012

Openldap2.4 performance boosting

According to my experience, the single directive you should add to db section to improve performance is:

olcDbCacheSize

OpenLDAP tuning guide covers that in section: 21.4.2.

To enable a 200000 entries cachesize use this ldif:

The enumeration of the whole directory (150000 entries) took 15 seconds without cachesize and less than 6 seconds with it.

Thursday, 20 September 2012

Instant logger replacement to logback in activemq.5.6.0

In activemq-5.6.0 changing logger to logback is just a matter of seconds:
  • Copy the following jar in ${activemq.base}/lib:
    logback-access-1.0.0.jar
    logback-classic-1.0.0.jar
    
  • Create a logback.xml file in ${activemq.base}/conf, for example:

That's all.

What about the activemq logback logging to a jms system which is activemq?

Tuesday, 4 September 2012

Ppolicy overlay password checking module

How about having openldap-2.4 checking whether the changed password is digit-only or alpha-only and than rejecting it?

It could be done with the non-standard password checking module openldap extension, which requires to create a C file with your rules, compile as a shared object and put in a well-known location.

I wrote a step-by-step recipe with a template C file at:
https://github.com/francescm/ppolicy-check-password

Friday, 25 May 2012

akka, camel and jruby

After reading Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors by Venkat Subramaniam I tried my first akka project in jruby.

To be somehow useful, it had to cope with true messaging (ActiveMQ), so the choice for the glue technology was Apache Camel and Spring.
The hardest part was:
  • getting right the header  (schema and namespace definition) in camel-context.xml. The matter is akka changed namespace at least twice;
  • gathering all dependecies. In fact I didn't use maven or similar so I had to search all jars nearly one by one.
You can have a look at the resulting code at: https://github.com/francescm/akka-camel-jruby