Hi all, I need an Event system for my latest project and have looked at EventChannel (http://www.zope.org/Members/k_vertigo/Products/EventChannel), and although it seems like exactly what I need, it seems like the project is dormant (last change 2002). Is there a "best of breed" event system for Zope that I can use? Thanks Etienne PS. My requirements is to be able to have a Zope object register to be notified when certain (user defined) events occur. I'm not looking for an events calendar type of product!
On Tue, 10 Feb 2004 13:36:39 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Hi all,
I need an Event system for my latest project and have looked at EventChannel (http://www.zope.org/Members/k_vertigo/Products/EventChannel), and although it seems like exactly what I need, it seems like the project is dormant (last change 2002).
Is there a "best of breed" event system for Zope that I can use?
Have a look at: http://cvs.zope.org/Products/Event http://cvs.zope.org/Products/Scheduler http://cvs.zope.org/Products/EventListenerTool The latter two depend on the first one. The listener tool is a TTW interface for configuring event handlers. The bare event product does this purely from Python. hth, -Casey
Casey Duncan wrote:
On Tue, 10 Feb 2004 13:36:39 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Hi all,
I need an Event system for my latest project and have looked at EventChannel (http://www.zope.org/Members/k_vertigo/Products/EventChannel), and although it seems like exactly what I need, it seems like the project is dormant (last change 2002).
Is there a "best of breed" event system for Zope that I can use?
Have a look at:
http://cvs.zope.org/Products/Event http://cvs.zope.org/Products/Scheduler http://cvs.zope.org/Products/EventListenerTool
The latter two depend on the first one. The listener tool is a TTW interface for configuring event handlers. The bare event product does this purely from Python.
hth,
-Casey
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
This looks interesting, howerver it does not look maintained to much. Many of the files are still in its "first cut" state. Is this in production use? Robert
On Wed, 11 Feb 2004 05:54:18 +0100 robert rottermann <robert@redcor.ch> wrote: [..]
This looks interesting, howerver it does not look maintained to much. Many of the files are still in its "first cut" state.
Those are just the ones we got right the first time ;^)
Is this in production use?
Yes, its stable and is used by us for many projects. -Casey
Thanks for the tip. I'd prefer not to be dependant on CMF as this project does not use CMF (it uses a thick client that uses Zope purely as an app. server). Thanks anyway. Etienne At 10:25 AM 10/2/2004 -0500, Casey Duncan wrote:
On Tue, 10 Feb 2004 13:36:39 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Hi all,
I need an Event system for my latest project and have looked at EventChannel (http://www.zope.org/Members/k_vertigo/Products/EventChannel), and although it seems like exactly what I need, it seems like the project is dormant (last change 2002).
Is there a "best of breed" event system for Zope that I can use?
Have a look at:
http://cvs.zope.org/Products/Event http://cvs.zope.org/Products/Scheduler http://cvs.zope.org/Products/EventListenerTool
The latter two depend on the first one. The listener tool is a TTW interface for configuring event handlers. The bare event product does this purely from Python.
hth,
-Casey
On Wed, 11 Feb 2004 09:38:47 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Thanks for the tip. I'd prefer not to be dependant on CMF as this project does not use CMF (it uses a thick client that uses Zope purely as an app. server).
Only the EventListenerTool depends on CMF. Which is why it is a separate product. -Casey
Thanks for the update Casey, I have now switched over to this package. It's probably a better investment of my time anyway as it is more in line with Zope 3's event system? So far I have figured out how to subscribe to an Event interface and how to publish events. It took me some time to figure out that one must subscribe giving an event interface as opposed to an event class. Is there any documentation (a short walk through, howto, whatever) available? If not, I'll compile a quick one based on my own tinkering (which may not be quite that accurate!). Thanks Etienne At 09:30 AM 11/2/2004 -0500, Casey Duncan wrote:
On Wed, 11 Feb 2004 09:38:47 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Thanks for the tip. I'd prefer not to be dependant on CMF as this project does not use CMF (it uses a thick client that uses Zope purely as an app. server).
Only the EventListenerTool depends on CMF. Which is why it is a separate product.
-Casey
Etienne, I would be very interested in your notes, as I intend to use that system also. thanks Robert Etienne Labuschagne wrote:
Thanks for the update Casey, I have now switched over to this package. It's probably a better investment of my time anyway as it is more in line with Zope 3's event system?
So far I have figured out how to subscribe to an Event interface and how to publish events. It took me some time to figure out that one must subscribe giving an event interface as opposed to an event class. Is there any documentation (a short walk through, howto, whatever) available? If not, I'll compile a quick one based on my own tinkering (which may not be quite that accurate!).
Thanks Etienne
At 09:30 AM 11/2/2004 -0500, Casey Duncan wrote:
On Wed, 11 Feb 2004 09:38:47 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Thanks for the tip. I'd prefer not to be dependant on CMF as this project does not use CMF (it uses a thick client that uses Zope purely as an app. server).
Only the EventListenerTool depends on CMF. Which is why it is a separate product.
-Casey
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Hi Robert, Here are my "very first cut" ramblings on this product. This article may have errors in it and may be quite incomplete and maybe just totally wrong! Anyway, if you spot mistakes or have comments, mail them to me (or the list) and I'll fix as I get time. Look at: http://www.gmsonline.co.za/ProjectsAdmin/Blogs/gms/4/index_html Etienne At 07:28 AM 13/2/2004 +0100, robert rottermann wrote:
Etienne, I would be very interested in your notes, as I intend to use that system also. thanks Robert Etienne Labuschagne wrote:
Thanks for the update Casey, I have now switched over to this package. It's probably a better investment of my time anyway as it is more in line with Zope 3's event system?
So far I have figured out how to subscribe to an Event interface and how to publish events. It took me some time to figure out that one must subscribe giving an event interface as opposed to an event class. Is there any documentation (a short walk through, howto, whatever) available? If not, I'll compile a quick one based on my own tinkering (which may not be quite that accurate!).
Thanks Etienne
At 09:30 AM 11/2/2004 -0500, Casey Duncan wrote:
On Wed, 11 Feb 2004 09:38:47 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Thanks for the tip. I'd prefer not to be dependant on CMF as this project does not use CMF (it uses a thick client that uses Zope purely as an app. server).
Only the EventListenerTool depends on CMF. Which is why it is a separate product.
-Casey
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
merci beaucoup Etienne Robert Etienne Labuschagne wrote:
Hi Robert,
Here are my "very first cut" ramblings on this product. This article may have errors in it and may be quite incomplete and maybe just totally wrong!
Anyway, if you spot mistakes or have comments, mail them to me (or the list) and I'll fix as I get time.
Look at: http://www.gmsonline.co.za/ProjectsAdmin/Blogs/gms/4/index_html
Etienne
At 07:28 AM 13/2/2004 +0100, robert rottermann wrote:
Etienne, I would be very interested in your notes, as I intend to use that system also. thanks Robert Etienne Labuschagne wrote:
Thanks for the update Casey, I have now switched over to this package. It's probably a better investment of my time anyway as it is more in line with Zope 3's event system?
So far I have figured out how to subscribe to an Event interface and how to publish events. It took me some time to figure out that one must subscribe giving an event interface as opposed to an event class. Is there any documentation (a short walk through, howto, whatever) available? If not, I'll compile a quick one based on my own tinkering (which may not be quite that accurate!).
Thanks Etienne
At 09:30 AM 11/2/2004 -0500, Casey Duncan wrote:
On Wed, 11 Feb 2004 09:38:47 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Thanks for the tip. I'd prefer not to be dependant on CMF as this project does not use CMF (it uses a thick client that uses Zope purely as an app. server).
Only the EventListenerTool depends on CMF. Which is why it is a separate product.
-Casey
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Fri, 13 Feb 2004 07:57:56 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Thanks for the update Casey, I have now switched over to this package. It's probably a better investment of my time anyway as it is more in line with Zope 3's event system?
Yes, it is based on it from a while back. However the latter is still a moving target.
So far I have figured out how to subscribe to an Event interface and how to publish events. It took me some time to figure out that one must subscribe giving an event interface as opposed to an event class. Is there any documentation (a short walk through, howto, whatever) available? If not, I'll compile a quick one based on my own tinkering (which may not be quite that accurate!).
Other than what is in the package, probably not. Anything you write would be very helpful for others. -Casey
I have mostly figured out the event system by now, but cannot figure out how to get the scheduler to fire scheduled tasks by itself. Isn't the scheduler supposed to fire off scheduled tasks once their next scheduled time comes up? The only time when mine fires up tasks is when I trigger it manually from the ZMI. Any help on this would be most helpful. Etienne At 09:36 AM 13/2/2004 -0500, Casey Duncan wrote:
On Fri, 13 Feb 2004 07:57:56 +0200 Etienne Labuschagne <elabuschagne@gmsonline.co.za> wrote:
Thanks for the update Casey, I have now switched over to this package. It's probably a better investment of my time anyway as it is more in line with Zope 3's event system?
Yes, it is based on it from a while back. However the latter is still a moving target.
So far I have figured out how to subscribe to an Event interface and how to publish events. It took me some time to figure out that one must subscribe giving an event interface as opposed to an event class. Is there any documentation (a short walk through, howto, whatever) available? If not, I'll compile a quick one based on my own tinkering (which may not be quite that accurate!).
Other than what is in the package, probably not. Anything you write would be very helpful for others.
-Casey
On Thursday 19 February 2004 07:25 am, Etienne Labuschagne wrote:
I have mostly figured out the event system by now, but cannot figure out how to get the scheduler to fire scheduled tasks by itself. Isn't the scheduler supposed to fire off scheduled tasks once their next scheduled time comes up? The only time when mine fires up tasks is when I trigger it manually from the ZMI.
My initial experiments with Zope event systems like Xron was not that promising, and I realized it doesn't matter that much. I solved the problem by creating a "heartbeat" method in the object that is supposed to be triggered by an XML-RPC call. It's a very quick method that checks to see if sufficient time has elapsed (or whatever criteria you want to use) to decide if it needs to run scheduled events. Then it's trivial to set up a system on the server to fire that heartbeat method periodically. I'll attach a sample heartbeat script which I wrote for that purpose (probably needs to be cleaned up to work for other people, though). This is only if you need quite frequent heartbeats (which corresponds to more precise timing or more frequent events). For heartbeats of less than once a minute, it'd probably be more reliable to set up a regular cron job. This is great, easy to test both the heartbeat method and the heartbeat generator, and does the job. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
Sorry. GPL disclaimer missing from the source file -- corrected version attached. -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
Etienne Labuschagne wrote at 2004-2-19 15:25 +0200:
I have mostly figured out the event system by now, but cannot figure out how to get the scheduler to fire scheduled tasks by itself. Isn't the scheduler supposed to fire off scheduled tasks once their next scheduled time comes up? The only time when mine fires up tasks is when I trigger it manually from the ZMI.
Thus use "cron" (via "ZPublisher.Client", "wget", "curl" or "urllib") to tigger it periodically (as a replacement for your manual trigger). -- Dieter
Thanks for the feedback Dieter and Terry, Using a cron job is probably the fastest, easiest and most pragmatic way for us programmers. My job as a programmer, however, is to make life even easier for my clients. My clients mostly use Windows and gets a glazed look in their eyes when I start talking about running this script and running that script. As it is, I already have endless hassles on why my solution doesn't have a one-click installer :( I am therefore always trying to automate as much as possible within my product (I usually create a Zope product for a specific project that contains all the specific customizations for that project - it makes deployment much easier). Previously I have used the following solution for scheduling tasks (and was hoping that Scheduler could replace this): In one of the modules in my Product, I have a method that runs in a thread (boy, did it take me a while to tie down my knowledge on accessing the ZODB from threads!) and periodically calls a method via RPC. The thread is of course registered (with asyncore or something) to start up after Zope tells it to. This thread knows how to safely open a connection into the ZODB, retrieve information on where to find the methods it must fire (I store the paths in the root of the ZODB in a PersistentMapping - probably naughty, but works like a charm) and fire those methods every x seconds. This is probably hackish, inelegant, or any other nasty term you can think of, but I cannot think of any better way to solve this - from within Zope. I would be cool if a "heartbeat" could be built into the scheduler or event system - maybe I must have a go at it myself ;) Etienne At 08:58 PM 19/2/2004 +0100, Dieter Maurer wrote:
Etienne Labuschagne wrote at 2004-2-19 15:25 +0200:
I have mostly figured out the event system by now, but cannot figure out how to get the scheduler to fire scheduled tasks by itself. Isn't the scheduler supposed to fire off scheduled tasks once their next scheduled time comes up? The only time when mine fires up tasks is when I trigger it manually from the ZMI.
Thus use "cron" (via "ZPublisher.Client", "wget", "curl" or "urllib") to tigger it periodically (as a replacement for your manual trigger).
-- Dieter
easier for my clients. My clients mostly use Windows and gets a glazed look in their eyes when I start talking about running this script and running that script. As it is, I already have endless hassles on why my solution doesn't have a one-click installer :(
Depending on what exactly your situation is, you might be able to get a setup.exe It is not very hard to take the orginial zope installer and use wise to recompile including a different data.fs/product collection. This way you could package your soulation as a one-click installer. Douwe Osinga http://douweosinga.com
On Thursday 19 February 2004 11:28 pm, Etienne Labuschagne wrote:
Thanks for the feedback Dieter and Terry,
Using a cron job is probably the fastest, easiest and most pragmatic way for us programmers. My job as a programmer, however, is to make life even easier for my clients. My clients mostly use Windows and gets a glazed look in their eyes when I start talking about running this script and running that script.
Actually, in my experimental tests, I launched the heartbeat script I showed you via os.system() from a trigger in __setstate__ in my product's instance. So it doesn't require the user to do anything extra. I haven't tested this in a production environment, but it worked in my prototype (I was using this to have a "store" app interface to the credit processor by sending an email, then catching the reply -- so it had to check the mailbox periodically. In my tests, I was using my email aliasing to just forward the email back to the server's listening address). Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
FWIW, I created a Zope branch that has a "clock server" which doesn't require a third-party process to act as a clock. It's in CVS as the chrism-scheduling-branch branch. See http://www.plope.com/Members/chrism/more_scheduling/newsitem_view for more information. On Fri, 2004-02-20 at 08:45, Terry Hancock wrote:
On Thursday 19 February 2004 11:28 pm, Etienne Labuschagne wrote:
Thanks for the feedback Dieter and Terry,
Using a cron job is probably the fastest, easiest and most pragmatic way for us programmers. My job as a programmer, however, is to make life even easier for my clients. My clients mostly use Windows and gets a glazed look in their eyes when I start talking about running this script and running that script.
Actually, in my experimental tests, I launched the heartbeat script I showed you via os.system() from a trigger in __setstate__ in my product's instance. So it doesn't require the user to do anything extra.
I haven't tested this in a production environment, but it worked in my prototype (I was using this to have a "store" app interface to the credit processor by sending an email, then catching the reply -- so it had to check the mailbox periodically. In my tests, I was using my email aliasing to just forward the email back to the server's listening address).
Cheers, Terry
-- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Etienne Labuschagne wrote at 2004-2-10 13:36 +0200:
I need an Event system for my latest project and have looked at EventChannel (http://www.zope.org/Members/k_vertigo/Products/EventChannel), and although it seems like exactly what I need, it seems like the project is dormant (last change 2002).
Try whether it still works. If not, almost surely, only minor things need a fix... -- Dieter
If no better suggestions were forthcoming, that was what I planned to do as it seems like exactly what I need - I have already fixed some bugs and should get it working nicely. Thanks Etienne At 07:53 PM 10/2/2004 +0100, Dieter Maurer wrote:
Etienne Labuschagne wrote at 2004-2-10 13:36 +0200:
I need an Event system for my latest project and have looked at EventChannel (http://www.zope.org/Members/k_vertigo/Products/EventChannel), and although it seems like exactly what I need, it seems like the project is dormant (last change 2002).
Try whether it still works.
If not, almost surely, only minor things need a fix...
-- Dieter
participants (7)
-
Casey Duncan -
Chris McDonough -
Dieter Maurer -
Douwe Osinga -
Etienne Labuschagne -
robert rottermann -
Terry Hancock