![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: Multiple write locking for BerkeleyDBby pc88mxer (Vicar) |
on Apr 23, 2008 at 18:25 UTC ( #682446=note: print w/replies, xml ) | Need Help?? |
How many updates a second do you need? Do you need to read the counters for any other reason (other than to increment them)? Are there any other processes accessing this data?
An alternative approach is to write a simple server which mediates access to the data store. Writers communicate with it via a pipe or socket. It would also allow you to implement complex atomic operations (like incrementing a value) without having to resort to locking.
In Section
Seekers of Perl Wisdom
|
|