http://qs321.pair.com?node_id=244570

zby has asked for the wisdom of the Perl Monks concerning the following question:

The question is how to build a web application with no backend RDBMS? What would you use for storage? The options I've found (beside flat files) are: I can not find en explicite statement in the DBD::SQLite documentation about concurrent usage. Is it safe?

Have you fellow manks any experience with any of those modules? Are there any other options?

Replies are listed 'Best First'.
Re: concurent access with no RDBMS backend
by castaway (Parson) on Mar 20, 2003 at 12:13 UTC
    I've been using DBD:SQLite for a while, and have come to the conclusion that it doesn't allow concurrent access. (While running a script which opens a connection and keeps it open, I *usually* cannot open a second connection using the dbish command).
    I say *usually* because sometimes it connects, but if I recall correctly, I could only do selects, and not make any updates which were visible to the script using its previously opened connection.

    Apart from that, it's a nice module :)

    C.

Re: concurent access with no RDBMS backend
by mirod (Canon) on Mar 20, 2003 at 11:57 UTC

    Actually SQLite IS a RDBMS. Look at the FAQ (and at the rest of the SQLite site) for more information. Basically it does not support intensive updates by conccurent processes, but behaves fine in cases where you update the DB infrequently.

      Thank's. I just browsed the CPAN documentation and there was not any link to that site.
Re: concurent access with no RDBMS backend
by perrin (Chancellor) on Mar 20, 2003 at 17:15 UTC
    MLDBM::Sync is fast and solid. You can also use regular MLDBM with BerkeleyDB (not DB_File) which will be safe for concurrent access if you open the file with the correct options.
Re: concurent access with no RDBMS backend
by dga (Hermit) on Mar 20, 2003 at 15:42 UTC

    Some versions of Berkley DB are concurrent safe. They are not relational or SQL however. If you don't really need those features you might look into it. use DB_File; That said, Berkley DB is quite fast.

Re: concurent access with no RDBMS backend
by hiseldl (Priest) on Mar 20, 2003 at 16:05 UTC

    Take a look at tdb... from their site:

      TDB is a Trivial Database. In concept, it is very much like GDBM, and BSD's DB except that it allows multiple simultaneous writers and uses locking internally to keep writers from trampling on each other. TDB is also extremely small.
    ... and it's module TDB_File.

    --
    hiseldl
    What time is it? It's Camel Time!