Brian,
     Okay, thanks for the reply. Sounds like your skeleton code is  
functioning as an adapter between various back-ends.

Cheers,
Nick


On 23/07/2005, at 7:11 PM, Brian Candler wrote:

> On Sat, Jul 23, 2005 at 05:39:44AM +0900, Nick Faiz wrote:
>
>> Hi Brian,
>>     Does ruby-ldapserver have an in memory b-tree?
>>
>
> ruby-ldapserver is a library which handles the protocol operations;  
> how you
> implement the data model is up to you.
>
> There are three sample LDAP servers in the examples/ directory. Two  
> of these
> use a hash of {dn=>{attr=>[vals], attr=>[vals]...}} as their data  
> storage
> (with a YAML file as hard backing). This gives you a fast answer to  
> a 'base'
> search, but a slow answer to a 'subtree' search with filter, since  
> in that
> case it just filters the entire set of entries against your query.  
> If you
> want to write code to index the attributes, you could do so.
>
> The other sample program constructs SQL queries to answer LDAP search
> requests. This will be as fast as your SQL database, but as it's  
> just an
> example, it only handles one type of search: (mail=foo / example.com)
>
> If you *just* want an implementation of the standard LDAP data  
> model then
> you're almost certainly better off running OpenLDAP (and with back- 
> sql, it
> can also give you a fixed mapping between LDAP attributes and SQL  
> columns).
>
> ruby-ldapserver is intended for when you want to build an  
> 'intelligent' LDAP
> server. The reason I wrote it is because I needed a uniform query  
> layer
> where one type of customer is in SQL database 1, and another type of
> customer is in SQL database 2 (with a completely different schema).  
> I use
> ruby-ldapserver as a wrapper for the business logic which maps various
> queries to the appropriate databases.
>
> Regards,
>
> Brian.
>