Hmm, this sounds interesting. I'm wondering about a use case for it. Would Ampoule be a way to take advantage of multi-core processors?
Thanks,
Don
Ampoule is a process pool implementation written on top of TwistedMatrix. Its name comes from the use of AMP as the defaultcommunication protocol between the pool and all its children.It's different from other alternative solutions because it provides anAPI very close to that of the Twisted ThreadPool. As an helperfunction it also provides a deferToAMPProcess function that createsthe ProcessPool and submits jobs to it.There has been 2 released since the last announce so I'm goingto report both of them here.Ampoule 0.0.5 (2008-11-12)==========================Changes--------- Fixed bug #259264, this fix introduces a number of changes in thearchitecture of the project:1. Removed childReactor argument form the process pool and addeda starter argument.2. Introduced the concept of a starter object whose role is tostart subprocesses with given parameters. This makes it easierto specify particular parameters (eg. new env variables) to thechild processes without needing to override many methods in thepool using closures.3. main.py is completely changed and now provides the ProcessStarterobject which is a default implementation of IStarter.4. IStarter interface currently documents only 2 methods:startAMPProcessstartPythonProcessin the future it's possible that we will add an additional:startProcessthat starts whichever process we want without requiring python,also this might end up with the separation of ProcessPool in atleast 2 logical levels: the ProcessPool and a dispatcher thattalks with the children, in this way it would be possible tocreate custom ProcessPools without changing much code or requiringany special requirement on the children.- Introduced a callRemote method on the ProcessPool that is basicallythe same as doWork. Introduced for symmetry between all the RPC librariesin Twisted.- reactor short name and ampoule child class are now passed as the 2last arguments rather than the first 2. So if you have written anycustom bootstrap code be sure to change sys.argv[1] and sys.argv[2]into sys.argv[-2] and sys.argv[-1] respectively.Ampoule 0.0.4 (2008-11-03)==========================Changes--------- Ampoule parent process and child processes now talk using FDs 3 (in)and 4 (out) in order to avoid problems with libraries that mistakenlysend error lines to stdout (yes, I'm looking at you gtk+)
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python