Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: STM for Perl

by gaal (Parson)
on Jan 24, 2007 at 06:12 UTC ( [id://596206]=note: print w/replies, xml ) Need Help??


in reply to STM for Perl

STM is usually used to denote a technique for lockless atomic concurrent access to data. It relies on separating IO from transaction code for correctness and as such is quite hard to do in Perl 5 (although Pugs has a prototype of this working). DBM::Deep might help with an in-memory database (though I thought the point was that it gave a Perl interface to disk backed storage), but how is this STM?

Replies are listed 'Best First'.
Re^2: STM for Perl
by dragonchild (Archbishop) on Jan 24, 2007 at 20:40 UTC
    DBM::Deep's initial mission was to provide a Perl interface to disk-backed storage. It did this so well that programs don't even know they're working with disk-backed data structures. Combine this with transactions and you have the ability to treat a data structure transactionally. In other words, "lockless atomic concurrent access to data." That this lockless concurrent access occurs on disk is undesirable, but transparent to the program. Adding the ability to do this in-memory vs. on disk is an optimization, not a specification.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      I'm not dissing DBM::Deep. Might be a useful module indeed. But it isn't STM.

      STM is a particular technique to achieve safe access to data in a multithreaded program. The concurrency it deals with isn't that of different processes accessing the data on disk at the same time, and the locks it saves the programmer from thinking about aren't of the filesystem type.

        Point. So, the next step would be to make DBM::Deep threadsafe?

        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-24 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found