river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Mehrvarz <timur.mehrv...@web.de>
Subject Re: JavaSpace.notify() "not reliable"
Date Thu, 17 May 2007 18:02:41 GMT
On 14.05.2007, at 21:58, Gregg Wonderly wrote:

> As a general rule of listener use, anytime you add a listener for some
> kind of notify, you need to query with the same template that the
> listener has to make sure that there was no item added between the  
> last
> notify/query and the next notify registration.  Odd things can really
> happen in distributed systems.

> .. using a background timer based operation to rerun the query  
> periodically.

Hi. I am still experiencing these dropped notify() calls. But with  
your two suggestions implemented, I am making sure, that no objects  
are getting lost. Only disadvantage: In case of a dropped notify()  
call, I will receive the related objects with a bit of delay. (My  
background timers checks once every second.)

In my specific case, there are _at least_ 200 ms between each space  
write() operation. And, as mentioned earlier, my master, slave and  
JavaSpace VM's are (currently) running on the same physical machine.  
This is why it is a bit hard for me to understand, how notify() can  
be so unreliable. I'd say, I am having one dropped notify() call for  
every 50 objects written to space. Roughly.

I still need to implement your third suggestion (below). I can do so  
next week. And I will report back, if this fully fixes the issue for me.

> With Javaspaces, you should typically request notification, and  
> then do a read
> to see if there is an entry that matches the same template, and  
> then take that
> entry to process it if so.

Thank you.

View raw message