That is kind of what I found. In my app I basically have the following triggered using callLater:<div><br></div><div>do a select and create a new SSL connection  for each item returned</div><div>Wait for the response</div>
<div>Do between 2 and 4 inserts depending on results</div><div>Close the connection. </div><div><br></div><div>As measured in connections completed per seconds my results have been:</div><div><br></div><div>15/second with blocking twisted</div>
<div>7/second using deferred to thread</div><div>18/second using SQLalchemy in another process over PB.</div><div><br></div><div>I know these are anecdotal but they might help someone else.</div><div><br></div><div>The two problems with PB are that you quickly overrun the maximum amount of FD&#39;s available for select reactors and you end up roughly doubling the amount of DB querying you are doing. </div>
<div><br></div><div>I intend to try using something like ampoule(deferToProcess) but I think I will have the same problems as with PB since it just uses TCP sockets anyways.</div><div><div><br></div><div><br></div><div>Dan</div>
<div><br></div><div><br><br><div class="gmail_quote">On Sun, May 9, 2010 at 4:45 AM, Phil Mayers <span dir="ltr">&lt;<a href="mailto:p.mayers@imperial.ac.uk">p.mayers@imperial.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 05/09/2010 07:07 AM, Daniel Griffin wrote:<br>
&gt; If you let SQLAlchemy block twisted would there be any impact besides<br>
&gt; performance?<br>
<br>
</div>Depends how long it blocks for, and what else your process is doing.<br>
<br>
With the reactor blocked:<br>
<br>
  * no socket reads or accepts can be done<br>
  * no callLater or LoopingCall can be scheduled<br>
<br>
...and so on.<br>
<br>
If you&#39;ve only got a small number of clients and no time-based<br>
scheduling and you&#39;re only blocking for a short time (tens or hundreds<br>
of milliseconds, say) it may be tolerable.<br>
<br>
If the server has a lot of clients, or needs to accept new ones in a<br>
timely fashion, or has time-based work to do, and your blocking might go<br>
on for a while, it&#39;s probably not tolerable.<br>
<br>
I&#39;d avoid it personally (but then I&#39;m utterly unconvinced by ORMs) and<br>
stick to using SA in a thread as your SQL query layer.<br>
<div><div></div><div class="h5"><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>
</div></div></blockquote></div><br></div></div>