Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Multiuser app with SQLite, Dancer2 and CLI

by Discipulus (Abbot)
on Dec 04, 2018 at 21:56 UTC ( #1226743=note: print w/replies, xml ) Need Help??

in reply to Multiuser app with SQLite, Dancer2 and CLI

Hello kaldor and welcome to the monastery and to the wonderful world of perl!

for the little i know SQLite is not well suited to multiple contemporary access. or maybe you will just have read access? See DBD::SqLite issue while accessing DB from multiple processes where sqlite_use_immediate_transaction is also suggested.

Regarding the duplication of code: abstract all parts needed by both interfaces and put them into a testable module.


There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Multiuser app with SQLite, Dancer2 and CLI
by Anonymous Monk on Dec 07, 2018 at 15:21 UTC

    I expect to have much more read accesses than write.

    I use AutoCommit => 0, so immediate transactions are used by default. But you made me go through SQLite's documentation (again) : since the DB cannot be read at all while locked for writing, I'll have to deal with SQLITE_BUSY.

    In the end, usability will depend mostly on the DB/schema design (fast or slow updates). I'll stick to SQLite for now since I don't have any real-case metrics.


      That was me posting here, by mistake as anonymous.

      Again, thank you all for your answers.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-11-29 04:43 GMT
Find Nodes?
    Voting Booth?