asmuts      2005/01/27 20:52:50

  Modified:    xdocs    RemoteAuxCache.xml navigation.xml index.xml
                        BasicJCSConfiguration.xml
               .        project.xml
  Added:       xdocs    ElementAttributes.xml
  Log:
  updated documentation:
  added some docs on element configuration;
  described how to chain remote servers;
  fixed some missing info in other docs.
  
  Revision  Changes    Path
  1.3       +59 -28    jakarta-turbine-jcs/xdocs/RemoteAuxCache.xml
  
  Index: RemoteAuxCache.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/RemoteAuxCache.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RemoteAuxCache.xml        14 Jul 2004 03:51:35 -0000      1.2
  +++ RemoteAuxCache.xml        28 Jan 2005 04:52:50 -0000      1.3
  @@ -4,7 +4,7 @@
     <properties>
       <title>Remote Auxiliary Cache Client / Server</title>
       <author email="[EMAIL PROTECTED]">Pete Kazmier</author>
  -    <author email="[EMAIL PROTECTED]">Aaron Smuts</author>
  +    <author email="[EMAIL PROTECTED]">Aaron Smuts</author>
     </properties>
   
     <body>
  @@ -13,7 +13,7 @@
           The Remote Auxiliary Cache is an optional plug in for JCS.  It
           is intended for use in multi-tiered systems to maintain cache
           consistency.  It uses a highly reliable RMI client server
  -        framework that currently allows for up to 256 clients.  Using a
  +        framework that currently allows for any number of clients.  Using a
           listener id allows multiple clients running on the same machine
           to connect to the remote cache server.  All cache regions on one
           client share a listener per auxiliary, but register separately.
  @@ -157,25 +157,26 @@
   registry.port=1102
   # call back port to local caches.
   remote.cache.service.port=1102
  -# tomcat config
  -remote.tomcat.on=false
  -remote.tomcat.xml=
  -    g:/dev/jakarta-turbine-stratum/bin/conf/remote.tomcat.xml
   # cluster setting
   remote.cluster.LocalClusterConsistency=true
           ]]></source>
           <p>
  -          The cluster configuration section is currently considered
  -          experimental.  The <code>LocalClusterConsistency</code>
  +          Remote servers can be chainied (or clustered).  This allows
  +          gets from local caches to be distributed between multiple 
  +          remote servers.  Since gets are the most common operation for
  +          caches, remote server chaining can help scale a caching solution.
  +     </p>
  +     <p>
  +       The <code>LocalClusterConsistency</code>
             setting tells the remote cache server if it should broadcast
             updates received from other cluster servers to registered
             local caches.
           </p>
           <p>
  -          To use experimental clustering, the remote cache will have to
  +          To use remote server clustering, the remote cache will have to
             be told what regions to cluster.  The configuration below will
             cluster all non-preconfigured regions with
  -          <code>RCluster1</code>.
  +          <code>RCluster1</code>.  
           </p>
           <source><![CDATA[
   # sets the default aux value for any non configured caches
  @@ -193,24 +194,54 @@
   jcs.auxiliary.RCluster1.attributes.ClusterServers=localhost:1103
   jcs.auxiliary.RCluster1.attributes.GetOnly=false
           ]]></source>
  -      </subsection>
  -      <subsection name="TODO">
  -        <p>
  -          The clustering behavior needs to be better defined.  We may
  -          want to implement clustering with lateral caches between
  -          remotes rather than remote caches talking to each other.
  -        </p>
  -        <p>
  -          Though small, the remote server configuration could be a bit
  -          cleaner.
  -        </p>
  -        <p>
  -          The embedded Tomcat is not workable right now.
  -        </p>
  -        <p>
  -          Parameters need to be added for running the XML-RPC server as
  -          well.
  -        </p>
  +     <p>  
  +       RCluster1 is configured to talk to
  +          a remote server at <code>localhost:1103</code>.  Additional
  +          servers can be added in a comma separated list.
  +        </p>
  +        <p>
  +          If we startup another remote server listening to port 1103, 
  +          (ServerB) then we can have that server talk to the server we have
  +          been configuring, listening at 1102 (ServerA).  This would allow 
us 
  +          to set some local caches to talk to ServerA and some to talk 
  +          to ServerB.  The two remote servers will broadcast
  +          all puts and removes between themselves, and the get requests
  +          from local caches could be divided.  The local caches do not
  +          need to know anything about the server chaining configuration,
  +          unless you want to use a standby, or failover server.
  +        </p>
  +        <p>
  +       We could also use ServerB as a hot standby.  This can be done in
  +       two ways.  You could have all local caches point to ServerA as
  +       a primary and ServerB as a secondary.  Alternatively, you can 
  +       set ServerA as the primary for some local caches and ServerB for 
  +       the primary for some others.  
  +     </p>
  +        <p>
  +       The local cache configuration below uses ServerA as a primary and
  +       ServerB as a backup.  More than one backup can be defined, but
  +       only one will be used at a time.  If the cache is connected
  +       to any server except the primary, it will try to restore the
  +       primary connection indefinitely, at 20 second intervals.
  +     </p>
  +             <source><![CDATA[
  +     # Remote RMI Cache set up to failover
  +     jcs.auxiliary.RFailover=
  +         org.apache.jcs.auxiliary.remote.RemoteCacheFactory
  +     jcs.auxiliary.RFailover.attributes=
  +         org.apache.jcs.auxiliary.remote.RemoteCacheAttributes
  +     jcs.auxiliary.RFailover.attributes.FailoverServers=
  +         localhost:1102,localhost:1103
  +     jcs.auxiliary.RC.attributes.RemoveUponRemotePut=true
  +     jcs.auxiliary.RFailover.attributes.GetOnly=false
  +             ]]></source>
  +        <p>
  +       Note: Since, as of now, the remote cluster servers do not attempt to 
get items 
  +       from each other, when the primary server comes up, if it does not
  +       have a disk store, it will be cold.  When clustered gets are enable
  +       or when we have a load all on startup option, this problem
  +       will be solved.
  +     </p>
         </subsection>
       </section>
     </body>
  
  
  
  1.6       +1 -0      jakarta-turbine-jcs/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/navigation.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- navigation.xml    14 Jul 2004 04:48:50 -0000      1.5
  +++ navigation.xml    28 Jan 2005 04:52:50 -0000      1.6
  @@ -16,6 +16,7 @@
         <item name="Overview"             href="/index.html"/>
         <item name="JCS and JCACHE"       href="/JCSandJCACHE.html"/>
         <item name="Basic JCS Config"     href="/BasicJCSConfiguration.html"/>
  +      <item name="Element Config"       href="/ElementAttributes.html"/>
         <item name="Basic Web Example"    href="/UsingJCSBasicWeb.html"/>
         <item name="Plugin Overview"      href="/Plugins.html"/>
         <item name="Local Cache"          href="/LocalCacheConfig.html"/>
  
  
  
  1.3       +2 -2      jakarta-turbine-jcs/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/index.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.xml 14 Jul 2004 03:51:35 -0000      1.2
  +++ index.xml 28 Jan 2005 04:52:50 -0000      1.3
  @@ -38,10 +38,10 @@
           <li>Fully configurable runtime parameters</li>
           <li>Remote synchronization</li>
           <li>Remote store recovery</li>
  -        <li>Non-blocking "zombie" (balking fa ade) pattern</li>
  +        <li>Non-blocking "zombie" (balking facade) pattern</li>
           <li>Optional lateral distribution of elements via HTTP, TCP, or
             UDP</li>
  -        <li>Remote server clustering and failover (almost complete)</li>
  +        <li>Remote server chaining (or clustering) and failover</li>
         </ul>
         <p> 
           These features provide a framework with no point of failure,
  
  
  
  1.5       +10 -2     jakarta-turbine-jcs/xdocs/BasicJCSConfiguration.xml
  
  Index: BasicJCSConfiguration.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/xdocs/BasicJCSConfiguration.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BasicJCSConfiguration.xml 13 Jan 2005 09:12:44 -0000      1.4
  +++ BasicJCSConfiguration.xml 28 Jan 2005 04:52:50 -0000      1.5
  @@ -42,6 +42,8 @@
   jcs.default.cacheattributes.cacheattributes.MaxMemoryIdleTimeSeconds=3600
   jcs.default.cacheattributes.cacheattributes.ShrinkerIntervalSeconds=60
   jcs.default.cacheattributes.MaxSpoolPerRun=500
  +jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
  +jcs.default.elementattributes.IsEternal=false
           ]]></source>
           <p>
             Adding a <a href="IndexedDiskAuxCache.html">disk cache</a> is
  @@ -55,7 +57,7 @@
       org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
   jcs.auxiliary.DC.attributes=
       org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
  -jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jakarta-turbine-stratum/raf
  +jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jcs/raf
           ]]></source> 
           <p>
             and (2) change the first line to:
  @@ -78,6 +80,9 @@
   jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
   jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
   jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
  
+jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAttributes
  +jcs.region.testCache1.elementattributes.IsEternal=false
  +
           ]]></source>
           <p>
             If you want to add a lateral cache for distribution (the <a
  @@ -144,13 +149,16 @@
   jcs.region.testCache1.cacheattributes.MaxMemoryIdleTimeSeconds=3600
   jcs.region.testCache1.cacheattributes.ShrinkerIntervalSeconds=60
   jcs.region.testCache1.cacheattributes.MaxSpoolPerRun=500
  
+jcs.region.testCache1.elementattributes=org.apache.jcs.engine.ElementAttributes
  +jcs.region.testCache1.elementattributes.IsEternal=false
  +
   
   # AVAILABLE AUXILIARY CACHES   
   jcs.auxiliary.DC=
       org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
   jcs.auxiliary.DC.attributes=
       org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
  -jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jakarta-turbine-stratum/raf
  +jcs.auxiliary.DC.attributes.DiskPath=g:/dev/jcs/raf
   jcs.auxiliary.DC.attributes.maxKeySize=100000
   
   jcs.auxiliary.LTCP=
  
  
  
  1.1                  jakarta-turbine-jcs/xdocs/ElementAttributes.xml
  
  Index: ElementAttributes.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <document>
    <properties>
      <title>Element Attribute Configuration</title>
      <author email="[EMAIL PROTECTED]">Aaron Smuts</author>
    </properties>
  
    <body>
      <section name="Element Attribute Configuration"> 
        <p>
          The following document describes the various
          configuration options available for cache elements.
          Each element put into the cache can be configured 
          independently.  You can define element behavior in
          three ways: as a default setting, as a region setting,
          or at the element level.
        </p>
          
        <subsection name="Setting the defaults">
          <p>
          The configuration below can be put in the cache.ccf
          configuration file.  It establishes the default behavior
          for all regions.  A region can override these defaults and
          an individual element can overide these defaults and
          the region settings.
          </p>
          <source><![CDATA[
  # DEFAULT CACHE REGION   
  
  jcs.default=DC
  jcs.default.cacheattributes=
      org.apache.jcs.engine.CompositeCacheAttributes
  jcs.default.cacheattributes.MaxObjects=1000
  jcs.default.cacheattributes.MemoryCacheName=
      org.apache.jcs.engine.memory.lru.LRUMemoryCache
  jcs.default.cacheattributes.UseMemoryShrinker=true
  jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600
  jcs.default.cacheattributes.ShrinkerIntervalSeconds=60    
  jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
  jcs.default.elementattributes.IsEternal=false
  jcs.default.elementattributes.MaxLifeSeconds=700
  jcs.default.elementattributes.IdleTime=1800
  jcs.default.elementattributes.IsSpool=true
  jcs.default.elementattributes.IsRemote=true
  jcs.default.elementattributes.IsLateral=true    
          ]]></source>
          <p>
            The default and region configuration settings have three
            components.  They define what auxiliaries are available, 
            how the cache should control the memory, and how the elements
            should behave.  This configuration tells all regions to use
            an auxiliary called DC by default.  It also establishes
            several settings for memory management (see <a
              href="BasicJCSConfiguration.html">Basic JCS Configuration</a> 
              for more information on the cacheattribute settings).  In 
addition, 
              by default all regions will take these element configuration 
            settings.  
          </p>
          <p>
            These settings specify that elements are not eternal, i.e. they 
            can expire.  By default elements are considered eternal.  
          </p>    
          <p>
            You can define the maximum life of an item by setting the
            <code>MaxLifeSeconds</code> parameter.  If an item has been in 
            the cache for longer than the set number of seconds it will
            not be retrieved on a get request.  If you use the memory shrinker
            the item will be actively removed from memory.  Currently there is 
            no background disk shrinker, but the disk cache does allow for
            a maximum number of keys (see <a
              href="IndexedDiskAuxCache.html">Indexed Disk Cache</a> 
              for more information on the disk cache settings).  
          </p>    
          <p>
            You can define the maximum time an item can live without being 
accessed
            by setting the <code>IdleTime</code> parameter.  This is different 
than
            the <code>MaxMemoryIdleTimeSeconds</code> parameter, which just 
specifies
            how long an object can be in memory before it is subjected to 
removal or
            being spooled to a disk cache if it is available.  Note: the 
<code>IdleTime</code> 
            parameter may not function properly for items retrieved from disk,
            if you have a memory size of 0.
          </p>    
          </subsection>
          <p>
            <code>IsSpool</code> determines whether or not the element can go 
to disk,
            if a disk cache is configured for the region.
          </p>    
          <p>
            <code>IsRemote</code> determines whether or not the element can be 
sent
            to a remote server, if one is configured for the region.
          </p>    
          <p>
            <code>IsLateral</code> determines whether or not the element can be 
laterally
            distributed, if a lateral auxiliary is configured for the region.
          </p>    
          </section>
        </body>
  </document>
  
  
  1.45      +1 -0      jakarta-turbine-jcs/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/project.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- project.xml       27 Jan 2005 22:45:11 -0000      1.44
  +++ project.xml       28 Jan 2005 04:52:50 -0000      1.45
  @@ -72,6 +72,7 @@
       </developer>
       <developer>
         <name>Travis Savo</name>
  +      <id>tsavo</id>
         <email>[EMAIL PROTECTED]</email>
         <organization>IFilm</organization>
       </developer>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to