If you want an ORM in Twisted look for STORM twisted integration. Overall, it works (I tried). Some quirks are there, e.g. without twisted you would do something like resultset[10:20].sort(Sort.ASC) but with twsited you have to do (assuming inlineCallbacks)<br>

<br>res= yield  resultset[10:20]<br>res = yield res.sort(Sort.ASC)<br><br>which ain&#39;t pretty but it sure beats using plain twisted.enterprise <br clear="all">--<br>Konrads Smelkovs<br>Applied IT sorcery.<br>
<br><br><div class="gmail_quote">On Thu, May 6, 2010 at 11:00 PM, Kevin Horn <span dir="ltr">&lt;<a href="mailto:kevin.horn@gmail.com">kevin.horn@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

You might also check out sAsync: <a href="http://sasync.org/" target="_blank">http://sasync.org/</a><br><br>This was a project apparently abandoned (?) by the original author, but it&#39;s recently been picked up by someone else.<br>

<font color="#888888"><br>Kevin Horn</font><div><div></div><div class="h5"><br>
<br><div class="gmail_quote">On Thu, May 6, 2010 at 2:04 PM, César García <span dir="ltr">&lt;<a href="mailto:celord@gmail.com" target="_blank">celord@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


Guys, now that I see this and the past conversations about SA and Twisted, and now that I&#39;ve read some more about the non-blocking concepts, I think that I&#39;am not doing things the best way<br><br> I am doing this:<br>




<br>1. Twisted  IMAP4 Client to read my mails<br>2. Inside this client I import a module that contains some funtions that parse the email via re<br>3. Also inside the client I import a module that makes a DB connection and insert the data parsed from those emails, all this via SQL using mapped tables. <br>




<br>I&#39;m almost sure that I&#39;m breacking the hole twisted concept doing this thisway , do you guys have any advice for me<br><br>Thanks<br><div class="gmail_quote">2010/5/5 Chris Withers <span dir="ltr">&lt;<a href="mailto:chris@simplistix.co.uk" target="_blank">chris@simplistix.co.uk</a>&gt;</span><div>


<div></div><div><br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Doug Farrell wrote:<br>
&gt;<br>
&gt; I’ve been doing some searching about how to get SQLAlchemy and Twisted<br>
&gt; working together in a Twisted application.<br>
<br>
</div>Short version: to be safe, anything that touches any SQLAlchemy-mapped<br>
object needs to be run in its own thread. Any query or access of an<br>
attribute of a mapped object may result in a blocking sql query. (aka:<br>
twisted doesn&#39;t play nice with orms)<br>
<div><br>
&gt; definitive answer. The most promising one I’ve run across concerns<br>
&gt; running the SQLAlchemy queries in a separate process (rather than a<br>
&gt; separate thread) and communicating the queries between the Twisted<br>
&gt; application in one process and the SQLAlchemy application in another.<br>
<br>
</div>That seems a little odd.<br>
What would be the IPC?<br>
How would the &quot;sqlachemy application&quot; be run?<br>
<div><br>
&gt; 1)      Would the SQLAlchemy process also be a Twisted application with<br>
&gt; all the queries running as deferreds in the main thread, and blocking?<br>
<br>
</div>What do you men by &quot;all the queries&quot;?<br>
<div><br>
&gt; Thanks in advance for any help!<br>
<br>
</div>In my case, since most of the app I&#39;m working on is &quot;web requested&quot;<br>
(either xmlrpc or http), I just agve up and used a good wsgi stack<br>
(repoze.bfg in my case) and munge other incoming requests into wsgi<br>
requests.<br>
<br>
Twisted&#39;s wsgi server runs each request in its own thread, so be it.<br>
<br>
cheers,<br>
<font color="#888888"><br>
Chris<br>
</font><div><div></div><div><br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br><a href="http://celord.blogspot.com/" target="_blank">http://celord.blogspot.com/</a><br>
</font><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br><div style="display: inline;"></div>
</div></div><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>