[Spread-users] Spread for Component oriented event-based systems
Ned Konz
ned at bike-nomad.com
Fri Jan 16 20:15:47 EST 2004
On Friday 16 January 2004 2:24 pm, Ryan Caudy wrote:
> > * I am using CORBA events for my stuff. How can Spread be a better
> > option instead of CORBA in this case ?
>
> I'm not very familiar with CORBA events. Maybe someone else on the list
> is. Spread does provide an event-handling system to handle timed events
> and activity on sockets, which is used internally by Spread, but can
> also be used by client applications. Because Spread connections
> (mbox's) are ordinary sockets, facilities like select() can be used
> directly.
From this description (found at http://www.extreme.indiana.edu/xgws/papers/
events_paper/node2.html)
---
CORBA Events
A CORBA [10] event channel is an intervening object that allows multiple
suppliers to communicate with multiple consumers asynchronously. An event
channel is both a consumer and a supplier of events. Event channels are
standard CORBA objects and communication with an event channel is
accomplished using standard CORBA requests. References to the event channel
may be received from a naming service or from specific-to-task object
protocol. CORBA supports a Naming service to locate listeners, and both a
push and pull model. Event types are described using IDL, and the OMG
specification describes mechanisms for load balancing and recovery.
---
I would say that Spread:
* is a different kind of thing than CORBA (that is, there's no object model
there, just an API for sending messages (bunches of bytes with some out of
band information)).
* has only a "push" model (from the Spread point of view), unless you make it
do something different. That is, every subscriber to a group hears messages
to that group. So if you want to "pull" events, you have to "push" an event
to some other listener (via some group) to get them to start pushing events
to you.
But since Spread doesn't interpret the contents of messages, and since there's
a 2-byte message type field that you can use, you can easily set up such a
system with your own interpretation as to what "push" and "pull" means.
For instance, you could define a message type that says "could someone please
tell me about..." and then any subscribers to that group could then reply
(also to the group, or privately) with what they know. It's really quite
flexible, and much lighter weight than CORBA.
* has only a "pull" model (from the client point of view), unless you hide it
in some way. That is, each client must poll the mbox from time to time in
order to get messages or find out if any are waiting. But since the mbox is a
socket, it can be added to a select call easily.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Spread-users
mailing list