<br><br><div class="gmail_quote">On Wed, Feb 27, 2008 at 3:46 AM,  &lt;<a href="mailto:glyph@divmod.com">glyph@divmod.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On 11:11 am, <a href="mailto:coder_gus@lavabit.com">coder_gus@lavabit.com</a> wrote:<br>
&gt;So, my question is: is this kind of architecture good to implement?<br>
&gt;(asynchronous server and threaded workers)<br>
<br>
</div>You might want to consider using process workers instead of thread<br>
workers, using spawnProcess and a simple control protocol. &nbsp;This is<br>
easier to debug, since threads are painful to figure out, and it also<br>
scales better - you escape python&#39;s GIL and can take advantage of<br>
multiple cores, but even if it weren&#39;t for that, you can switch<br>
spawnProcess to some kind of remote connection API and run your<br>
processes remotely.</blockquote><div><br>Would you say that this method of using a separate process instead of<br>threads to do work also is possibly good for database operations?<br><br>I&#39;m always reading &#39;beware of threads&#39; ;) with respect to Twisted,<br>
so using a very simple control protocol to manage a separate<br>dedicate database process might be better than <br>relying on the threading that &#39;adbapi&#39; uses?&nbsp; <br><br>Any comments on this would be appreciated.<br>
<br>Thanks,<br>-Alex<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div><div></div><div class="Wj3C7c"><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>