[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Question on back-perl
- To: openldap-software@openldap.org
- Subject: Question on back-perl
- From: Andrea Cirulli <acirulli@gmail.com>
- Date: Thu, 8 Apr 2010 17:40:52 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=96HVQwYPmvAvB1h8zrVF1S96WRUKQAqXdTYm87rCuK4=; b=J8rfvoVb0AbY9l0d8bX9RduR2pUen2PgBjWuup59AcT3mJjZQEsjX8mBp3vYuSomci Iae35TZoxlmBuXIUN+JzuUvDgBdoCx2XzpElxYmTzMpadYE3Hi7Rww8CYIsrjX6Tpyfy xVgORm0n5uGlKek1WUZoK6Vb5d3tuQE0iNaz0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YNfWLAz77Vr23L8lYEsJRrwihTOw+FuGqZzT7DCUxp+wdwjSm7kSxGuqMZFgoFGnUr kii38Pi1oXF166XiSgV/iqF4YAyY3DnjwjNGG2Edftx7dT1K3UvRnY56lznjDTMGzvQ1 vCsNIO79+rNCwH5F4JTKM2WZzx38LVATrl59w=
Just for fun I was testing the perl backend for openldap.
I starting setting up an LDAP using the SampleLdap.pm perl library in the source code.
My goal is to setup a consumer LDAP in synch with other LDAP (bdb backend) for keeping the mod add del etc. using the syncrepl mechanism.
I want to wrap every modification in the Master LDAP and triggering some perl script.
I'm very new to this approach and the first problem I'm facing is how to keep the last db state after a slapd crash or shutdown.
Using SamplLdap.pm init it's just a subroutine returning 0, so after the first sync if I shutdown the slapd next time I will need a full resync.
Do you know some other clever examples? I mean keeping the state of the LDAP and triggering, for example recording on files, the modifications on LDAP.
I tried to add in the subroutine some operation on FILES (using standard open FILE....;print FILE "operation"; close (FILE)) it seems do not work.
Many thanks to all!
--
Andrea Cirulli