I've been looking into this also.  In fact, I was introduced to Avalon
through looking into SEDA architectures.  As Alex mentioned, event
interfaces seem to replace service interfaces.  In my opinion, service
interfaces are more intuitive, however.  The following examples are pretty
much equivalent.

Example:

Queue pizzaMakerQueue = ....;
Queue pizzaConsumerQueue = ...;
PizzaOrderEvent evt = new SimplePizzaOrderEvent("large", "supreme",
pizzaConsumerQueue);
pizzaMakerQueue.publish(evt);

Example:

PizzaMaker pizzaMaker = ...;
PizzaConsumer pizzaConsumer = ...;
pizzaMaker.placeOrder("large","supreme", pizzaConsumer);


Jonathan Hawkes


----- Original Message ----- 
From: "Timothy Bennett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 17, 2004 10:53 PM
Subject: Re: [RT] Notification pattern has interesting effects on IoC


> Alex Karasulu wrote:
> > Hi all,
> >
> > While looking at the frontend of the Eve server I began to realize a
trend
> > emerging after I introduced a central publish and subscribe facility.
The
> > pattern decouples components by enabling communication using events and
the
> > notifier pattern. This also lead to the disappearence of methods on
service
> > interfaces.
> >
> > So the dependency graph turns into a star with all components depending
on
> > the event router, hub, bus or whatever you call it in the center. Event
> > types and interfaces essentially become the dependency as opposed to the
> > service interfaces. This way you can introduce new subscribers and
> > publishers. Also the dynamic rerouting of events is possible at runtime.
> > What this means is that the dependencies between components can change
on
> > the fly! Wow not a bad thang.
> >
> > What does this mean for service interfaces? Well they start looking
bleak
> > because the Subscriber interface replaces them. Basically methods are
called
> > internally by the Subscriber handling code on the component itself
rather
> > than exposing them on the service interface for direct calls by what are
now
> > publishers. This is crazy my service interfaces are all empty now!
> >
> > Alex
>
> Alex,
>
> I've noticed the same thing with a similar avalon application that I've
> built using pub-sub event router between components.  In my mind, I've
> been trying to pro/con the services vs. notifications for about six
> months now.  Am interested on others' take on this subject.
>
> Timothy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to