> From: Ryan Lepidi <ryeg...@gmail.com> > Subject: [Twisted-Python] So how does everyone use an ORM in twisted? > To: twisted-python@twistedmatrix.com > Message-ID: > <bb39cd350903170805p2fca87casbc3cd6c932bb9...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > I have searched a bit, and it seems as though you can't use SQL Alchemy with > twisted due to SA being thread unsafe. The only solution I found was sAsync, > but this is old and unmaintained. What is everyone else doing for database > access for a multiuser server? Is everyone really using raw sql queries or > is there some easy solution that I'm missing? > > I'm not even stuck on SQL Alchemy; if there is some other ORM that works in > this case, I'd be willing to learn it.
I'm using SQLAlchemy with Twisted in a large project without problems. Why would you think you cannot? You just need to run SA operations in non-reactor threads (i currently use my own threadpool and deferToThread but it's only slightly modified standard twisted one), and you need to make sure each connection/session is not used by more than thread at a time, that's all. Maciej Szumocki _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python