Andrzej,
I read through your event mechanism description and, believe it or not, it is
almost identical to the event mechanism that was developed for JavaOS. I think
the fact that you independently came up with an event mechanism that is very
close to the event mechanism that the pricipal designer of Apple's PCI device
driver architecture, Sun and IBM arrived at after years of effort is
significant.
Here is the summary that is at the end of the Event System chapter in the
JavaOS book:
"There are several advantages to using an event broker. Consumers can register
in one place to receive events from all producers of events of that type. New
producers of the event type can be added at any time, and existing consumers of
the event type will automatically receive events from the new producer. Event
queuing and dispatch code are centralized, and event delivery can be
prioritized."
As for the event types themselves, we both ended up going with one
EmbedletEventListener interface and multiple event types which inherit from a
single EmbedletEvent class. The fully qualified names of the event sub-classes
seem to be an elegant way to globally uniquely identify event types.
Where our current approaches differ is 1) direct event registering vs.using an
event broker and 2) having multiple interfaces for registering event listeners
on a event producer vs. having one generic event registration interface for all
producers.
I have read through the JavaOS event chapter multiple times and I have heavily
marked it up. There are a number of things I really like about the event
broker approach. The two things I am presently unsure of are whether or not an
event broker still allows software components to be wired together graphically
and whether or not it is too heavyweight an approach for the needs of an
embedded system. JavaOS is a full blown operating system that requires a lot
of thing to happen dynamically. I am not sure how dynamic a typical embedded
system needs to be.
I think that some more discussion on this topic and some experimenting would be
sufficient to clarify these two issues for me.
Is there any chance that I could persuade you to obtain a copy of the JavaOS
book (Inside the JavaOS Operating System, Saulpaugh and Mirho, Addison-Wesley,
ISBN 0-201-18393-5, available from Amazon) so that we can discuss the merits of
an event broker approach using a working and proven example as a starting
point?
Ted
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
|