Hmm, this sounds interesting. I&#39;m wondering about a use case for it. Would Ampoule be a way to take advantage of multi-core processors?<br><br>Thanks,<br><br>Don<br><br><div class="gmail_quote">On Wed, Nov 12, 2008 at 12:09 PM, Valentino Volonghi <span dir="ltr">&lt;<a href="mailto:dialtone@gmail.com">dialtone@gmail.com</a>&gt;</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;"><div style=""><div><div>Ampoule is a process pool implementation written on top of Twisted</div>
<div>Matrix. Its name comes from the use of AMP as the default</div><div>communication protocol between the pool and all its children.</div><div><br></div><div>It&#39;s different from other alternative solutions because it provides an</div>
<div>API very close to that of the Twisted ThreadPool. As an helper</div><div>function it also provides a deferToAMPProcess function that creates</div><div>the ProcessPool and submits jobs to it.</div></div><div><br></div>
<div>There has been 2 released since the last announce so I&#39;m going</div><div>to report both of them here.</div><div><br></div><div><div>Ampoule 0.0.5 (2008-11-12)</div><div>==========================</div><div><br></div>
<div>Changes</div><div>--------</div><div>&nbsp;- Fixed bug #259264, this fix introduces a number of changes in the</div><div>&nbsp;&nbsp; architecture of the project:</div><div>&nbsp;&nbsp; &nbsp;1. Removed childReactor argument form the process pool and added</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; a starter argument.</div><div>&nbsp;&nbsp; &nbsp;2. Introduced the concept of a starter object whose role is to</div><div>&nbsp;&nbsp; &nbsp; &nbsp; start subprocesses with given parameters. This makes it easier</div><div>&nbsp;&nbsp; &nbsp; &nbsp; to specify particular parameters (eg. new env variables) to the</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; child processes without needing to override many methods in the</div><div>&nbsp;&nbsp; &nbsp; &nbsp; pool using closures.</div><div>&nbsp;&nbsp; &nbsp;3. main.py is completely changed and now provides the ProcessStarter</div><div>&nbsp;&nbsp; &nbsp; &nbsp; object which is a default implementation of IStarter.</div>
<div>&nbsp;&nbsp; &nbsp;4. IStarter interface currently documents only 2 methods:</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;startAMPProcess</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;startPythonProcess</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;in the future it&#39;s possible that we will add an additional:</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;startProcess</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;that starts whichever process we want without requiring python,</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;also this might end up with the separation of ProcessPool in at</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;least 2 logical levels: the ProcessPool and a dispatcher that</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;talks with the children, in this way it would be possible to</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;create custom ProcessPools without changing much code or requiring</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;any special requirement on the children.</div>
<div><br></div><div>&nbsp;- Introduced a callRemote method on the ProcessPool that is basically</div><div>&nbsp;&nbsp; the same as doWork. Introduced for symmetry between all the RPC libraries</div><div>&nbsp;&nbsp; in Twisted.</div><div><br></div>
<div>&nbsp;- reactor short name and ampoule child class are now passed as the 2</div><div>&nbsp;&nbsp; last arguments rather than the first 2. So if you have written any</div><div>&nbsp;&nbsp; custom bootstrap code be sure to change sys.argv[1] and sys.argv[2]</div>
<div>&nbsp;&nbsp; into sys.argv[-2] and sys.argv[-1] respectively.</div></div><div><br></div><div><div>Ampoule 0.0.4 (2008-11-03)</div><div>==========================</div><div><br></div><div>Changes</div><div>--------</div><div>&nbsp;- Ampoule parent process and child processes now talk using FDs 3 (in)</div>
<div>&nbsp;&nbsp; and 4 (out) in order to avoid problems with libraries that mistakenly</div><div>&nbsp;&nbsp; send error lines to stdout (yes, I&#39;m looking at you gtk+)</div><div><br></div></div><font color="#888888"><div><br></div><div>
 <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="">
<div><div><span style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;">-- </span></div><div><span style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;">Valentino Volonghi aka Dialtone</span></div>
<div><span style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;">Now&nbsp;running MacOS X 10.5</span></div><div><span style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;">Home Page: <a href="http://www.twisted.it" target="_blank">http://www.twisted.it</a> </span></div>
<div><span style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap;"><a href="http://www.adroll.com" target="_blank">http://www.adroll.com</a></span></div></div></div></span></div></span></div>
</span> </div><br></font></div><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>
<br></blockquote></div><br>