Re: JavaSpace.notify() "not reliable"
Dan Creswell <[email protected]> Tue, 15 May 2007 20:09:11 +0100
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
Mark Brouwer wrote: > Gregg Wonderly wrote: > >> Except for notify not working across firewalls, etc. I've just >> written off the conveniences of listeners. They won't work in all > > Which I consider a pity as 'event driven programming' as you say is very > convenient and in case of the inverted event model (polling in the > smart proxy) you really make use of the mobile code aspect opposed of > people polling themselves (writing a decent polling mechanism is often > more work as one believes it is in the first place). > >> situations without a polling based implementation (as Mark has done >> in Seven/"The JSC"). The only working mode is to register the >> listener (so that you can get immediate notifications on local >> networks where latency will be expected to be minimal), then >> make the query to see if there are any there (which covers both the >> data race >> in the server and the non-working call back on listeners case). Finally, >> using a background timer based operation to rerun the query >> periodically. I've actually pushed this into a recovery strategy for >> failed notify() registrations as well. > > Due to the ease of implementing distributed events as part of your > service with Seven (both Jini distributed events as the inverted JSC > event model) I've used distribute events a lot (next to the ordinary > query methods for bootstrapping etc.) but I always ended up with an > 'alive' notification scheme. As part of the remote events to be received > one should expect a NOOP remote event top indicating the server is alive > and kicking if it has no actual remote event to send and also for the > first remote event to validate whether callback in case of the Jini > Distributed Event Model does work, if not one could decide to switch to > the 'inverted' event model. > Hmmmmm as yet I'm not clear - what are these NOOP events intended to convey? Is it a liveness test or simply an indication that probably no events have been dropped or something else? > I wonder whether such a 'I'm alive' notifications have ever been > considered as part of the event protocol for JavaSpaces and Lookup > Server. I think it is not too late to add these to the event protocols > by making them optional and to enabled them through the usage of some > invocation constraint. So far I always coded the 'I'm alive' > notification scheme myself but this could even be shifted to the > framework part, although that is totally irrelevant for the discussion > whether such a scheme would be worth 'standardizing'. > -- > Mark > > =========================================================================== > 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