in reply to Database access and async web framework (like Mojolicious)
My concern is that because of the use of threads in such frameworks, keeping a DB handle over time will lead to problems. (let's say I keep the handle for 100 queries, then refresh it) There is no problem keeping a handle for a very long time. There is no need to "refresh" it. A handle and any statement prepared for that handle can only be used in a single thread. Read my above suggested link.
Update: SQLite requires an exclusive lock when writing the DB. It will take care of doing this by itself, but be aware that this can have a huge impact upon performance. Fixed bad link above.
|
---|