Re: LookupCache, ServiceDiscoveryListener and discard guarantees

Mark Brouwer <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Gregg Wonderly wrote:
> Mark Brouwer wrote:
>> Given all the stuff LookupCache takes care off and the amount of time
>> that goes in building "state maintaining utilities while getting input
>> from a thousand places". I really try to understand why one wants to
>> build something similar although different, has it something to do with
>> the reliance on remote events or your particular lookup service API?
>
> The primary impetus is, in fact, remote events and the fact that they
> might not be delivered.  Thus, my code, because it periodically polls, will
> eventually discover missing services.  It doesn't audit for service
 > deregistrations though, so I don't drop services explicitly.  Rather the
 > "cache" reflects what is currently visible.

Ok I see Gregg, I take "remote events and the fact that they might not
be delivered" as that some infrastructural components may be in your way
that prevent from events being delivered. If you mean a random event
being missed or out of sync the SDM knows how to recover from that by
performing a complete lookup at the ServiceRegistrar so that is not
something to worry about with SDM [1].

FWIW in case you want to have a SDM implementation that can work with
pull style events based ServiceRegistrarX (from the "Jini across the
Firewall" presentation) provides this model and a modified SDM that can
take benefit of this is part of the Seven Suite, in fact when using SDM
from web applications that often end up in a DMZ or run from a webapp
container I always utilize this model. The clients doesn't need to
become server, no random ports utilized, etc. Bottom line it allows me
to use the SDM from a pure client environment while still getting the
callbacks from the lookup server.

[1] in case you have a lookup service that leaves gaps in the event
sequence number you will notice SDM becomes rather inefficient because
due to each gap encountered it will perform a complete lookup against
the lookup server.
--
Mark

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.