[Zope-Perl] Benefits of Zope multithreading
Monty Taylor
mtaylor@information-innovation.com
Wed, 06 Sep 2000 13:43:12 +0200
Gisle Aas wrote:
> The consequence of this is really that PerlMethods should not be used
> for anything that will not return fast. This probably also make the
> ZDBI_DA not very usable.
>
Damn it.
>
> I'm now investigating if there is a way to fix this. If we make sure
> references to perl data do not escape to python (that means not
> providing the "perl ref objects") then we can probably let there be
> separate perl interpreters for each thread. Then we don't need any
> perl lock at all and PerlMethods will be able to run in true parallel
> on multiple CPUs. When these PerlMethods call back to python in order
> to invoke methods on the Zope objects passed as argument(s) they will
> be sequentialised though.
>
Would this mean we couldn't instatiate a Perl Object from within Python? What
happens to dbi.py/ZDBI_DA in that case?
>
> Regards,
> Gisle
>
> > Under normal situations, where effectively all the computation is
> > done in Python, then Python's global interpreter lock prevents us
> > from taking good advantage of multiple processors. Oh well, we still
> > get concurrency, which is the main thing we want.
> >
> > Note that in applications that spend a good bit of time
> > outside the Python interpreter, lots of computation is not
> > bound by the global interpreter lock. For example, a Zope app
> > that makes alot of calls to an RDBMS gets alot of advantage.
> > A thread can be executing the interpreter while other threads
> > are blocking on database calls.
> >
> > Still, if we want to take advantage of multiple processors, we'll
> > use ZEO to run multiple Zope processes.
> >
> > Jim
>
> _______________________________________________
> Zope-perl maillist - Zope-perl@zope.org
> http://lists.zope.org/mailman/listinfo/zope-perl