[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: updating a tree from a full dataset

Bjorn Nordbo wrote...:

> I have a program which reads a bunch of router configs, extracts a
> lot of information and writes it to a file database every hour. To
> make the world a better place to live, I'd like to store this infor-
> mation in an LDAP directory instead. However, this makes the current
> update-everything approach very inefficient (the file database has
> about 1500 entries).

so you have a write-often read-once-if-at-all structure..? are you sure 
you want to use LDAP for this..?

> The approach which first comes to mind is to retrieve the entire
> branch from LDAP, compare this to the data recently extracted from
> the router configs and write only changed entries back to LDAP.

you may retrieve entry by entry from LDAP and use ldapmodify to write 
back attributes/values that changed.. improves update speed 
significantly if there aren't much changes in the router-configs, and 
even a bit (or bunch) if there are..

> Are there any better approaches to this? How does it scale if every
> entry has about 20 attributes?

your database is very small, i don't think performance will become a 
problem here.