ACK!!!!! Re: [Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/LocalEventService - LocalEventChannel.py:1.7 LocalEventService.py:1.11 ProtoServiceEventChannel.py:1.4 LocalServiceSubscribable.py:1.9 LocalSubscribable.py:1.7

Gary Poster gary@modernsongs.com
Thu, 12 Dec 2002 15:51:12 -0500


Ulrich Eck wrote:
> Hi Gary,
> 
> with the current implementation: storing references/hardlinks of 
> subscribers
> an deliver events with ContextWrapper(subscriber, 
> eventchannel).notify(event)
> the receiving component is not notified within the right context.

OK.  We'll need to get some unit tests that reproduce this, and then fix 
it.  Would you be willing to switch off responsibility--you write some 
tests, and I'll try to fix it up?

> It's possibly a security-problem and the current implementation of 
> PathSubscriber
> caches interface-info which might change over time, says steve.

Ah, how tiresome: that's correct.  Steve is right.  I'll fix that.

> It is impossible to use local Services when the eventservice is not 
> within the
> same servicemanger. I need this for my prototyping of a TaskSchedule that
> starts a thread after it got an ZopeStartupEvent (another thing i'm working
> on: LifeCycleEvents -> see proposals).

I don't see why this is impossible.  I'll get on IRC in a moment and see 
if I can follow what the problem is.

> That's why i started a discussion in IRC today and steve suggested to use
> location as subscriber-reference. the current implementation has now
> two different mechanisms for global vs. local which i'm not happy with.

Two mechanisms?  Do you mean the difference between placeful and 
placeless?  I'll get on IRC for a bit.

> I looked at Zope.Events.ISubscribable and see what you mean. Are there
> any details for the implementation or a branch that i could try?

I haven't checked one in because I was playing with it and didn't have 
tests for it yet.  I'll send you what I have privately.

> or should implementations of subscribers that need to be called placefully
> just use PathSubscriber for subscribing themselfs ??

Yes, subscribers in the current design that need to subscribe themselves 
placefully to a service must use an indirect subscriber such as a 
pathsubscriber or an object hub subscriber.  An object hub subscriber 
would be better (and it is very easy to write)

Gary