<div class="gmail_quote">On Fri, Sep 4, 2009 at 4:59 PM, Bokhan Artem <span dir="ltr"><<a href="mailto:art@academ.org">art@academ.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello.<br>
<br>
Is there right (standard) way to write twisted network server<br>
(tcp/web/mail/etc) which could use several cpu cores? For example,<br>
master+workers model, where every worker doing the same job.<br>
If so, may somebody help to wrap the sample code below?<br>
May be some well-known twisted based software can do that?<br>
</blockquote><div><br>The sample code you've provided doesn't do anything; no CPU consumption of its own (it's all in the framework) and no network I/O of its own. So it's hard to come up with a realistic example. There's no way to tell Twisted itself to spread itself out over multiple CPU cores, but then, Twisted itself is rarely the chief CPU consumer in an application.<br>
<br>If you want to take advantage of multiple CPU cures though, have a look at Ampoule: <<a href="https://launchpad.net/ampoule">https://launchpad.net/ampoule</a>>.<br><br><br></div></div>