You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Vincent Tence <vt...@videotron.ca> on 2004/02/18 02:23:48 UTC

Re: [RT] Notification pattern has interesting effects on IoC

On Wed, 2004-02-18 at 04:44, 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! 

Which is cool, cuz it means yours components can be POJOs. Can you wire
the entire system at startup and get rid of the need to support
different component frameworks? Only the bootstrap mechanism would be
dependant of the kernel used.

> 
> Alex
> 
>