[Twisted-Python] SQL ORM for Twisted & PostgreSQL?

Mike Winter (miwinter) miwinter at cisco.com
Wed Aug 21 12:41:44 MDT 2013


This reminded me of something I read years ago from Doug Schmidt on a pattern half sync half async:

http://www.cs.wustl.edu/~schmidt/PDF/PLoP-95.pdf

I feel it is relevant but the picture may be upside down in relation to writing twisted wrappers which may want to wrap a blocking API.


On Aug 21, 2013, at 11:05 AM, Jonathan Vanasco <twisted-python at 2xlp.com<mailto:twisted-python at 2xlp.com>> wrote:

Having a great ORM for twisted is wonderful , but its way less exciting and attractive if it's only for twisted.

Doing this is simple, although probably not easy: you just need to convince the SQLAlchemy folks to separate the process of generating SQL and executing SQL, and expose hooks for event-driven frameworks (which is an ever-expanding circle now, encompassing Twisted, Tornado, Pulsar, and Tulip) to schedule SQL execution with an event-driven backend rather than assuming it can block.

When I faced this problem, I wanted to use SQLAlchemy rather than write my own ORM, but I was unable to due the lack of a public API for generating cross-database SQL.

-glyph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20130821/b44b1ab7/attachment-0002.html>


More information about the Twisted-Python mailing list