← Back to context

Comment by BratakDev

8 months ago

How does Jinbase handle concurrency? Since it’s built on SQLite, does it inherit SQLite’s locking mechanisms, or have you implemented additional features to manage concurrent access across the different data models?

Jinbase is designed to be thread-safe, ensuring it can be reliably used in a multithreaded context.

To interact with SQLite, Jinbase uses LiteDBC [1] an SQL interface compliant with the DB-API 2.0 specification described by PEP 249 [2], itself wrapping Python's sqlite3 [3] module for a more intuitive interface and multithreading support by default. I wrote for LiteDBC a stress test [4] involving concurrency with Asyncpal [5].

[1] https://news.ycombinator.com/item?id=41404020