<chapter id="architecture">
    <title>Architecture</title>

	    <figure>
	      <title>Schematic TreeCache architecture</title>

	      <mediaobject>
	        <imageobject>
	          <imagedata fileref="images/TreeCacheArchitecture.gif" />
	        </imageobject>
	      </mediaobject>
	    </figure>

    <para>The architecture is shown above. The example shows 2 Java VMs, each
    has created an instance of <literal>TreeCache</literal>. These VMs can be located on the same
    machine, or on 2 different machines. The setup of the underlying group
    communication subsystem is done using <ulink url="http://www.jgroups.org">JGroups</ulink>.</para>

    <para>Any modification (see API below) in one cache will be replicated to
    the other cache<footnote>
        <para>Note that you can have more than 2 caches in a cluster.</para>
      </footnote> and vice versa. Depending on the transactional settings, this replication will occur either after each modification or at the end of a transaction (at commit
    time). When a new cache is created, it can optionally acquire the contents
    from one of the existing caches on startup.</para>
  
  </chapter>