Yes, I have been using the Net::LDAP lib quite abit...

What I am most interested in is the LDAP replication feature.

Here's what I currently have:

As stated by Netscape "Replication is the mechanism by which directory data is automatically copied from one directory server to another. Using replication, you can copy everything from entire directory trees to individual directory entries between servers."

Once you have configured Netscape LDAP for replication, it updates the:

/usr/netscape/server4/slapd-Directory/changelogdb/log.00001

file every time an LDAP operation occurs.

By monitoring this file, I can trigger my event. But, this is not an optimal solution, because every time it changes, I have to make a changelog call such as the following:

$mesg = $ldap->search( base => 'cn=changelog', scope => 'sub', filter => '(changetype=add)', attrs => $attrs, callback => &callback );

And then parse the return to check for changes. This is CPU expensive.

The method I am looking for is a way for perl to emulate another LDAP database so that Netscape will automatically send replication updates to it, I would then trigger on only the updates I'm interested in.

-mlm

In reply to Re: Re: LDAP replication using Perl by mlm
in thread LDAP replication using Perl by mlm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.