Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Multiuser app with SQLite, Dancer2 and CLI

by Discipulus (Canon)
on Dec 04, 2018 at 21:56 UTC ( [id://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.

L*

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.

    Thanks.

      That was me posting here, by mistake as anonymous.

      Again, thank you all for your answers.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-18 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found