python - Concurrent Database Access with uWSGI -


i trying find best solution concurrent database access uwsgi.

some specifics:

i using python3 (3.3) , sqlite3. i'd able scale app more processes (and threads too? i'm not sure --threads uwsgi...)

sqlite3 has built in support concurrent process use, not threads.

so should write kind of wrapper around sqlite3 connection object implements locking?

or better have kind of worker process db stuff. if case how start separate worker uwsgi, , how pass messages web worker processes?

or there better solution?

finally have related question. should create db connection every request, or should have persistant connection each process stays open while worker alive?

it seems me creating connection on every request expensive, want make sure having persistant connection not cause problems.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -