Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^6: Multiple write locking for BerkeleyDB

by dino (Sexton)
on Apr 24, 2008 at 16:38 UTC ( #682672=note: print w/replies, xml ) Need Help??

in reply to Re^5: Multiple write locking for BerkeleyDB
in thread Multiple write locking for BerkeleyDB

Thats a lot of useful information, thanks. I'm a little puzzled however of how to get separate processes to use the same shared memory. With fork I can use some form of handle which is inherited, but how does it work when the writer processes have been started separately?
I had a look IPC::MM as it allows the creation of shared hashes (not using storable) but it has the above problem (I think).
  • Comment on Re^6: Multiple write locking for BerkeleyDB

Replies are listed 'Best First'.
Re^7: Multiple write locking for BerkeleyDB
by sgifford (Prior) on Apr 24, 2008 at 17:07 UTC
    See the links in my original post; all share memory between unrelated process. IPC::MM looks very useful, but only shares memory between related processes, at least according to the MM docs at OSSP (I haven't used it myself).

    If you're not interested in doing the low-level work yourself (which will probably give the best performance at the expense of a lot of work), Cache::FastMmap might be helpful. It acts as a fast cache that sits in front of something else, like a database or DB file. You would mostly use the cache, and could periodically flush it out to the database to limit how much data you lose if your machine crashes. The author of this module has some interesting performance information at Comparison of different PERL caching modules.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682672]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (1)
As of 2023-06-04 21:26 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (22 votes). Check out past polls.