Commits

Anonymous committed 06ba4f4

move website content out of main repo

Comments (0)

Files changed (28)

www/arch.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style.css" type="text/css" />
-	<title>Riak - System Architecture</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>The system architecture of Riak</p>
-		</div>
-		<div id="left">
-			
-			<h3>Simple at the Core</h3>
-			<p>At its heart, Riak is a decentralized key/value store, strongly influenced by <a href="http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html">Amazon's Dynamo</a> and lessons learned from real-world application of the <a href="cap.html">CAP Theorem</a> to other distributed systems.  It supports high availability at low cost by allowing applications to tune their relative needs for durability, partition-tolerance, and other business constraints.</p>
-
-<p>
-A Riak cluster is generally run on a set of well-connected physical
-hosts.  Each host in the cluster runs one Riak node.  Each Riak node
-runs a set of virtual nodes, or "vnodes", that are each responsible
-for storing a separate portion of the key space.
-</p>
-
-<p>
-Nodes are not clones of each other, nor do they all participate in
-fulfilling every request.  The extent to which data is replicated, and
-when, and with what merge strategy and failure model, is configurable
-at runtime and flexible to meet the needs of many different applications.
-</p>
-
-<h3>one ring to find them</h3>
-<p>
-Riak uses the technique of <a href="http://portal.acm.org/citation.cfm?id=258660">consistent hashing</a> to organize data storage.  Central to any Riak cluster is a 160-bit integer space which is divided into equally-sized partitions.  Each vnode is responsible for one of these partitions, and each document is stored in a set of partitions that can be determined statically depending on its key.  This allows a client node to determine the "owners" of a given piece of data locally, without having to ask any central authority.
-</p>
-
-<p>
-In the default configuration, each physical node of a Riak cluster will
-attempt to run roughly an equal 
-number of vnodes.  In the general case, this means that each node in
-the cluster is responsible for 1/(number of nodes) of the ring, or
-(number of partitions)/(number of nodes) vnodes.  For example, if two
-nodes define a 1024-partition cluster, then each node will run 512 vnodes.
-By default, nodes claim their partitions at random intervals around the
-ring, which usually provides a sufficiently even distribution.
-</p>
-
-<h3>coordination and gossip</h3>
-<p>
-When a value is being stored in (or retrieved from) the cluster,
-any node may participate
-as the coordinator for the request.  The coordinating node consults
-the ring state to determine which vnode owns the partition in which
-the value's key belongs, then sends the request to that vnode,
-as well as the vnodes responsible for the next N-1 partitions in the
-ring, where N is a bucket-configurable parameter that describes how
-many copies of the value to store.  A put request may specify
-that at least W (=&lt; N) of those vnodes reply with success, and that DW
-(=&lt; W) reply with success only after durably storing the value.  The
-request will only be considered successful to the client when both
-W and DW have been satisfied by the nodes in question.
-(A get request is similar except that it only has one such value, called R.)
-</p>
-
-<p>
-The ring state is shared around the cluster by means of a gossip
-protocol.  Whenever a node changes its claim on the ring, it
-announces its change via this protocol.  Each node also periodically
-sends its current view of the ring state to a randomly-selected
-peer, in case any nodes missed previous updates.
-</p>
-
-<h3>causality and versioning</h3>
-<p>
-With any node able to drive any request, and not all nodes needing to
-participate in each request, it is necessary to have a method for
-keeping track of which version of a value is current.  This is where
-<a href="http://portal.acm.org/citation.cfm?id=359563">vector clocks</a>
-("vclocks") come in.
-</p>
-
-<p>
-When a value is stored in Riak, it is tagged with a vclock,
-establishing its initial version.  When a value is updated in Riak,
-the client provides the vclock of the object being modified so that
-this vclock can be extended to reflect the update.  Riak can compare
-vclocks on different versions of the object and determine:
-</p>
-
-<ol>
- <li> Whether one object is a direct descendant of the other. </li>
- <li> Whether the objects are direct descendants of a common parent. </li>
- <li> Whether the objects are unrelated in recent heritage. </li>
-</ol>
-
-<p>
-Using this knowledge, Riak can auto-repair out-of-sync data,
-and in worse cases can provide a client with an opportunity to reconcile
-divergent changesets in an application specific manner.
-</p>
-
-<p>
-Riak attempts to move data toward a consistent state across nodes,
-but it doesn't do so by comparing each and every object on each node.
-Instead, nodes needing to possibly update many values will exchange a
-<a href="http://portal.acm.org/citation.cfm?id=704751">merkle tree</a>,
-which allows them to quickly decide which values need comparing.
-</p>
-
-<h3>pluggable data backends</h3>
-<p>
-Sharing data among nodes, on rings, etc. is all well and good, but at
-some point, it has to actually be stored somewhere - like on disk!
-Because Riak is relevant to a wide variety of applications, its
-"backend" storage system is a pluggable one.
-</p>
-
-<p>
-Each node may be configured with a different module for managing local
-storage.  This module only needs to define "get", "put", "delete", and
-"list keys" functions that operate on binary blobs.  The backend can
-consider these binaries completely opaque data, or examine them to
-make decisions about how best to store them.
-</p>
-<p>
-Four backends come pre-packaged with Riak:
-</p>
-
-<ol>
- <li> riak_fs_backend, which stores data directly to files in a nested
-    directory structure on disk</li>
- <li> riak_ets_backend, which stores data in ETS tables (which makes it
-    volatile storage, but great for debugging)</li>
- <li> riak_dets_backend, which stores data on-disk in DETS tables</li>
- <li> riak_osmos_backend, which stores data in
-               <a href="http://code.google.com/p/osmos/">Osmos</a> tables</li>
-</ol>
-
-<p>
-It is easy to create additional backends to suit application needs.
-</p>
-<p></p>
-<h3>building on the Web</h3>
-<p>
-Riak provides its primary programming interface over RESTful HTTP, in JSON encoding.  This is enabled by embedding the 
-<a href="http://hg.basho.com/webmachine">Webmachine</a> server, and has two major benefits:
-</p>
-
-<ol>
-<li>Ease of use for developers in any programming language</li>
-<li>Taking advantage of the Web's architecture for caching, validation and more</li>
-</ol>
-
-
-
-			<br />
-			
-			
-		</div>
-		<div id="right">
-        <img src="images/splash250.gif" alt="Riak" />
-<p></p>
-        <img src="images/halfblankbox.gif" alt="" />
-<p></p>
-        <img src="images/chash.gif" alt="consistent hashing" />
-<p></p>
-        <img src="images/halfblankbox.gif" alt="" />
-<p></p>
-        <img src="images/gossip4.gif" alt="gossip" />
-<p></p>
-        <img src="images/halfblankbox.gif" alt="" />
-<p></p>
-        <img src="images/vclock.gif" alt="vclocks" />
-<p></p>
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/basic-setup.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style-1c.css" type="text/css" />
-	<title>Riak - Setup</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Setting up a Riak cluster</p>
-		</div>
-		<div id="left">
-			
-			<h3>Cluster Setup Overview</h3>
-<p>This document explains how to set up a Riak cluster.  It assumes that
-you have already downloaded and successfully built Riak.  For help with
-those steps, please refer to the README at the top level of the
-source directory.</p>
-
-<p>
-Riak has many knobs to tweak, affecting everything from distribution
-to disk storage.  This document will attempt to give a description of
-the common configuration parameters, then describe two typical setups,
-one small, one large.
-</p>
-
-<h3>configuration file format</h3>
-<p>
-Riak node configurations are stored in simple text files.  Users familiar with
-Erlang's file:consult/1 function will recognize the format:
-</p>
-
-<pre>
-{ParameterName1, Setting1}.
-{ParameterName2, Setting2}.
-...
-</pre>
-
-<p>
-The following are some useful parameters:
-</p>
-<dl>
-<dt><code>cluster_name: string</code></dt>
-<dd>
-  The name of the cluster.  Can be anything.  Used mainly in saving
-  ring configuration.  All nodes in a cluster should have the same
-  cluster name.  This parameter is required.
-</dd>
-<dt><code>riak_cookie: atom</code></dt>
-<dd>
-  The Erlang cookie for the riak cluster.  All nodes in a cluster
-  must have the same cookie.  This parameter is required.
-</dd>
-<dt><code>riak_heart_command: string</code></dt>
-<dd>
-  The command that heart should use to restart this node.  This
-  usually takes the form of:
-  "(cd /riak; ./start-restart.sh /riak/config/riak.erlenv)".
-  If this parameter is missing or malformed, heart will not auto-restart
-  crashed Riak nodes.
-</dd>
-<dt><code>riak_hostname: string</code></dt>
-<dd>
-  The host on which this node is running.  This is used to construct
-  the long-name form of the Erlang node.  On a developer machine, this
-  might be "127.0.0.1".  If other nodes cannot reach this node's host
-  by use of this hostname, the cluster will fail to connect.
-  This parameter is required.
-</dd>
-<dt><code>riak_nodename: atom</code></dt>
-<dd>
-  The short-name form of the Erlang node.  This is used to construct
-  the long-name form.  This parameter is required.
-</dd>
-<dt><code>ring_creation_size: integer</code></dt>
-<dd>
-  The number of partitions to divide the keyspace into.  This can be
-  any number, but you probably don't want to go lower than 16, and
-  production deployments will probably want something like 1024 or
-  greater.  In any case, it should be much larger than your intended
-  number of nodes.  This can be a very difficult parameter to change
-  after your ring has been created, so choose a number that allows
-  for growth.  This parameter defaults to 1024.
-</dd>
-<dt><code>storage_backend: atom</code></dt>
-<dd>
-  Name of the module that implements the storage for all vnodes
-  on this Riak node.  The four backends that ship with Riak are
-  riak_fs_backend, riak_ets_backend, riak_dets_backend, and
-  riak_osmos_backend. Some backends have their own set of
-  configuration parameters which should also be set.  This parameter
-  does not have a default, but unless you have a very unusual cluster
-  setup you must set it to a valid storage backend on every node.
-<dl>
-<dt><code>riak_fs_backend_root: string</code></dt>
-<dd>
-    If you have set the storage_backend to riak_fs_backend, then
-    you must set this parameter to determine where data will be stored.
-    Note that riak_fs_backend performs poorly when there is a large
-    amount of data per vnode, and is primarily used for testing.
-</dd>
-<dt><code>riak_dets_backend_root: string</code></dt>
-<dd>
-    If you have set storage_backend to riak_dets_backend, you should
-    use this parameter to determine where this backend will store its files.
-</dd>
-<dt><code>riak_osmos_backend_root: string</code></dt>
-<dd>
-    If you have set storage_backend to riak_osmos_backend, you should
-    use this parameter to determine where this backend will store its files.
-</dd>
-</dl>
-</dd>
-</dl>
-<h3>small (developer laptop) configuration</h3>
-<p>
-A configuration like this one may serve well for a very small cluster such as that used by an individual developer:
-</p>
-<pre>
-{cluster_name, "default"}.
-{ring_creation_size, 16}.
-{storage_backend, riak_dets_backend}.
-{riak_dets_backend_root, "/var/riak/store"}.
-{riak_cookie, default_riak_cookie}.
-{riak_heart_command,
- "(cd /usr/local/riak; ./start-restart.sh /usr/local/riak/config/riak.erlenv)"}.
-{riak_nodename, riak}.
-{riak_hostname, "127.0.0.1"}.
-</pre>
-
-<p>
-This configuration assumes that you'll be connecting to the cluster
-from localhost, and that Riak is installed at /usr/local/riak.  The
-cluster will store its data in /var/riak/store.
-</p>
-<p>
-To start the first node of this cluster:
-</p>
-
-<ol>
-<li>Save the configuration to /usr/local/riak/config/riak.erlenv</li>
-<li>cd /usr/local/riak</li>
-<li>./start-fresh.sh config/riak.erlenv</li>
-</ol>
-
-<p>
-The node will start and background itself.  Your cluster should now be
-ready to accept requests.  See the
-<a href="dev.html">developer documentation</a>
-for simple instructions on connecting and storing and fetching data.
-</p>
-
-<h3>larger (production) configuration</h3>
-<p>
-If you're running any sort of cluster that could be labeled
-"production", "deployment", "scalable", "enterprise", or any other
-word implying that the cluster will be running interminably with
-on-going maintenance needs, then you will want a different
-configuration.  Something like this will work:
-</p>
-
-<pre>
-{cluster_name, "default"}.
-{ring_creation_size, 1024}.
-{storage_backend, riak_dets_backend}.
-{riak_dets_backend_root, "/var/riak/store"}.
-{riak_cookie, default_riak_cookie}.
-{riak_heart_command,
- "(cd /usr/local/riak; ./start-restart.sh /usr/local/riak/config/riak.erlenv)"}.
-{riak_nodename, riak}.
-{riak_hostname, "yourhost0.yourdomain.example.com"}.
-</pre>
-
-<p>
-(the most notable changes are to ring_creation_size and riak_hostname)
-</p>
-
-<p>
-Starting the first node in this cluster is just like starting the
-first node in the dev cluster:
-</p>
-
-<ol>
-<li> Save the configuration to /usr/local/riak/config/riak.erlenv </li>
-<li> cd /usr/local/riak </li>
-<li> ./start-fresh.sh config/riak.erlenv </li>
-</ol>
-
-<p>
-The node will start and background itself.  Your cluster should now be
-ready to accept requests.  See the
-<a href="dev.html">developer documentation</a>
-for simple instructions on connecting and storing and fetching data.
-</p>
-
-<p>
-Starting more nodes in production is just as easy:
-</p>
-
-<ol>
-<li> Install Riak on another host. </li>
-<li> Copy riak.erlenv from your original host to the new host. </li>
-<li> Edit riak.erlenv and change riak_hostname to match the new host's name. </li>
-<li> ./start-join config/riak.erlenv yourhost0.yourdomain.example.com 9000 </li>
-</ol>
-
-<p>
-That node will also start and background itself.  You cluster will
-still be ready to accept requests, with no further changes.
-</p>
-
-<h3>what about logging?</h3>
-<p>
-Riak doesn't do any persistent logging in the default configuration.
-Instead, logging can be enabled and disabled by connecting and
-disconnecting an "eventer".  Eventers are described more fully
-<a href="eventer.html">here</a>, but these simple steps for starting the default
-logging eventer are:
-</p>
-
-<ol>
-<li> cd /usr/local/riak </li>
-<li> ./start-eventer.sh default default_riak_cookie 127.0.0.1 9000 evt riak_event_logger /tmp/riakevt.log</li>
-</ol>
-
-<p>
-That command will start an Erlang node named 'evt' that will stay
-running.  It will connect to the cluster "default" at 127.0.0.1:9000,
-with Erlang cookie 'default_riak_cookie'.  It will then begin spewing
-data into /tmp/riakevt.log.  Use 'tail -f /tmp/riakevt.log' to watch
-it fly by.  Note that it is not recommended that you connect this
-particular logger to an active production cluster, as it generates a
-*lot* of data, and has no provision for things like log file rollover.
-</p>
-<p>
-More focused logs can easily be produced by a logger that pattern-matches
-to log only specific events, and performance can be managed by running
-the logger/eventer on a machine that is not running a storage node.
-</p>
-
-
-			<br />
-			
-			
-		</div>
-		<div id="right">
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/cap.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style-1c.css" type="text/css" />
-	<title>Riak - Consistency, Availability, and Partition-Tolerance</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Consistency, Availability, and Partition-Tolerance</p>
-		</div>
-		<div id="left">
-			
-			<h3>All Hail Consistency!</h3>
-			<p>Many traditional databases go to extreme (and expensive) measures to ensure strong consistency.  One way of thinking about strong consistency is that no two parts of a networked system with strong consistency will ever successfully report a response to a given query at a given moment unless they would provide exactly the same response.  That sounds good, right?  Well, it would be good... except that insistence on having it all the time comes at a great cost.</p>
-
-<h3>Everything has a price.</h3>
-<p>At the PODC conference in 2000, Eric Brewer gave a talk on Robust Distributed Systems.  As part of a general attempt to clean up approaches to real-world distributed systems problems, he proposed the "CAP Theorem": that of the three desired properties of <strong>C</strong>onsistency, <strong>A</strong>vailability, and <strong>P</strong>artition-tolerance, you could only count on having any two of them in any shared-data system.  This meant that there would be no way for traditional strong-consistency databases to ever guarantee availability and partition-tolerance.  Two years later, Seth Gilbert and Nancy Lynch formalized Brewer's CAP Theorem and proved it to be correct.</p>
-
-<p>(Note that "availability" here means not only read-availability, but also write-availability.  If you have some read-only slave serving requests but cannot write new data, your application is not truly available by any reasonable measure.)</p>
-
-<h3>What choice do we have?</h3>
-<p>Any networked system involving more than one host on the internet must be partition-tolerant, as it would be foolish to assume that <a href="http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing">the network is reliable</a>.  So, at any given moment, for any given operation, an application system ought to be able to choose which of consistency or avilability it is wiling to bend.</p>
-
-<h3>"Bend", you say?</h3>
-<p>If your development stack makes a choice, at some low level such as the database implementation, about the relative priority of consistency and availability... then you're stuck.  That one choice will apply to every single aspect of your application, causing you to (e.g.) give up availability in favor of consistency even when your business would be better served otherwise.</p>
-
-<p>However, if that choice is made available to the application programmer, complexity can properly move up the stack.  This allows you to treat consistency, availability, and partition-tolerance as what they truly are: business needs that may vary in relative priority for different aspects of an application and at different times.</p>
-
-<p>The reason we talk about "bending" those constraints is because we remember that our only limitation is that we cannot fully guarantee that we have all three at a given moment, assuming arbitrary components can fail.  In moments when all is working as expected, we can often achieve all three.  In the other moments, when a failure of some kind is occurring, we can decide how to relax one of these constraints in order to retain the others.</p>
-
-<p>A model of convergence, or <strong>eventual consistency</strong>, can be achieved by allowing brief period of inconsistency in the face of failures.  When allowed in the context of a system that will attempt to remediate these small inconsistencies as soon as possible, this strategy can allow for much greater availability properties at a minimal observable effect in consistency to the user.</p>
-
-<h3>Bend or you will break.</h3>
-<p>If even that degree of relaxed inconsistency seems too much, realize that the only moment of inconsistency in such a system are those times when a stricter system would be entirely unavailable.  The decision here is, in moments of great stress, should your system allow brief inconsistencies or instead be entirely unavailable?  The answer to that question will not always be the same, which is why allowing it to be tuned at the application level is essential.</p>
-
-
-			<br />
-			
-			
-		</div>
-		<div id="right">
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/contact.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style-1c.css" type="text/css" />
-	<title>Riak - Contact Information</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a class="current" href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Contact Information</p>
-		</div>
-		<div id="left">
-<p>Have questions about Riak that aren't answered here?
-We'd love to hear from you.</p>
-
-<p>Send inquiries to <a href="mailto:riak@basho.com">riak@basho.com</a> to reach the core Riak development team,<br />
-or subscribe to the <a href="http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com">mailing list</a> to discuss Riak with other users.</p>
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/css/style-1c.css

-/* global reset */
-*{ margin: 0; padding: 0; }*
-:focus, :active { outline: 0; }
-
-body { font: .9em Georgia, "Times New Roman", Sans-Serif; background: #fff url(../images/bg.gif) repeat-x; color: #333; }
-a { color: #A82A15; text-decoration: none; }
-img { border: 0; }
-h1 {  float: left; margin: 20px 0 50px; font-size: 4em; color: #fff; }
-h2 { font-size: 2.4em; font-weight: normal; margin: 0 0 20px; }
-h2 a:hover { background: #A82A15; color: #fff; }
-.hr { color: #ccc; }
-p  { margin: 5px 0 15px; line-height: 1.6em; }
-#content { margin: 0 auto; width: 900px; }
-#top { float: right; margin: 38px 0 30px 0;}
-	#top li { list-style: none; display: inline; }
-	#top li a { float: left; padding: 6px 20px; margin: 3px 2px 0 0; color: #ccc; }
-	#top li a.current { color: #fff; background: #A82A15; }
-	#top li a:hover { background: #808080; color: #fff; }
-#intro { clear: both; padding: 15px 0 1px 20px; border: 1px solid #dedede; font-size: 1.3em; background: #eee; margin: 0 0 30px; }
-#left { float: left; width: 830px; margin: 0 0 15px; }
-#right { float: right; width: 0px; }
-#right h3 { border-bottom: 1px solid #ccc; margin: 0 0 10px; }
-#right img { margin: 0 3px 3px 0; border: 2px solid #eee; padding: 2px; }
-#right li { list-style: none; }
-	#right li a { display: block; border-bottom: 1px solid #ccc; padding: 5px 5px; }
-#footer { clear: both; padding: 15px 0; border-top: 1px solid #ccc; }
-	#r { float: right; }
-dt { font-weight:bold; }
-dd { margin: 0.5em 0 0.5em 1em; }	

www/css/style.css

-/* global reset */
-*{ margin: 0; padding: 0; }*
-:focus, :active { outline: 0; }
-
-body { font: .9em Georgia, "Times New Roman", Sans-Serif; background: #fff url(../images/bg.gif) repeat-x; color: #333; }
-a { color: #A82A15; text-decoration: none; }
-img { border: 0; }
-h1 {  float: left; margin: 20px 0 50px; font-size: 4em; color: #fff; }
-h2 { font-size: 2.4em; font-weight: normal; margin: 0 0 20px; }
-h2 a:hover { background: #A82A15; color: #fff; }
-.hr { color: #ccc; }
-p  { margin: 5px 0 15px; line-height: 1.6em; }
-#content { margin: 0 auto; width: 900px; }
-#top { float: right; margin: 38px 0 30px 0;}
-	#top li { list-style: none; display: inline; }
-	#top li a { float: left; padding: 6px 20px; margin: 3px 2px 0 0; color: #ccc; }
-	#top li a.current { color: #fff; background: #A82A15; }
-	#top li a:hover { background: #808080; color: #fff; }
-#intro { clear: both; padding: 15px 0 1px 20px; border: 1px solid #dedede; font-size: 1.3em; background: #eee; margin: 0 0 30px; }
-#left { float: left; width: 550px; margin: 0 0 15px; }
-#right { float: right; width: 280px; }
-#right h3 { border-bottom: 1px solid #ccc; margin: 0 0 10px; }
-#right img { margin: 0 3px 3px 0; border: 0px solid #eee; padding: 2px; }
-#right li { list-style: none; }
-	#right li a { display: block; border-bottom: 1px solid #ccc; padding: 5px 5px; }
-#footer { clear: both; padding: 15px 0; border-top: 1px solid #ccc; }
-	#r { float: right; }
-	

www/dev.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style.css" type="text/css" />
-	<title>Riak - A document-oriented Web database</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Schema-free document databases are in many ways a more natural fit for Web applications than the traditional RDBMS.  With interfaces that are natural and convenient for rapid development, and a lack of object-relational mappers and other heavy middleware, applications can be both simpler and more powerful.</p>
-		</div>
-		<div id="left">
-			
-			<p>Building with Riak feels natural to the Web developer.  We didn't build Riak as a fun exercise in distributed systems, we built it for two reasons: to <a href="ops.html">reduce operational expense</a> and to build Web applications in an environment of quick delivery despite rapidly changing business needs.</p>
-
-			<p>Many applications are built using "object-relational mappers" which effectively turn a rich query interface (such as SQL) into a much simpler data persistence model.  Since Riak is at its heart a key/value store there is no need to add heavy middleware just to perform simple actions such as storage and retrieval of application data.</p>
-
-			<p>That simple interface doesn't mean that you can't express complex queries over your data in Riak.  We provide a variant of the <a href="mapreduce.html">map/reduce programming model</a> that is very well suited to data analysis on a decentralized document database like Riak.</p>
-
-			<p>This model also lends itself very well to linked data, the engine of discovery and growth of applications on the Web.  The map/reduce model was popularized by Google as a result of their use on very large sets of linked data, and we have found that applications structured in terms of links (as opposed to less flexible relations) are very easy to develop without losing your grasp on your data model.</p>
-
-			<p>The loose schemas of a document database like Riak are a great boon to rapid development.  In a traditional static-schema RDBMS, changes to data models are traumatic events, often requiring long downtime to convert tables to the new schema.  In Riak, you simply add fields to your documents as needed by the changing demands of your application.<br />
-(And if you were using an ORM, just what was that schema buying you anyway?)
-</p>
-
-			<p>Riak's primary programming interface is JSON over (RESTful) HTTP, which is as close as you can come these days to a universal language and protocol for data exchange.  If you can process JSON and issue an HTTP request, you can easily use Riak.</p>
-
-			<br />
-			
-			
-		</div>
-		<div id="right">
-			<h3>quick links for developers</h3>
-			<ul>
-				<li><a href="programming.html">HTTP interface and libraries</a></li>
-				<li><a href="mapreduce.html">map/reduce in riak</a></li>
-			</ul>
-
-			
-		</div>
-
-
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>
Add a comment to this file

www/edoc/.empty_for_hg

Empty file removed.

www/eventer.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style-1c.css" type="text/css" />
-	<title>Riak - Setup</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Events in Riak</p>
-		</div>
-		<div id="left">
-			
-			<h3>Event-Driven (not interrupt-driven) Operations</h3>
-
-<p>One of the most difficult things about operating a distributed system is extracting useful and actionable intelligence from all of the many possible sources of data at hand.  Sometimes it's hard to find all the logs and information you need; at other times you're drowning in log files and still can't figure out what to do.</p>
-
-<p>Riak gives you flexibility and power in gathering the data you need for effective monitoring, debugging, and operations.</p>
-
-<p>Using a simple event-handler API, you can write a very small module declaring exactly what information you want -- pattern-matching by node, code module, or specific event type -- and whatever you want to do with that information -- log to a file, interact with your monitoring dashboard of choice, or arbitrary other activity.  You can then attach that event listener to any node in your cluster and all matching events, no matter where they occur, will be forwarded to the listener so that you can take action.</p>
-
-<p>Riak comes with a simple catch-all event listener that hears every single event in the cluster and logs them out to a named file.  That can be useful, but more importantly it can serve as an example of the simplicity of the event interface.</p>
-
-			<br />
-			
-			
-		</div>
-		<div id="right">
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/faq.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style-1c.css" type="text/css" />
-	<title>Riak - Frequently Asked Questions</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a class="current" href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Questions and Answers</p>
-		</div>
-		<div id="left">
-			
-          <dl>
-            <dt>Why did you build Yet Another Data Store?</dt>
-            <dd>We built the first incarnation of Riak in late 2007 for our own use, and we have nurtured it ever since in order to satisfy our operational needs.  There wasn't an alternative that suited us at the time, and since then we have developed something that solves a unique combination of problems.</dd>
-
-            <dt>How do you pronounce "Riak"?</dt>
-            <dd>REE-ahk</dd>
-   
-            <dt>How fast is it?</dt>
-            <dd>Performance depends on many factors, including hardware and network parameters as well as a great many tunable parameters in the way you set up your cluster and the way that you use Riak from an application.  We've found it to be fast enough for our purposes, and our goal is not to be "fastest" but rather to stay "fast enough" as the system grows, as hosts fail, and so on.  That said, as soon as we get a chance to produce a general, reproducible benchmarking suite, we'll share it with you.</dd>
-
-            <dt>But what about (insert favorite "nosql" system here)?</dt>
-            <dd>We believe that the current explosion of choice in data storage software is a healthy thing.  Each of the different datastores out there has its own strengths and weaknesses and will be best suited to a different class of problems.  We hope to not only contribute a strong system that works well for us and others, but also to work with friends in the open source community to improve the state of the art.</dd>
-
-            <dt>Do I have to know how to write distributed Erlang code?</dt>
-            <dd>I believe you don't, Bob.  Riak provides a simple and convenient programming interface over HTTP and JSON, making it accessible to nearly every programmer on the Web.</dd>
-
-            <dt>Version 0.x?  Is it ready for my production data?</dt>
-            <dd>That kind of decision depends on many factors, most of which cannot be answered in general but depend on your business.  We gave it a low version number befitting a first public appearance, but Riak has robustly served the needs of multiple revenue-generating applications for nearly two years now.</dd>
-          </dl>
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>
Add a comment to this file

www/favicon.ico

Removed
Old image
Add a comment to this file

www/images/basho-landscape.gif

Removed
Old image
Add a comment to this file

www/images/bg.gif

Removed
Old image
Add a comment to this file

www/images/blankbox.gif

Removed
Old image
Add a comment to this file

www/images/chash.gif

Removed
Old image
Add a comment to this file

www/images/easy-ops.gif

Removed
Old image
Add a comment to this file

www/images/gossip4.gif

Removed
Old image
Add a comment to this file

www/images/halfblankbox.gif

Removed
Old image
Add a comment to this file

www/images/more.gif

Removed
Old image
Add a comment to this file

www/images/riak-arcs.gif

Removed
Old image
Add a comment to this file

www/images/site.gif

Removed
Old image
Add a comment to this file

www/images/splash250.gif

Removed
Old image
Add a comment to this file

www/images/vclock.gif

Removed
Old image

www/index.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style.css" type="text/css" />
-	<title>Riak - A Decentralized Database</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a class="current" href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Riak combines a decentralized key-value store, a flexible map/reduce engine, and a friendly HTTP/JSON query interface to provide a database ideally suited for Web applications.</p>
-		</div>
-		<div id="left">
-			
-			<h3>A document-oriented Web database</h3>
-			<p>Schema-free document databases are in many ways a more natural fit for Web applications than the traditional RDBMS.  With interfaces that are natural and convenient for rapid development, and a lack of object-relational mappers and other heavy middleware, applications can be both simpler and more powerful.</p>
-			
-			<br />
-			
-			<h3>A database at Web scale</h3>
-			<p>Developed with solid distributed systems fundamentals from the start, Riak scales out to meet your needs.  It also scales down easily, making development and prototyping easy.</p>
-
-			<br />
-			
-			<h3>A database that eases Web operations</h3>
-			<p>A truly fault-tolerant system, no aspect of Riak involves single points of failure.  Since no machines are special or central, the user of Riak can decide exactly how fault-tolerant they would like their application to be.</p>
-			
-		</div>
-		<div id="right">
-			<h3>more information</h3>
-			<ul>
-				<li><a href="dev.html">for developers</a></li>
-				<li><a href="scale.html">for scale</a></li>
-				<li><a href="ops.html">for operations</a></li>
-			</ul>
-                        <img src="images/splash250.gif" alt="Riak" />
-                        <a href="http://www.basho.com"><img src="images/basho-landscape.gif" alt="Basho" /></a>
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/mapreduce.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style-1c.css" type="text/css" />
-	<title>Riak - Map/Reduce brings computation to you data</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Map/Reduce in Riak</p>
-		</div>
-		<div id="left">
-			
-			<h3>The map/reduce programming model</h3>
-<p>Riak provides a data processing implementation based on the
-<a href="http://labs.google.com/papers/mapreduce.html">MapReduce</a>
-model popularized by <a href="http://www.google.com/">Google</a> and
-since adapted by <a href="http://hadoop.apache.org/">Hadoop</a> as
-well as others.  Like every known map/reduce implementation, ours is shaped to best take advantage of our own approach to distributed data organization.
-</p>
-
-<h3>bring the computation to the data</h3>
-<p>
-One of the main reasons to use a map/reduce style of programming is to exploit data locality.  For data processing in a networked environment, it is generally understood that making the computation run where the data is already located will often perform much better (and be much more practical to manage) than moving all the data to the systems that will perform the computation.  Since Riak is <a href="arch.html">designed</a> around algorithms to manage and find data efficiently, the shape of our map/reduce implementation follows naturally from the rest of the system.
-
-</p>
-
-<p>
-A map/reduce query or "flow" is simply a sequence of map and reduce phases, each feeding the next, and together providing an aggregate result.
-</p>
-
-<p>
-A "map phase" is essentially just a function ("F") and an argument ("A") that is defined as part of a series of phases making up a given map/reduce query.  The phase will receive a stream of inputs ("I"), each of which consists of a key identifying a Riak object and an optional additional data element to accompany that object.  As each input is received by the phase, a node that already contains the document ("D") corresponding to "I" will run <code>F(D,A)</code> and stream along the results to the next phase.  The point here is that your function can be executed over many data items, but instead of collecting all of the data items in one place it will execute wherever the data is already placed.
-</p>
-
-<p>
-A "reduce phase" is conceptually simpler.  As it receives inputs from the preceding phase, it collates those inputs along with the ones already received and continually "reduces" the input set until it receives notification that it will receive no further data, at which point the entire reduced set will be streamed to the next phase. Note that this makes a reduce phase a concurrency barrier, as opposed to map phases which can be processing in parallel.  In order for this process to make any sense, a reduce phase's function must be commutative, associative, and idempotent.  Good examples are <code>sum</code> and <code>set-union</code>.  As Riak's core focus is on decentralized data storage and not on compute farming, reduce phases are generally run on a single node -- there is no data-locality gain to be had in reduce.
-</p>
-
-<h3>A perfect fit for the Web</h3>
-<p>
-Since the original published use of map/reduce was for processing Web search indices, it should come as no surprise that this model is a great fit for the general problem of processing linked data.  That is, if your data set consists of many mostly-independent documents, loosely coupled by way of links inside the documents, then map/reduce is very likely to be a good approach to querying that data collection.  To make this even easier, we have added a superficial third type of phase to the model, the "link" phase.  In fact, link phases are just map phases, parameterized ahead of time such that the map function will be a function that knows enough about your document types to extract links matching a given pattern or tag.  While such map phases can of course be written manually, we saw this operation so frequently that we made a shorthand for it -- and now those phases are by far the most common use of our map/reduce engine.
-</p>
-
-<h3>not just for bulk processing</h3>
-<p>
-While the most popular map/reduce systems out there are generally used to apply a map/reduce flow over an entire body of data, Riak provides a more focused approach.  A query is instead "seeded", or provided with the explicit list of inputs that will be used by the first phase in the query.  This approach, combined with the link-following convention, allows for an entirely new set of uses for the map/reduce programming paradigm.
-</p>
-
-<h3>the gory details</h3>
-<p>
-A map/reduce query is initiated with two arguments.  The first is simply the list of values (usually bucket/key pairs as the first phase is almost always a map phase) that will be sent to the first phase in the flow.  The second argument is a list of terms declaring the flow of phases for this query.
-</p>
-
-<p>
-A map phase is declared as:
-</p>
-
-<pre>
-{map, FunTerm, Arg, Accumulate}
-</pre>
-
-<p>
-<code>FunTerm</code> is a reference to the function that will compute the map of
-    each value.  A function referenced by a FunTerm must be arity-3,
-    accepting the arguments <code>(Value, Data, Arg)</code> as follows:
-</p>
-<p>
-<code>Value</code> is the value found at a key.  This will either be a Riak object structure (accessed via the riak_object module) or else the tuple <code>{error, notfound}</code>.
-</p>
-<p>
-<code>Data</code> is an optional piece of data attached to the bucket/key pair that initiated this execution.  If instead of <code>{Bucket, Key}</code>, <code>{{Bucket, Key}, Data}</code> is passed as an input to a map step, that <code>Data</code> will be passed to the map function in this argument.  <code>Data</code> will be the atom <code>'undefined'</code> if the former form is used.
-</p>
-<p>
-<code>Arg</code> is the argument by the same name that was passed to the overall map phase declaration.
-</p>
-<p>
-The <code>FunTerm</code> may take one of two forms: Either <code>{modfun, Module, Function}</code> where <code>Module</code> and <code>Function</code> are atoms that name an Erlang function in a specific module, or <code>{qfun, Function}</code> where <code>Function</code> is a callable fun term.
-</p>
-<p>
-<code>Accumulate</code> should be set to <code>true</code> for all phases whose output is desired in the final result of the map/reduce execution, and <code>false</code> for all others.  The most common pattern is to set this to <code>true</code> in only the very last phase, but some interesting queries can be produced by setting it earlier as well.
-</p>
-<p>
-Note that a map function must return a <strong>list</strong> of values, each of which will be an input to the next phase.
-</p>
-<p>
-A reduce phase is declared as:
-</p>
-
-<pre>
-{reduce, FunTerm, Arg, Accumulate}
-</pre>
-
-<p>
-Where the terms are essentially the same as for map, with the exception that the function referenced by <code>FunTerm</code> must be arity 2.  It takes <code>(ValueList, Arg)</code> with <code>Arg</code> playing the same role as before and <code>ValueList</code> being a round of (possibly already processed) inputs to reduce.
-</p>
-<p>
-Much like with map, a reduce function must return a list of values.  This list will be combined with the next input list the next time the reduce function is called, which is why the reduce function must be commutative, associative, and idempotent.
-</p>
-<p>
-The third and final type of phase is a link phase, declared as <code>{link, Bucket, Tag, Accumulate}</code>.  For this kind of phase to work, there must already be a <code>linkfun</code> property set on <code>Bucket</code> in the cluster, which must return a <code>FunTerm</code>.  This will be translated into a map phase with that term, looking like: <code>{map, FunTerm, {Bucket,Tag}, Accumulate}</code>.
-</p>
-			
-			
-		</div>
-
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/ops.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style.css" type="text/css" />
-	<title>Riak - A database that eases Web operations</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>A truly fault-tolerant system, no aspect of Riak involves single points of failure.  Since no machines are special or central, the user of Riak can decide exactly how fault-tolerant they would like their application to be.</p>
-		</div>
-		<div id="left">
-			
-			<h3>Designed for availability without headaches</h3>
-			<p>Anyone who has worked in Web operations knows that scalability and availability are not the same thing; there are many ways to build a system that can grow to match capacity without necessarily making it any more tolerant of failures.</p>
-
-			<p>The designers of Riak don't just care about distributed systems, we also have a background and interest in good operations.  As a result, Riak was built from the beginning to allow operators to provide high availability and fault tolerance much more easily than with a traditional RDBMS or any system with "master" servers and other single points of failure.</p>
-			
-			<p>The basic architecture of Riak is shared-nothing from a data point of view.  All coordination between nodes is done via asynchronous messages, with no underlying shared state.  This means that if a given node in a Riak cluster hangs, crashes, or catches fire, the other nodes can continue without incident.  As no data is ever persistently stored on only one node, clients will generally not even notice that this has occurred.</p>
-
-			<p>In situations like the above (where a node becomes unreachable for any reason) the system will compensate using hinted-handoff.  This means that neighbors of the errant node will receive the messages it would otherwise have handled, ensuring that features such as replication are not degraded in the window before that node is repaired or replaced.</p>
-
-			<p>Due to use of techniques such as consistent hashing, Riak has no master nodes, "name nodes", "key nodes", or any other similar central elements of the archtecture.  Every node in the system is structurally equivalent.  This has great value operationally, as there's no system or set of systems that you have to be especially watchful or protective of; as long as a quorum of the overall network is available, you don't have to care which hosts go down.</p>
-
-			<p>One of the effects of exposing the consistency, availability, and partition-tolerance (<a href="cap.html">CAP</a>) controls to the application developer is that the developer can work with operations like never before in making decisions about tuning the relative availability of the whole system under different circumstances -- including circumstances under which any traditional system would provide no choice but to become unavailable.</p>
-
-			<p>Riak is also easy to administer.  If you wish to add nodes to <a href="scale.html">add capacity</a> or remove nodes to either reclaim resources or repair broken systems, there is very little operational impact.  You can leave the whole cluster running continuously, and the content will rebalance itself to best suit the new size of the cluster.  Restarting individual nodes is rarely necessary, but can be done whenever you wish without any fear of adversely affecting the other nodes in the system.</p>
-
-			<br />
-			
-			
-		</div>
-		<div id="right">
-			<h3>understanding the riak system</h3>
-			<ul>
-				<li><a href="arch.html">Riak's Architecture</a></li>
-				<li><a href="basic-setup.html">Setting up a Riak Cluster</a></li>
-				<li><a href="eventer.html">Logging, Alerting, and other Events</a></li>
-			</ul>
-        <img src="images/easy-ops.gif" alt="redundancy" />
-        
-
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/programming.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style.css" type="text/css" />
-	<title>Riak - A document-oriented Web database</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="index.html">riak</a></h1>
-		<ul id="top">
-			<li><a href="index.html">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Programming Riak</p>
-		</div>
-		<div id="left">
-			
-			<p>Riak's primary programming interface is JSON over HTTP, which is as close as you can come these days to a universal language and protocol for data exchange.  If you can process JSON and issue an HTTP request, you can easily use Riak.  We have provided some example libraries here as a demonstration and we intend to add more in other languages soon as well as adding other features and improvements to these.
-</p><p>
-<h3>Buckets</h3>
-</p><p>
-The first kind of resource that we'll look at is the "Bucket", which is simply a document namespace with some parameters and a loose schema.  Buckets are containers for documents, and so are conventionally at the top of the URL hierarchy in "jiak" -- the JSON entry point to Riak.  If you have a Bucket named "artist", you can address it using a URL on a Riak server having a path of <code>/jiak/artist</code>.  As buckets come into existence on demand, you cannot meaningfully DELETE them, but the other major HTTP methods work:
-</p><p>
-<strong><code>GET /jiak/Bucket</code></strong>
-</p><p>
-Produce a representation of Bucket containing the bucket's schema and list of keys of documents in that bucket.  Either the "schema" or "keys" query parameters can be sent and set to "false" in order to omit that portion of the response.
-</p><p>
-<strong><code>PUT /jiak/Bucket</code></strong>
-</p><p>
-Set the schema for Bucket according to the request body.
-</p><p>
-<strong><code>POST /jiak/Bucket</code></strong>
-</p><p>
-This is the equivalent of <code>PUT /jiak/Bucket/Key</code> with a server-chosen Key.
-</p><p>
-<h3>Documents</h3>
-</p><p>
-The other core resource generally accessed over HTTP interface is the "Document", the fundamental value in Riak's key/value world.  The fundamental operations all act pretty much as you'd expect:
-</p><p>
-<strong><code>GET /jiak/Bucket/Key</code></strong>
-</p><p>
-Produce a representation of the document at Bucket/Key.
-</p><p>
-<strong><code>PUT /jiak/Bucket/Key</code></strong>
-</p><p>
-Given a representation of an updated document in the request body, store it at the named location.  Unless the document is brand-new, the representation should contain the vclock of the document it descended from in order to help resolve conflicts.  The included libraries (python, php, etc) all manage this for you.
-</p><p>
-If the <code>returnbody</code> query param is set to <code>true</code>, then the response body upon success will have the representation of the document that would be returned by a subsequent <code>GET</code>.  Otherwise, there will be no body.
-</p><p>
-<strong><code>DELETE /jiak/Bucket/Key</code></strong>
-</p><p>
-Delete the document at the named location.
-</p><p>
-<strong><code>POST /jiak/Bucket/Key</code></strong>
-</p><p>
-When issued against a document URL, POST is the same as PUT.
-</p><p>
-<h3>Linked Documents</h3>
-</p><p>
-Another sort of resource can be accessed but not directly modified, as it is dynamically created by link-following on the cluster.
-</p><p>
-<strong><code>GET /jiak/Bucket/Key(/LinkSpec)*</code></strong>
-</p><p>
-Return a list of representations of documents that can be found by starting at <code>Bucket/Key</code> and following the list of <code>LinkSpec</code>s.
-</p><p>
-Each <code>LinkSpec</code> is of the form <code>B,T,A</code> where <code>B</code> is a filter on buckets, <code>T</code> is a filter on link tags, and <code>A</code> is either "0" or "1" depending on whether the documents matched by this spec should be returned in the result or only used as the inputs to the next phase.
-</p><p>
-For example, the path <code>/jiak/B1/K1/_,T2,0/B3,_,1</code> would start at the document found at <code>B1/K1</code>, find the set (which I will call <code>S2</code>) of documents which are linked from that starting document, in any bucket, and with link tags matching <code>T2</code>.  All documents linked from any document in <code>S2</code> and matching the bucket filter <code>B3</code> will be found, and this final set will be produced as the return body for the request.
-</p><p>
-As all of the link-walking is done server-side and via a mapreduce computation with locality to the relevant objects, this operation is much more efficient than fetching all of the intermediate documents and finding/following the links on the client.
-</p><p>
-		</div>
-		<div id="right">
-			<h3>riak libraries</h3>
-			<ul>
-<li><a href="http://hg.basho.com/riak/src/tip/client_lib/jiak.py">in Python</a></li>
-<li><a href="http://hg.basho.com/riak/src/tip/client_lib/jiak.php">in PHP</a></li>
-<li><a href="http://hg.basho.com/riak/src/tip/client_lib/jiak.rb">in Ruby</a></li>
-<li><a href="http://hg.basho.com/riak/src/tip/client_lib/java/src/com/basho/riak/JiakClient.java" style="float:left;">in Java</a><a href="java_client_api/index.html">(javadoc)</a></li>
-<li><a href="http://hg.basho.com/riak/src/tip/client_lib/jiak.js">in JavaScript</a></li>
-<li><a href="edoc/jiak_client.html">in Erlang (json)</a></li>
-<li><a href="edoc/riak_client.html">in Erlang (raw)</a></li>
-			</ul>
-
-			
-		</div>
-
-
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>

www/scale.html

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<meta name="author" content="Basho Technologies" />
-	<meta name="description" content="riak - a decentralized key value store - basho technologies" />
-	<meta name="keywords" content="riak nosql decentralized distributed key value store" />
-    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
-	<link rel="stylesheet" href="css/style.css" type="text/css" />
-	<title>Riak - A database at Web scale</title>
-</head>
-<body>
-	<div id="content">
-		<h1><span class="hr"></span><a href="/">riak</a></h1>
-		<ul id="top">
-			<li><a href="/">Home</a></li>
-			<li><a href="http://hg.basho.com/riak/">Source Code</a></li>
-                        <li><a href="edoc/index.html">API Docs</a></li>
-			<li><a href="faq.html">FAQ</a></li>
-			<li><a href="contact.html">Contact</a></li>
-		</ul>
-		
-		<div id="intro">
-			<p>Developed with solid distributed systems fundamentals from the start, Riak scales out to meet your needs.  It also scales down easily, making development and prototyping easy.</p>
-
-		</div>
-		<div id="left">
-			
-			<h3>Whatever size you need it to be</h3>
-
-			<p>"Scalability" is an often-misused word on the Web.  Scaling is not the same as being fast, and it is not the same as being large.  To say meaningfully that something scales, you must do so in terms of some numerically measurable feature (throughput, latency, volume, anything you can describe with a single number) and some other numerically measurable resource that presumably costs you money (such as the number of computers being used).  To say that something scales is to say that there is a relationship between that resource and that feature which remains constant regardless of how much you increase the numbers.  This is practically useful because it gives you predictable cost ceilings when your needs grow.  If there is no such useful resource/benefit relation, your system does not scale.  (If turning the dial way up on your scaling factor causes some other aspect of your system to perform much worse, your system's scalability is questionable at best.)</p>
-
-			<p>One important way in which Riak scales is in the relationship between total storage capacity and the number of disk-containing servers in the cluster.  If your cluster has a given total capacity of some number "C", and is comprised of "N" servers (which roughly equivalent amounts of disk in each) then you can double your capacity by doubling your number of servers -- no matter what the original values of C and N.</p>
-
-			<p>This is a huge deal, as it means that you don't have to keep packing more and more resources into a single master database, incurring greater and greater marginal expense the farther you go.  Instead, when you need more capacity you just plug in another ordinary server and walk away.</p>
-
-			<p>Most storage systems (including both traditional RDBMS and some more recent document databases) do not scale in any meaningful way.  While you can often add replicas to such systems for redundancy or load-balancing, such systems still require all of the data to fit on a single master.  As soon as you run out of room to add disks to that master, you establish a maximum practical capacity.</p>
-
-			<p>Some systems achieve scaling through <a href="http://en.wikipedia.org/wiki/Shard_%28database_architecture%29">sharding</a>, or dividing the data up into segments, each of which is owned by a separate master.  This achieves some scaling, but typically at the cost of multiplying the points of failure that can bring everything crashing down.  Between namenodes responsible for knowing which shard is which and the fact that each of these shards must now be treated with all of the care of the previous master, operational concerns can climb rapidly as such systems grow.  The <a href="ops.html">operational design</a> of Riak does not have any of these drawbacks.  Riak's scaling is done not by making more "master" locations, but by having no master at all.</p>
-
-			<p>Another essential and often ignored aspect of scaling is "scaling down".  Systems that are designed to work in the large are often very inconvenient to set up, manage, and use in a very small environment such as a developer's laptop.  If a system cannot run in a scaled-down and simple setup, it will be much harder for <a href="dev.html">developers</a> to explore the system and work with it to its fullest potential.  Riak works well even when running on just a single node; developers can easily work against a local instance and have the same code work when deployed on a large cluster elsewhere.</p>
-
-
-			
-		</div>
-		<div id="right">
-<img src="images/more.gif" alt="partitioning the ring" />
-		
-
-			
-		</div>
-		<div id="footer">
-
-		</div>
-	</div>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-10051263-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.