DrWhy has asked for the wisdom of the Perl Monks concerning the following question:
I'm using Berkeley DB in an manner that is not approved of by the great Berkeley DB oracles-that-be. I'm using it from a shared disk in a distributed environment with multiple processes on mulitple machines reading and writing simultaneously. The saving grace, if there is one here is that there is expected to be very infrequent, but still possible cases of two processes on different machines accessing the BDB at the same time.
Going off a tip from the Oracle Berkeley DB FAQ online, I'm taking the following approach: Do external locking on the entire DB, handled by the application. I'm planning to use File::SharedNFSLock for this purpose.
I could just get a lock at the beginning of each app's run and that would be sufficient to get the locking I need, completely serializing access to the DB at a very high level. This would waste alot of time so I was looking at having each app take and release a lock several times around logical units of DB work within the app. Each unit of activity would look like:
Thanks.
--DrWhy
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [OT]? Behavior of Berkeley DB cache when reading cached page that was changed on disk by another app
by anonymized user 468275 (Curate) on May 06, 2011 at 07:10 UTC | |
by DrWhy (Chaplain) on May 06, 2011 at 15:05 UTC | |
|
Re: [OT]? Behavior of Berkeley DB cache when reading cached page that was changed on disk by another app
by Anonymous Monk on May 06, 2011 at 01:04 UTC | |
by DrWhy (Chaplain) on May 06, 2011 at 02:16 UTC | |
by Anonymous Monk on May 06, 2011 at 04:01 UTC |