Re: [Zope] threading cont ... boundary="------------98A416F9F4157B1993D63C72"
Nicholas Lo writes:
... database modification seen inside but not outside of process ...
Obviously, the database modifications have not been commited. Auto-Commit in Zope is coupled to *one* thread serving the request: It works by registering with the "transaction" associated with the current thread. At the end of a request the transaction of the current thread is commited (or aborted, if an error occured). If registration is done in a different thread, the actions are not commited/aborted at the end of the request. Why do you want to make your life more difficult by splitting a Zope thread into several? Dieter
Dieter Maurer wrote:
Nicholas Lo writes:
... database modification seen inside but not outside of process ...
Obviously, the database modifications have not been commited.
Auto-Commit in Zope is coupled to *one* thread serving the request:
It works by registering with the "transaction" associated with the current thread. At the end of a request the transaction of the current thread is commited (or aborted, if an error occured).
If registration is done in a different thread, the actions are not commited/aborted at the end of the request.
Why do you want to make your life more difficult by splitting a Zope thread into several?
Dieter
oic ... so, is there anyway to make database routines run in separate threads? In fact, I'm trying to use ZOPE to do some automation, eg. reminder emails, news clipping, or maybe some WAP applications as well. I want to make it able to schedule itselfs so as to better utilise resources, make ZOPE more or less real-time, and to prevent overloading or spam from the content source. Well, since ZOPE runs from source, I think we may extend it to do some remote control works as well. eg. redirect your fax at home to your email account, allow you to listen to your home voice mails, etc. anyway, thanks Nicholas Lo
On Wed, Aug 09, 2000 at 10:12:50AM +0800, Nicholas Lo wrote:
In fact, I'm trying to use ZOPE to do some automation, eg. reminder emails, news clipping, or maybe some WAP applications as well. I want to make it able to schedule itselfs so as to better utilise resources, make ZOPE more or less real-time, and to prevent overloading or spam from the content source. Well, since ZOPE runs from source, I think we may extend it to do some remote control works as well. eg. redirect your fax at home to your email account, allow you to listen to your home voice mails, etc.
Have a look at ZScheduler, which just just that. If not exactly what you need, it will certainly show you how to access the Zope database from a seperate thread: http://www.zope.org//Members/lstaffor/ZScheduler -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio -----------------------------------------------------
ZScheduler has been superceded by Xron http://www.zope.org/Members/lstaffor/Xron -- Loren From: "Martijn Pieters" <mj@digicool.com>
On Wed, Aug 09, 2000 at 10:12:50AM +0800, Nicholas Lo wrote:
In fact, I'm trying to use ZOPE to do some automation, eg. reminder emails, news clipping, or maybe some WAP applications as well. I want to make it able to schedule itselfs so as to better utilise resources, make ZOPE more or less real-time, and to prevent overloading or spam from the content source. Well, since ZOPE runs from source, I think we may extend it to do some remote control works as well. eg. redirect your fax at home to your email account, allow you to listen to your home voice mails, etc.
Have a look at ZScheduler, which just just that. If not exactly what you need, it will certainly show you how to access the Zope database from a seperate thread:
Nicholas Lo wrote:
so, is there anyway to make database routines run in separate threads?
Me too! (tm) What I'd really like to do is to cpu intensive stuff (like mass cataloging ;-) in a seperate thread or process so that Zope's responsiveness doesn't die when those things happen (even though it's running on a multiprocessor machine ;-) Any ideas? cheers, Chris
+----[ Chris Withers ]--------------------------------------------- | Nicholas Lo wrote: | > so, is there anyway to make database routines run in separate threads? | | Me too! (tm) | | What I'd really like to do is to cpu intensive stuff (like mass | cataloging ;-) in a seperate thread or process so that Zope's | responsiveness doesn't die when those things happen (even though it's | running on a multiprocessor machine ;-) | | Any ideas? Multiple database connectors... Multiple Zopes + ZEO... -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
participants (6)
-
Andrew Kenneth Milton -
Chris Withers -
Dieter Maurer -
Loren Stafford -
Martijn Pieters -
Nicholas Lo