[Twisted-Python] How to correctly run Sqlite with Twisted?

goffi goffi at goffi.org
Wed Sep 20 06:01:55 MDT 2017


Le 2017-09-20 10:24, ex vito a écrit :
> On 2017-09-19, at 21:59, Goffi <goffi at goffi.org> wrote:
> 
>> [SNIP]
> 
> 
> I would subscribe to Moshe's and Jean-Paul's suggestions of using
> higher-level tools to handle database interactions.
> 
>  [SNIP]
> 
> A final thought, from the realm of intuition: if I were targeting
> heavily concurrent access to a database (subjective, yes), I'd
> consider replacing SQLite with some other engine. SQLite is a great
> tool for many purposes, but concurrent access is not its strong point
> (see https://www.sqlite.org/lockingv3.html).


Thanks for all your answers! I'll check every options before taking a 
decision, but I'm quite seduced by Alchimia, the SqlAlchemy wrapper. I'm 
a bit worrying because it has not seen any commit since 11 months (I 
have had bad experiences with unmaintained libraries). This said, the 
wrapper is thin, I can probably maintain it myself if needed. As a 
bonus, it would allow me to propose other storage backends than Sqlite.

For the use case, it's used mainly for cache and various data for an 
XMPP client which can handle several users at the same time, and only 
one backend is accessing the database. There is already an automatic 
update mechanism that I would have to adapt, but it may simplify 
everything at the end. Also I need to check if Full Text Search and Json 
data type are easily usable, but it seems than plain SQL request are 
still possible at worst.


Thanks again for your answers, it's really helpful!

Goffi




More information about the Twisted-Python mailing list