On Oct 13, 10:01 pm, J Stam <[EMAIL PROTECTED]> wrote:
> What techniques can be used to improve concurrency when using SQLite and
> SQLAlchemy?
>
> My system has two threads. One collects data and does periodic insertion and
> algorithms on the data. A second thread implements a web service which might
> read the data or make changes to algorithm parameters in the database. This
> mostly works, but occasionally I run into a database lock. The two options I
> see are:
>
> 1) make this single threaded -- but not sure how to merge the web server
> thread and the data collection
>
> 2) Introduce some sort of mutex protection between the threads.
>
> Are there any other better possibilities?
if you're stuck with SQLite I'd look into mutexing. SQLite is not
known for strong concurrency support though which is why MySQL/
Postgres are often used for more performant/concurrent scenarios.
Also there's a little insight on SQlite's take on threads at
http://www.sqlite.org/faq.html#q6 .
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---