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"><<a href="mailto:lasizoillo@gmail.com">lasizoillo@gmail.com</a>></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 <<a href="mailto:yann.pomarede_twisted@gadz.org">yann.pomarede_twisted@gadz.org</a>>:<br>
<div class="im">> Thanks for your reply.<br>
> I already thought about that but I'll have other problems if I do so:<br>
> - I need some variables to be common between the instances (Maybe it's<br>
> 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>
> - I also need to keep a pool of all the outgoing the connections (to<br>
> perform some real time stats and to limit the number of connection per<br>
> user)<br>
><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>
> But if I do not have other choices, it's certainly what I'll have to do...<br>
><br>
<br>
</div>Threads are not the solution. Python have a GIL (Global Inter-Lock)<br>
[1] and don't use multicore facilities. I don'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>
> Yann.<br>
><br>
<br>
<br>
<br>
> On Wed, Jun 24, 2009 at 21:08, Duncan M.<br>
> McGreggor<<a href="mailto:duncan.mcgreggor@gmail.com">duncan.mcgreggor@gmail.com</a>> wrote:<br>
>> Yann Pomarede wrote:<br>
>>> Hello,<br>
>>><br>
>>> I used Twisted to write some kind of proxy and it's working great,<br>
>>> it's so easy to develop and understand.<br>
>>><br>
>>> But I have a problem. I use SSL (on both side of this app) and the<br>
>>> bandwidth available is limited to the power of one of my CPU due to<br>
>>> the high cost of the SSL encryption.<br>
>>> I would like to use both core of my CPU to increase the bandwidth of<br>
>>> this application but it does not seem easy to do.<br>
>>><br>
>>> # Here is the server definition in myapp.tac<br>
>>> from twisted.application import internet, service<br>
>>> application = service.Application('MyApp', uid=1001, gid=1001)<br>
>>> internet.SSLServer(80, serverFactory, MySSLContext(), 50,<br>
>>> 'xxx.xxx.xxx.xxx').setServiceParent(service.IServiceCollection(application))<br>
>>><br>
>>> # And here the clients connections<br>
>>> from twisted.internet import reactor, ssl<br>
>>> mySSLContext = ssl.ClientContextFactory()<br>
>>> mySSLContext.method = SSL.SSLv23_METHOD<br>
>>> reactor.connectSSL(self.HOST, self.PORT, self, mySSLContext)<br>
>>><br>
>>> Does anyone already have this kind of problem? Is there an easy way to<br>
>>> multithread the SSL encryption part?<br>
>><br>
>><br>
>> You could run two instances and load balance them...<br>
>><br>
>> d<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>
>><br>
>><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>
><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>