[jbosscache-commits] JBoss Cache SVN: r5482 - in core/branches/2.1.X/src: main/java/org/jboss/cache/loader and 1 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Tue Apr 1 09:19:04 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-04-01 09:19:04 -0400 (Tue, 01 Apr 2008)
New Revision: 5482

Removed:
   core/branches/2.1.X/src/main/java/org/jboss/cache/loader/s3/
   core/branches/2.1.X/src/test/java/org/jboss/cache/loader/S3CacheLoaderTest.java
Modified:
   core/branches/2.1.X/src/main/docbook/userguide/en/modules/cache_loaders.xml
Log:
Removed S3 cache loader stuff from 2.1.1

Modified: core/branches/2.1.X/src/main/docbook/userguide/en/modules/cache_loaders.xml
===================================================================
--- core/branches/2.1.X/src/main/docbook/userguide/en/modules/cache_loaders.xml	2008-04-01 12:56:55 UTC (rev 5481)
+++ core/branches/2.1.X/src/main/docbook/userguide/en/modules/cache_loaders.xml	2008-04-01 13:19:04 UTC (rev 5482)
@@ -898,163 +898,6 @@
             </section>
          </section>
       </section>
-
-      <section id="cl.s3">
-         <title>S3CacheLoader</title>
-
-         <para>The <literal>S3CacheLoader</literal> uses the 
-                  <ulink url="http://aws.amazon.com/">Amazon S3</ulink> (Simple Storage Solution)
-			for storing cache data.  
-            Since Amazon S3 is remote network storage and has fairly high latency,
-			it is really best for caches that store large pieces of data, such as media
-			or files.
-            But consider this cache loader over the JDBC or
-			file system based cache loaders if you want remotely managed, highly reliable
-			storage. Or, use it for applications running on Amazon's Elastic Compute Cloud.
-         </para>
-
-		 <para>
-			If you're planning to use Amazon S3 for storage, consider using it with JBoss Cache.
-			JBoss Cache itself provides in-memory caching for your data to minimize the amount of 
-			remote access calls, thus reducing the latency and cost of fetching your Amazon S3 data.
-			With cache replication, you are also able to load data from your local cluster 
-			without having to remotely access it every time.
-         </para>
-
-         <para>
-			Note that Amazon S3 does not support transactions.  If transactions
-			are used in your application then there is some possibility of state
-			inconsistency when using this cache loader.  However, writes are atomic, in
-			that if a write fails nothing is considered written and data is never
-			corrupted.
-         </para>
-
-         <para>
-			Data is stored in keys based on the FQN of the Node and Node data is 
-			serialized as a java.util.Map using the <literal>CacheSPI.getMarshaller()</literal>
-			instance.
-			Read the JavaDoc on how data is structured and stored.
-            Be aware this means data is not readily accessible over HTTP to
-            non-JBossCache clients. Your feedback and help would be appreciated
-            to extend this cache loader for that purpose.
-         </para>
-
-         <para>
-			With this cache loader, single-key operations such as
-			<literal>Node.remove(Object)</literal> and <literal>Node.put(Object,
-			Object)</literal> are the slowest as data is stored in a single Map instance.
-			Use bulk operations such as <literal>Node.replaceAll(Map)</literal>
-			and <literal>Node.clearData()</literal> for more efficiency.
-			Try the <literal>cache.s3.optimize</literal> option as well.
-         </para>
-         
-         <section>
-            <title>Amazon S3 Library</title>
-			  <para>The S3 cache loader is provided with the default
-              distribution but requires a library to access the service
-              at runtime. This runtime library may be obtained through the JBoss Maven
-              Repository. Include the following sections in your pom.xml file:
-              </para>
-              <programlisting><![CDATA[
-      <repository>
-         <id>e-xml.sourceforge.net</id>
-         <url>http://e-xml.sourceforge.net/maven2/repository</url>
-      </repository>
-        ...
-      <dependency>
-         <groupId>net.noderunner</groupId>
-         <artifactId>amazon-s3</artifactId>
-         <version>1.0.0.0</version>
-      </dependency>
-              ]]>
-              </programlisting>
-              If you do not use Maven, you can still download the
-              amazon-s3 library through the repository URL.
-         </section>
-
-         <section>
-            <title>Configuration</title>
-			  <para>At a minimum, you must configure your Amazon S3 access key and 
-				secret access key. The other configuration keys are listed in general
-				order of utility.
-              </para>
-
-               <para>
-                  <itemizedlist>
-                     <listitem>
-                        <literal>cache.s3.accessKeyId</literal> -
-						Amazon S3 Access Key, available from your account profile.
-                     </listitem>
-
-                     <listitem>
-                        <literal>cache.s3.secretAccessKey</literal> -
-						Amazon S3 Secret Access Key, available from your account profile.
-						As this is a password, be careful not to distribute it or include
-						this secret key in built software.
-                     </listitem>
-
-                     <listitem>
-                        <literal>cache.s3.secure</literal> -
-						The default is <literal>false</literal>:
-						Traffic is sent unencrypted over the public Internet. 
-						Set to <literal>true</literal> to use HTTPS.
-						Note that unencrypted is obviously faster.
-                     </listitem>
-
-                     <listitem>
-                        <literal>cache.s3.bucket</literal> -
-						Name of the bucket to store data.
-						For different caches using the same access key, use a different bucket name.
-						Read the S3 documentation on the definition of a bucket.
-						The default is <literal>jboss-cache</literal>.
-                     </listitem>
-
-                     <listitem>
-                        <literal>cache.s3.callingFormat</literal> -
-						One of <literal>PATH</literal>, <literal>SUBDOMAIN</literal>, or
-						<literal>VANITY</literal>.
-						Read the S3 documentation on the use of calling domains.
-						The default is <literal>SUBDOMAIN</literal>.
-                     </listitem>
-
-                     <listitem>
-                        <literal>cache.s3.optimize</literal> -
-						The default is <literal>false</literal>.
-						If true, <literal>put(Map)</literal> operations
-						replace the data stored at an FQN rather than attempt
-                        to fetch and merge. (This option is fairly experimental
-                        at the moment.)
-                     </listitem>
-
-                     <listitem>
-                        <literal>cache.s3.parentCache</literal> -
-						The default is <literal>true</literal>.
-						Set this value to <literal>false</literal> if you are using multiple caches
-						sharing the same S3 bucket, that remove parent nodes of nodes being created
-						in other caches. (This is not a common use case.)
-                        <para>
-						JBoss Cache stores nodes in a tree format and automatically
-						creates intermediate parent nodes as necessary.
-						The S3 cache loader must also create these parent nodes as well
-						to allow for operations such as <literal>getChildrenNames</literal> to work
-						properly. Checking if all parent nodes exists for every <literal>put</literal>
-						operation is fairly expensive, so by default the cache loader caches
-						the existance of these parent nodes.
-                        </para>
-                     </listitem>
-
-                     <listitem>
-                        <literal>cache.s3.location</literal> -
-                        This choses a primary storage location for your data
-                        to reduce loading and storage latency closest to you.
-                        Set to <literal>EU</literal> to store data locale to Europe.
-                        The default is <literal>null</literal>, or to store in the United States.  
-                     </listitem>
-                  </itemizedlist>
-               </para>
-            </section>
-            
-      </section>
 	
       <section id="cl.tcp">
          <title>TcpDelegatingCacheLoader</title>

Deleted: core/branches/2.1.X/src/test/java/org/jboss/cache/loader/S3CacheLoaderTest.java
===================================================================
--- core/branches/2.1.X/src/test/java/org/jboss/cache/loader/S3CacheLoaderTest.java	2008-04-01 12:56:55 UTC (rev 5481)
+++ core/branches/2.1.X/src/test/java/org/jboss/cache/loader/S3CacheLoaderTest.java	2008-04-01 13:19:04 UTC (rev 5482)
@@ -1,108 +0,0 @@
-package org.jboss.cache.loader;
-
-import static org.testng.AssertJUnit.assertNotNull;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import net.noderunner.amazon.s3.emulator.Server;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.config.CacheLoaderConfig;
-import org.testng.annotations.Test;
-
-
-/**
- * Tests {@link org.jboss.cache.loader.s3.S3CacheLoader}.
- * 
- * This requires a S3 account to truly test; uses an emulator otherwise.
- *
- * @author Elias Ross
- * @version $Id: JdbmCacheLoaderTest.java 4561 2007-10-08 14:02:02Z manik.surtani at jboss.com $
- */
- at Test(groups =
-{"functional"}, enabled = true)
-public class S3CacheLoaderTest extends CacheLoaderTestsBase
-{
-
-   private static final Log log = LogFactory.getLog(S3CacheLoaderTest.class);
-
-   private Server server;
-
-   @Override
-   protected void configureCache() throws Exception
-   {      
-      String accessKey = System.getProperty("accessKey");
-      String properties;
-      if (accessKey == null)
-      {
-         log.info("Testing using S3CacheLoader using emulator");
-         server = new Server();
-         server.start();
-         properties = 
-               "cache.s3.accessKeyId=dummy\n"  +
-               "cache.s3.secretAccessKey=dummy\n"  +
-               "cache.s3.server=localhost\n"  +
-               "cache.s3.port=" + server.getPort() + "\n"  +
-               "cache.s3.callingFormat=VANITY" + "\n"  +
-               "cache.s3.bucket=localhost" + "\n";
-      }
-      else
-      {
-          properties = 
-             "cache.s3.accessKeyId=" + accessKey + "\n" +
-             "cache.s3.secretAccessKey=" + System.getProperty("secretKey") + "\n" ;
-      }
-      CacheLoaderConfig config = getSingleCacheLoaderConfig("", "org.jboss.cache.loader.s3.S3CacheLoader", properties, false, true, false);
-      // System.out.println(config);
-      Properties p = config.getFirstCacheLoaderConfig().getProperties();
-      // System.out.println(p);
-      assertNotNull(p.get("cache.s3.accessKeyId"));
-      assertNotNull(p.get("cache.s3.secretAccessKey"));
-      cache.getConfiguration().setCacheLoaderConfig(config);
-   }
-   
-   @Override
-   public void cleanup() {
-      if (server != null)
-      {
-         try
-         {
-             server.close();
-         }
-         catch (IOException e) {
-         }
-      }
-   }
-
-   protected void postConfigure()
-   {
-      cache.removeNode(Fqn.root());
-   }
-
-   //@Override
-   public void testCacheLoaderThreadSafety()
-   {
-
-   }
-
-   //@Override
-   public void testPartialLoadAndStore()
-   {
-      // do nothing
-   }
-
-   //@Override
-   public void testBuddyBackupStore()
-   {
-      // do nothing
-   }
-
-   //@Override
-   protected void threadSafetyTest(final boolean singleFqn) throws Exception
-   {
-   }
-   
-}




More information about the jbosscache-commits mailing list