What about ampoule, <a href="https://launchpad.net/ampoule">https://launchpad.net/ampoule</a> , can you check it?<br><br>-- <br>m<br><br><br><div class="gmail_quote">2009/6/24 lasizoillo <span dir="ltr">&lt;<a href="mailto:lasizoillo@gmail.com">lasizoillo@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2009/6/24 Yann Pomarede &lt;<a href="mailto:yann.pomarede_twisted@gadz.org">yann.pomarede_twisted@gadz.org</a>&gt;:<br>

<div class="im">&gt; Thanks for your reply.<br>
&gt; I already thought about that but I&#39;ll have other problems if I do so:<br>
&gt; - I need some variables to be common between the instances (Maybe it&#39;s<br>
&gt; not so difficult with RPC or a DB or shared memory).<br>
</div>If you need full ACI (ACID without durability) this can be a performance issue.<br>
<div class="im"><br>
&gt; - I also need to keep a pool of all the outgoing the connections (to<br>
&gt; perform some real time stats and to limit the number of connection per<br>
&gt; user)<br>
&gt;<br>
</div>The load balancer can limit number of connections (without decipher<br>
ssl) or agregate real time stats from web servers (for easier<br>
management). You can upgrade code in your web app without lost service<br>
too ;-)<br>
<div class="im"><br>
&gt; But if I do not have other choices, it&#39;s certainly what I&#39;ll have to do...<br>
&gt;<br>
<br>
</div>Threads are not  the solution. Python have a GIL (Global Inter-Lock)<br>
[1] and don&#39;t use multicore facilities. I don&#39;t know if you can do<br>
multiprocessing with twisted. A load balancer sound more easy (and<br>
maybe more horizontal scalable).<br>
<br>
[1] <a href="http://www.dabeaz.com/python/GIL.pdf" target="_blank">http://www.dabeaz.com/python/GIL.pdf</a><br>
<br>
Excuse my poor english.<br>
<br>
Regargs,<br>
<br>
Javi<br>
<div><div></div><div class="h5"><br>
&gt; Yann.<br>
&gt;<br>
<br>
<br>
<br>
&gt; On Wed, Jun 24, 2009 at 21:08, Duncan M.<br>
&gt; McGreggor&lt;<a href="mailto:duncan.mcgreggor@gmail.com">duncan.mcgreggor@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Yann Pomarede wrote:<br>
&gt;&gt;&gt; Hello,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I used Twisted to write some kind of proxy and it&#39;s working great,<br>
&gt;&gt;&gt; it&#39;s so easy to develop and understand.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; But I have a problem. I use SSL (on both side of this app) and the<br>
&gt;&gt;&gt; bandwidth available is limited to the power of one of my CPU due to<br>
&gt;&gt;&gt; the high cost of the SSL encryption.<br>
&gt;&gt;&gt; I would like to use both core of my CPU to increase the bandwidth of<br>
&gt;&gt;&gt; this application but it does not seem easy to do.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # Here is the server definition in myapp.tac<br>
&gt;&gt;&gt; from twisted.application import internet, service<br>
&gt;&gt;&gt; application = service.Application(&#39;MyApp&#39;, uid=1001, gid=1001)<br>
&gt;&gt;&gt; internet.SSLServer(80, serverFactory, MySSLContext(), 50,<br>
&gt;&gt;&gt; &#39;xxx.xxx.xxx.xxx&#39;).setServiceParent(service.IServiceCollection(application))<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; # And here the clients connections<br>
&gt;&gt;&gt; from twisted.internet import reactor, ssl<br>
&gt;&gt;&gt; mySSLContext = ssl.ClientContextFactory()<br>
&gt;&gt;&gt; mySSLContext.method = SSL.SSLv23_METHOD<br>
&gt;&gt;&gt; reactor.connectSSL(self.HOST, self.PORT, self, mySSLContext)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Does anyone already have this kind of problem? Is there an easy way to<br>
&gt;&gt;&gt; multithread the SSL encryption part?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; You could run two instances and load balance them...<br>
&gt;&gt;<br>
&gt;&gt; d<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Twisted-web mailing list<br>
&gt;&gt; <a href="mailto:Twisted-web@twistedmatrix.com">Twisted-web@twistedmatrix.com</a><br>
&gt;&gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Twisted-web mailing list<br>
&gt; <a href="mailto:Twisted-web@twistedmatrix.com">Twisted-web@twistedmatrix.com</a><br>
&gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a><br>
&gt;<br>
<br>
_______________________________________________<br>
Twisted-web mailing list<br>
<a href="mailto:Twisted-web@twistedmatrix.com">Twisted-web@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a><br>
</div></div></blockquote></div><br>