[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: New Proxy cache overlay







Howard,

That's really great news!

I haven't seen the new code yet but moving out caching logic from the
backend was something I very much wanted to do. Since back-meta and proxy
cache were really backends for accessing multiple backend servers it does
make sense for them to be implemented as an overlay over proxy (back-ldap)
backends serving the backend servers. Implementing proxy cache as an
overlay also solves the problem of having to map between the proxied naming
context and the cache databases naming context. The new design also makes
easier to implement some enhancements to the proxy cache.

Thanks,
Apurva Kumar,
Research Staff Member,
IBM India Research Lab
Phone: +91-11-26861100
Fax: +91-11-26861555


                                                                                                                                            
                      "Howard Chu"                                                                                                          
                      <hyc@highlandsun.com>         To:       <openldap-devel@OpenLDAP.org>                                                 
                      Sent by:                      cc:                                                                                     
                      owner-openldap-devel@O        Subject:  New Proxy cache overlay                                                       
                      penLDAP.org                                                                                                           
                                                                                                                                            
                                                                                                                                            
                      12/05/03 08:51 PM                                                                                                     
                                                                                                                                            
                                                                                                                                            



I've just committed a rewrite of the proxy cache code, restructuring it as
an
overlay and plugging a bunch of memory leaks along the way. I intend to
remove the proxycache support from slapd & back-meta Real Soon.

I've changed the config syntax a little bit. The overlay automatically
attaches a database backend underneath the proxy. Since the two backends
are
coexisting like this, you no longer need the cacheRewrite parts of the
rewrite engine.

I've also removed the "queryid" attribute from the system schema. The
overlay
adds it to the schema at runtime now. (This change to slap.h etc is not yet
committed. It needs to be before you can compile/run the overlay though.)

I haven't re-implemented the cache consistency check yet, will use the
runqueue support for that.

Here's the config I use now for test020, which passes this test. Compare
with
the current tests/data/slapd-proxycache.conf...
####
moduleload ../servers/slapd/overlays/pcache.la

#######################################################################
# database definitions
#######################################################################

database        ldap
suffix          "o=University of Michigan,c=US"
uri             ldap://127.0.0.1:9011

overlay proxycache
proxycache      bdb 100 2 10 60
proxyattrset 0          sn cn title uid
proxyattrset 1          mail postaladdress telephonenumber cn uid
proxytemplate           (|(cn=)(sn=)) 0 60
proxytemplate           (sn=) 0 60
proxytemplate           (uid=) 1 60
proxytemplate           (mail=) 0 60

cachesize 20
directory ./testrun/db.2.a
index           objectClass     eq
index           cn,sn,uid,mail  pres,eq,sub

I suppose I'm going to have to make a real makefile for the overlays
directory now, and do something about enabling its builds in the configure
script.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support