[Date Prev][Date Next]
Re: syncrepl style client library functions
- To: email@example.com
- Subject: Re: syncrepl style client library functions
- From: Michael Eichenberger <firstname.lastname@example.org>
- Date: Wed, 24 May 2006 11:00:27 +0200
- Cc: openldap-software@OpenLDAP.org
- In-reply-to: <422F911F.email@example.com>
- References: <1110397046.633.10.camel@localhost> <422F61AF.firstname.lastname@example.org> <1110411989.633.26.camel@localhost> <422F911F.email@example.com>
- User-agent: Thunderbird 22.214.171.124 (X11/20060518)
Did you ever create/programme your client? And if yes, care to share the
I would be interested in your results to do some provisioning magic with
the help of syncrepl and perl.
Many thanks in advance for any help.
Kind regards, Michael
Rich Megginson wrote:
On Wed, 2005-03-09 at 13:50 -0700, Richard Megginson wrote:
Can anyone provide any more information on this? Are the syncrepl calls
I am currently using syncrepl to replicate to a slave ldap server. I am
impressed with the refresh and persist functionality and would like to
write a client application that performs certain actions when ldap
updates are made. Ideally this client would not poll the server but
could use a refresh and persist style search to recieve notification
when updates are made from the master.
A couple questions,
1) Is this possible?
It should be.
just a generic client interface that anyone can use or is it some kind
of undocumented protocol that should only be used by the replication
I'm not sure about the slurpd protocol, but if you're talking about this
then that is the documentation - just plain old LDAP + some controls.
No, there is no "function" called refreshAndPersist. You basically
construct a Sync Request Control using the Net::LDAP::Controls module
and send that along with a plain old LDAP search request. Then you just
read the search results along with the controls returned.
I've looked at the docs on CPAN for Net::LDAP and can't find any way to
I would suggest Net::LDAP as it allows you the flexibility to define
your own controls based on their ASN.1 definitions.
2) Are there any known client libraries specifically for scripting
languages (PHP,Perl,Python) A c library is also acceptable but requires
call a generic function I'm assuming in this case refreshAndPersist??
Can anyone provide more information preferably some code examples?
You have to make sure you save the cookie sent from the server
frequently and in a secure place, so you can pass this to the server the
next time to only get the delta updates.
2) If I can use this kind of functionality from a scripting language and
a library is available how can I implement functionality like syncrepl
such that if the script dies it can reconnect and get changes made since
the script died as well as persist in recieving future updates. Also if
the LDAP server dies can I keep the client alive and poll the server
till it comes back up. Are these native library calls or do they need to
be implemented in some other way. (I realize this is many questions in
If the LDAP server dies you should get back some sort of error like
LDAP_SERVER_DOWN, and you will get a similar error if you attempt to
reconnect while the server is down. So yes, you could poll trying to
reconnect until you get LDAP_SUCCESS.
This makes sense...
Thanks for your help,
stepping stone GmbH
Telefon: +41 31 332 53 63