namecache redesign

Christopher R. Hertel crh at ubiqx.mn.org
Sun Sep 1 04:45:01 GMT 2002


On Sun, Sep 01, 2002 at 03:22:37AM -0400, tridge at samba.org wrote:
> > I'll just mention that the caching code in the ubiqx subdirectory is fully
> > capable of handling all of this stuff.
> 
> ahh, no, not even close!

Ahh.  I didn't realize that you wanted a persistent cache, though I'm a
bit concerned with the idea of caching NBT name resolution long-term.  A
local NBT name cache should last only a few minutes.  Sure, it might be
nice to have some name resolution if the NBNS is down but with NBT things
can change pretty quickly.  I'm thinking about things like the LMB name.  
At startup, if the LMB name is in the cache will smbd use that mapping or
call for an election?  What happens if the mapping is no longer valid?
What happens if there were changes in smb.conf that, for example, cause 
Samba's status as a master browser to be [up|down]-graded?

I've obviously missed the design discussion on this, and you've probably
got those questions figured out...but I'm curious.

I'm probably thinking of this in a very different way, of course, as I'm
firmly stuck in theory-land rather than practice-land these days.  I'd
want to put the NBT name cache into nmbd and have smbd talk to nmbd for
all local name resolution.  I know that's not the way things are done
(except via the unexpected.tdb).  I'm thinking more in terms of layering
the protocol stacks, which would put SMB on top of NBT and the issue of
caching NBT namespace would be entirely transparent to smbd.

Chris -)-----

> The cache needs to be persistent, and needs to be shared between
> processes. It also needs to be able to be managed externally (I
> proposed a 'net cache' interface). It should be pretty simple to
> implement on top of tdb though.
> 
> The reason it needs to be persistant is that we will use gencache to
> perform longer term caching of some information, for example the
> mapping between the workgroup name and the realm name. Doing
> persistant caching of NBT names will also be useful to cope with a
> WINS server being down at startup.
> 
> Cheers, Tridge

-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the samba-technical mailing list