Oliver, is this only a single ldap server or does it replicate to additional 
systems and is there ever the possibility two scripts could be using more than 
one of the systems at once?  If so you would need a server side solution as 
well as possibly something with your script. A simple hokey solution for a 
single server would be to use an attribute for locking. Generate a key, update 
the attribute, retrieve the attribute and if it is the key then make the 
change. The server would still need to have limited or no transaction caching. 
I am not familiar with the support in various ldap servers for this. 

Don

----- Original Message -----
From: Olivier Nicole <[EMAIL PROTECTED]>
To: perl-ldap@perl.org <perl-ldap@perl.org>
Sent: Tue Dec 04 00:09:15 2007
Subject: Transactional Net::LDAP?

Hello,

I want to implement a print quota system using OpenLDAP. The print
quota would be just one attibute that will keep the number of pages
printed for each user.

My problem is that I have several servers with pinter daemon, and on
each server I may have several printer queues, ending up in many
Perl scripts that can update the LDAP attribute at same time.

The update should be of the form:

printdPages = printedPages + n

How can I do that in Perl (Net::LDAP) avoiding conflicts? I think it
should be implemented as a transaction, but I cannot find proper
reference.

TIA,

Olivier

Reply via email to