Re: Reshaping the JavaSpaces architecture. Just some thoughts ...
Oliver Plohmann <[email protected]> Thu, 1 May 2008 20:51:16 +0200
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
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 ...
Regards, Oliver
Geoffrey Arnold wrote:
> Wouldn't this work:
>
>
> public class TrafficLight implements Serializable {
> public String color;
> }
>
> public class GreenMeansGo implements RemoteEventListener {
> public void notify(RemoteEvent event) {
> // GO!
> }
> }
>
> TrafficLight template = new TrafficLight();
> template.color = "GREEN";
>
> GreenMeansGo listener = new GreenMeansGo();
>
> BasicJeriExporter listenerExporter = new BasicJeriExporter(
> TcpServerEndpoint.getInstance(0),
> new BasicILFactory()
> );
> GreenMeansGo listenerProxy = (GreenMeansGo)
> listenerExporter.export(listener);
>
> javaSpace.notify(template, null, listenerProxy, Lease.FOREVER, null);
>
>
> Geoff.
>
> On Wed, Apr 30, 2008 at 4:55 AM, Oliver Plohmann <[email protected]> wrote:
>
>>
>> Hi there!
>>
>> I had a look at tuple spaces and JavaSpaces a while ago and really liked the
>> approach. I think a central data store is a good idea for distributed
>> processing of data (calculations, data analysis, etc.). However, there is a
>> problem if it's not only about distributed processing. Let's say you need to
>> be notified if some traffic light changes from red to green. You don't want
>> to poll the traffic light all the time, right?
>>
>> So what I'm thinking of is to add distributed message passing to JavaSpaces
>> for distributed event notification. In that context it would make sense to
>> reshape the JavaSpaces architecture to be fit for todays needs in enterprise
>> computing: replace the Jini stuff with JNDI or an ESB, use a cache provider
>> such as JBoss Cache, or some other cache system, or use the respective parts
>> of the Blitz project if permitted, add JMS for distributed event
>> notification and communication with the central tuple space, use Spring for
>> XML configuration and/or IoC if needed, extend the JavaSpaces API to address
>> the new architecture, make sure the API remains simple and consistent, and,
>> and, and, ...
>>
>> I guess the Jini folks will now get mad at me. What I'm mentioning here are
>> just some ideas. I just want to see what other people think about this and
>> share some opinions. Maybe some guys could be found to start an open source
>> project. Would be fun ... ;-)
>>
>> Regards, Oliver Plohmann
>>
>>
>> www.objectscape.org
>> ===========================================================================
>> 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
>>
>
> ===========================================================================
> 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
>
>
--
www.objectscape.org
===========================================================================
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