We’re starting to see feedback from the LDAPCon scattered around the web; all of the sessions were well received and provided a lot of great information. But not all of the important activity happens in the formal sessions; a lot gets done informally much later, after a few rounds of folks’ favorite beverages have been consumed. This year was no different.

While sitting at the hotel bar waiting for people to gather for dinner, I mentioned to Ludo that I’ve got OpenLDAP 2.4.18 running on my Android G1 phone. He immediately wanted to try querying it from the LDAP Address Book on his iPhone. We had a few false starts; my phone was connected to the T-Mobile 3G network and was using a NAT’d IP address so we couldn’t actually use that address to connect. Then we tried both connecting to the hotel Wifi but as the LinuxCon was already in full swing, the network as pretty busy and it was taking too long to get associated. Finally I fired up the trusty little “Wifi Tether for root users” app – a handy Android app that turns the phone into a wifi access point. With that we were able to get Ludo’s phone connected to my wifi network and we were in business. A few seconds later, he had my phone’s IP address entered into his Address Book and presto, we were serving LDAP queries from his Address Book using the slapd running on my phone.

Admittedly the database wasn’t of any impressive size; it just contained the list of LDAPCon speakers and their email addresses. But this demonstration drew the attention of the entire crowd at the bar, and fired the imaginations of everyone at the sight – “what’s the performance like?” “anyone got SLAMD handy on their phone?” “come on, isn’t there an app for that?” “is that going to be available on the Android Market?” “how much is Symas going to charge for supported binaries?” “I knew it, you’re completely mad…”

Well, just for the record – when we said OpenLDAP is the most scalable directory software in the world, we didn’t only mean scaling up. It also scales down, quite easily. In this case the entire memory consumption of the slapd process was only 3MB. (The phone reports that it has 96MB of memory; a typical Android widget like the Calendar or Phone takes ~15MB each.) Now, we’re certainly not going to be setting any world speed records here; the ARM11 CPU in this phone only runs at a nominal speed of 384MHz. (But for completeness’ sake I also have to report that I have an overclocking widget that gooses the processor up to 528MHz….)

Anyway, running the slapd-search test (included in the OpenLDAP test suite) showed we can get a whopping ~110 searches/second with 2 slapd threads, with the client connecting over wifi. Bumping up slapd to 4 server threads didn’t show any appreciable gain, but overclocking got us to about 150 searches/second. Also, the performance didn’t change much at all with the client running on the G1 itself – I guess the difference in network overhead is cancelled out by the client running on the same CPU as the server.

So ok, nobody actually needs their smartphone to be delivering the world’s fastest LDAP directory service either, what is this really good for? Well, right away it opens the door to a fully open, standards-based synchronization mechanism for connecting wireless devices to their corporate/homebase directories. No vendor lock-in, no undocumented data formats or protocols. All you need is OpenLDAP with its multimaster support and you can have scheduled and/or on-demand bi-directional syncing of contact information working quietly and efficiently, out of sight and out of mind. (That’s just the first step, of course, and trivially easy. Where we go next remains to be seen…) Oh of course, to have a proper Android package we’ll also need do provide a Java GUI as well. Fortunately our friends at UnboundID have already got that covered with their Java LDAP SDK already ported to Android.

 

One Response to LDAPCon After Hours: ARM Wrestling

  1. The first time that i tried overcloking over a year ago, my CPU got overheated and got fried..;~

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>