Re: Reshaping the JavaSpaces architecture. Just some thoughts ...
Gregg Wonderly <[email protected]> Thu, 1 May 2008 14:52:52 -0500
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
Oliver Plohmann wrote:
> With regard to distributed event notification ... I was assuming that
> event notification is only triggered when an entry is written to the
> space, because it says on p.140 of Flenner's book ("Jini and JavaSpaces
> ..."): "JavaSpaces acts as the source of events when an entry is
> ->written<- to the space ...". So I concluded that for being notified
> about the traffic light changing from red to green a traffic light
> object with color "green" needs to be written to the space, that is
> simply changing the the value of color attribute wouldn't do. I admit
> that I had better played a bit with JavaSpaces to figure out whether
> that is the case or not. As a matter of fact, I still don't know whether
> simply changing the color value would trigger the event or not ...
If you have an entry in the space that represents the "state" of something, you
would typically update it, with a transactional take->put sequence. This would
cause a notification to allow you to then "read" the current value.
With a JMS messaging system, you'd have clients subscribed and waiting for
events. Each time the value changes, they would consume the received data and
act on it. A notification listener tells you that something changed so that you
can then act on it in the same way.
Gregg Wonderly
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html