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

Re: Record Locking



In short order:

Depends on your environment. If you are using an individual scripting language such as Perl or PHP and if all of your scripts are on the same machine you can use a semaphore to coordinate the efforts of multiple scripts. I've heard that Perl has an atomic retrieve and modify operation for LDAP. PHP, however does not.

Another strategy that may work at the attribute level involves using the following algorithm:

1. Retrieve the value and perform operations on it.
2. Use ldamodify to change the old value to the new value but use the old value of the attribute in the dn for the modify operation. If it has been changed, it will no longer exist and the modification will fail. Success can be used as an exit condition for a retrieve and modify loop.




Jim C.