<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
<id>tag:www.iriscouch.com,2011-04:/blog</id>
<title type="text">Iris Couch</title>
<subtitle>Iris Couch blog</subtitle>

<link rel="alternate" type="text/html" href="http://www.iriscouch.com/blog" />
<updated>2013-02-06T17:56:28.204Z</updated>
<author>
 <name>Iris Couch</name>
 <email>us@iriscouch.com</email>
</author>

 <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/iriscouch" /><feedburner:info uri="iriscouch" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
   <id>tag:www.iriscouch.com,2013-02-06:/blog/Post/premium_server_announce</id>
   <title>Announcing Premium Server</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/bC8q18NIUAE/announcing-premium-server" />
   
   <updated>2013-02-06T14:08:07.860Z</updated>
   <published>2013-02-06T14:08:07.860Z</published>
   
     <author>
       <name>Jeff</name>
       <email>jeff@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>We’re excited to announce our latest product—a Premium Server option for Iris Couch users. <em>Premium Server</em> gives serious users an option to increase the stability and response time of their couches. It costs $75/month (in addition to the regular, metered fees), and buys you oh-so-much-more peace of mind... and performance.</p>

<p>A Premium server is more responsive and reliable than a standard CouchDB server. Premium servers run on isolated, dedicated clusters.</p>

<p>Interested? <a href="https://www.iriscouch.com/account/#/billing">Log in</a> and enable Premium Server in our billing page.</p>

<p>Once you have a credit card on file, you will see a Premium Server option. If for any reason you’re dissatisfied with the service, you can cancel at any time.</p>

<h2>More Details</h2>

<p>What, exactly, is a Premium server?</p>

<p>Premium servers run permanently in specialized clusters, with dedicated CPU and memory. Premium servers run on a common physical server, with dedicated CPU, memory, and i/o resources. Nothing is “oversold.”</p>

<p>Premium servers never pause when idle. Typically, if a couch goes unused for too long, we pause it, freeing resources to share with others. Unfortunately, infrequent usage suffers high latency. Premium servers do not have this issue.</p>

<p>Premium servers are monitored. Our automated tools monitor everything. But people watch every premium server 24/7. If we see any server issues, we respond immediately.</p>

<p>Premium servers are isolated. Each cluster runs in a dedicated DNS zone and uses dedicated HTTP infrastructure. Issues in one cluster do not affect another.</p>

<p>Premium servers work. Thanks to many of our users for months of beta testing. Premium service already supports many couches, such as the <a href="http://npmjs.org">Node.js npm registry</a>, a mission-critical CouchDB service, processing over 100 million monthly requests.</p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/bC8q18NIUAE" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2013/02/announcing-premium-server</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2012-04-11:/blog/Post/payments_announce</id>
   <title>Announcing paid cloud CouchDB hosting</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/5uciai-1V6g/announcing-paid-cloud-couchdb-hosting" />
   
   <updated>2012-04-11T05:00:00.000Z</updated>
   <published>2012-04-11T05:00:00.000Z</published>
   
     <author>
       <name>Jeff</name>
       <email>jeff@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>April 12 is Iris Couch’s <a href="http://www.iriscouch.com/blog/2011/04/hello-world">one year birthday</a>. Today, we offer paid cloud CouchDB hosting plans.</p>

<h2>How it Works</h2>

<p>Our <a href="/service">pricing plan</a> has the details. It is relaxing and RESTful. Your log file is your receipt.</p>

<p>This month is completely <em>free for everybody</em>. May is the first month under the new policy.</p>

<ul>
<li>People who don’t accrue $5/month of usage <strong>don't owe anything</strong> for that month</li>
<li>The vast majority of users don’t accrue $5/month in usage charges.</li>
<li>Thus, by the transitive property of service pricing, most of you won’t pay anything</li>
<li><a href="/account">Your account</a> shows your historical usage since you signed up</li>
</ul>

<p>Below, co-founders Jeff and Jason reflect on our milestone.</p>

<h2>Jeff’s thoughts</h2>

<p>I’m really proud of how dialed-in this service has become with Jason’s expertise. I’m excited about this launch and new features we have in development. Mostly, though, I’m really looking forward to not feeling so sad every month signing huge checks to pay our hosting bills.</p>

<p>We spent a lot of time mulling over how to price this so that beginners and tinkerers can still have a free sandbox, and I think what we’ve come up will protect that. Thus Iris Couch will remain both a platform and a tool to spread the word about how relaxing CouchDB is.</p>

<h2>Jason’s thoughts</h2>

<p>I am pleased with our first year. We have built technology I am proud of. Many people (Jeff in particular) have asked:</p>

<blockquote>Why the delay for paid stuff? Aren't you hungry? Are you lazy?</blockquote>

<p>We are both hungry and diligent. But despite being an Apache CouchDB developer, I am a sysadmin first. Before I take your money to steward your data, I have an ethical duty to produce a proven, reliable service.</p>

<ul>
<li>We proved our mettle, in production, for <em>two years</em> (CouchOne plus Iris Couch)</li>
<li>We have had zero data loss incidents.</li>
<li>We have zero single points of failure.</li>
<li>We have a confirmed, tested backup process</li>
<li>We have a confirmed, tested off-site disaster recovery process</li>
</ul>

<p>Is it perfect? No, it is better than “perfect.” It is very <em>good</em>. We built something befitting a proper database company.</p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/5uciai-1V6g" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2012/04/announcing-paid-cloud-couchdb-hosting</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2012-04-07:/blog/Post/1.2.0_announce</id>
   <title>Upgrade to Apache CouchDB 1.2.0</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/tMtgeONObRk/upgrade-to-apache-couchdb-1-2-0" />
   
   <updated>2012-04-07T00:49:58.675Z</updated>
   <published>2012-04-07T00:49:58.675Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Just now, the Apache CouchDB project <a href="http://mail-archives.apache.org/mod_mbox/couchdb-user/201204.mbox/%3cCA+Y+444oR9G6yRYB4vtfpkn37yyvgZWtesxy2A5+910dsYUOwg@mail.gmail.com%3e">released version 1.2.0</a>.</p>

<p>I am happy to announce that all Iris Couch accounts are now running this release. You needn’t do anything, the upgrade is automatic. Just relax on the Couch!</p>

<p>Notable improvements:</p>

<ul>
<li>Persistent cookies—users remain logged in through a browser restart</li>
<li>More secure <code>_users</code> database</li>
<li>Better, faster replication</li>
<li>Reduced (and faster) disk usage</li>
</ul>

<p>We also upgraded to the new Ocasta Labs <a href="http://mail-archives.apache.org/mod_mbox/couchdb-user/201203.mbox/%3CCADR1q3AU7aTn08rkJpmgjs0qK1BK5QjDkPxDfe0-JH2xBMaeYQ@mail.gmail.com%3E">Facebook Authentication plugin</a>. It is now easy and relaxing to build a Couch app letting users log in via Facebook.</p>

<p>Please <a href="mailto:us@iriscouch.com">email us</a> if you have questions or issues, or visit our <a href="https://getsatisfaction.com/iriscouch/">support forum</a>. Thanks!</p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/tMtgeONObRk" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2012/04/upgrade-to-apache-couchdb-1-2-0</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2012-01-11:/blog/Post/damien_response</id>
   <title>The future of awesome databases</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/KeLUi_UKm10/the-future-of-awesome-databases" />
   
   <updated>2012-01-11T03:19:58.624Z</updated>
   <published>2012-01-11T03:19:58.624Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Damien Katz’s blog post, <a href="http://damienkatz.net/2012/01/the_future_of_couchdb.html">The Future of CouchDB</a> deserves a response.</p>

<p>Damien tackles difficult problems, thinking clearly and executing well. If he is focusing on Couchbase, then Couchbase will be outstanding.</p>

<p>Both CouchDB and Couchbase are domain-specific databases. Moreover, these domains intersect minimally. The projects represent non-overlapping magisteria; and one might say instead that the future of <em>awesome datatabases</em> is Couchbase.</p>

<p>We are interested in CouchDB’s domain, <a href="http://caolanmcmahon.com/posts/couchdb_is_not_a_database">web applications modeled after the web itself</a>: standard, decentralized, and skewed toward empowering regular people.</p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/KeLUi_UKm10" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2012/01/the-future-of-awesome-databases</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2011-07-11:/blog/Post/coffee_futon_fb</id>
   <title>CoffeeScript, Facebook, and Futon</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/G_jqCCudeaQ/coffeescript-facebook-and-futon" />
   
   <updated>2011-07-11T10:24:05.597Z</updated>
   <published>2011-07-11T10:24:05.597Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Starting today, all Iris Couch accounts have several new features.</p>

<h2>CoffeeScript</h2>

<p>We support <a href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a>.</p>

<p>Our founding mantra is “orthodox CouchDB”; however, I’ve bent the rules, backporting from Apache CouchDB trunk, keeping parity with <a href="http://www.couchbase.com/products-and-services/couchbase-single-server">Couchbase Single Server</a>.</p>

<p>Here is a simple CoffeeScript design document, formatted for clarity.</p>

<pre><code class="no-highlight">{ "_id"     : "_design/coffee_app"
, "language": "coffeescript"
, "shows"   : { "hello_world": "(doc) -&amp;gt; 'Hello, #{doc._id}!'" }
, "filters" : { "has_foo"    : "(doc) -&amp;gt; doc.foo"              }
, "views":
  { "foo": { "map"   : "(doc) -&amp;gt;
                          if doc.foo
                            emit(doc.foo, 1)"

           , "reduce": "(keys, values, rereduce) -&amp;gt;
                          sum = 0
                          for x in values
                            sum = sum + x
                          sum"
           }
  }
}
</code></pre>

<h2>Mobile Futon</h2>

<ol>
<li>Get out your iPhone or Android.</li>
<li>Go to Futon: <a href="https://example.iriscouch.com/_utils/">https://example.iriscouch.com/_utils/</a></li>
<li>Nice, isn’t it? That is Dale Harvey’s <a href="https://github.com/daleharvey/mobilefuton">Mobile Futon</a>.</li>
</ol>

<p>You can disable Mobile Futon by clicking the <strong>Configuration</strong> link in Futon. Under <em>httpd</em>, set <em>mobile_futon</em> to <code>false</code>.</p>

<h2>Sammy Futon</h2>

<p>We heard the rumors too: an elusive “alternative Futon.” It has neither name nor <a href="https://github.com/BigBlueHat/couchdb/tree/sammy">master</a>. Some say it evolved from proper Futon. Others say “devolved” would be more accurate.</p>

<p>In any case, we’ve captured a live specimen, installed it alongside its cousin, and named it <em>Sammy Futon</em> to sound adorable.</p>

<p>You can enable Sammy Futon by clicking the <strong>Configuration</strong> link in Futon. Under <em>httpd</em>, set <em>sammy_futon</em> to <code>true</code>.</p>

<h2>Facebook Authentication</h2>

<p>Iris Couch now supports <a href="http://www.ocastalabs.com/">Ocasta Labs</a>’s excellent <a href="http://www.ocastalabs.com/2011/06/facebook-authentication-for-couchdb/">Facebook Authentication module</a>. Your users can log in to your application using their Facebook account.</p>

<p>This is not quite turn-key. (What can I say? It’s Facebook.) To use CouchDB Facebook authentication, visit the <strong>Configuration</strong> link in Futon, and input your information in the <em>[fb]</em> section. See Martin’s <a href="https://github.com/ocastalabs/CouchDB-Facebook-Authentication">documention</a>, under <em>Configuration</em>.</p>

<h2>Feedback</h2>

<p>If you have feedback or issues, please let us know at the <a href="http://getsatisfaction.com/iriscouch/">Iris Couch Get Satisfaction</a> forum, or email <a href="mailto:us@iriscouch.com">us@iriscouch.com</a>.</p>

<h2>Thanks</h2>

<p>Other people wrote this code; we simply take the credit. We are grateful to the following people for their inspiring CouchDB projects.</p>

<ul>
<li>Jan Lehnardt at <a href="http://www.couchbase.com/">Couchbase</a>, for implementing CoffeeScript support</li>
<li>Martin Higham at Ocasta Labs, and <a href="http://s89.nl/">Sander Dijkhuis</a> for Facebook authentication; and Ed Moore at Ocasta Labs for helping me understand it all</li>
<li>Dale Harvey at <a href="http://www.couchbase.com/">Couchbase</a>, for Mobile Futon</li>
<li>Benjamin Young, Dale Harvey (both at <a href="http://www.couchbase.com/">Couchbase</a>), <a href="http://www.sbisbee.com/">Sam Bisbee</a>, and <a href="http://www.mikealrogers.com/">Mikeal Rogers</a> (now at <a href="http://www.yammer.com/">Yammer</a>) for Sammy Futon</li>
</ul><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/G_jqCCudeaQ" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2011/07/coffeescript-facebook-and-futon</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2011-07-10:/blog/Post/mysql_and_startups</id>
   <title>Wake up: Nobody Cares About Scaling</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/da9xL3WA6p4/wake-up-nobody-cares-about-scaling" />
   
   <updated>2011-07-10T01:13:43.277Z</updated>
   <published>2011-07-10T01:13:43.277Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Derrick Harris and Michael Stonebreaker say Facebook’s MySQL is <a href="http://gigaom.com/cloud/facebook-trapped-in-mysql-fate-worse-than-death/">a fate worse than death</a>.</p>

<p>Indeed, it seems <em>Facebook's Burden</em> is worthy of our pity.</p>

<blockquote>Not that it’s necessarily Facebook’s fault, though. Stonebraker says the social network’s predicament is all too common among web startups that start small and grow to epic proportions.</blockquote>

<p>Oh, cry me a bleeding river, Mr. Stonebreaker.</p>

<p>What’s too common is brilliant web startups that start small and die smaller.</p>

<p>Time-to-market. Easy. These are what businesses need. That is why SQL remains competitive and compelling. Scalability is worthless until you’ve got a superior getting-started pitch.</p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/da9xL3WA6p4" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2011/07/wake-up-nobody-cares-about-scaling</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2011-06-15:/blog/Post/couchdb_parable</id>
   <title>The Parable of CouchDB</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/DqgLhiYKD0U/the-parable-of-couchdb" />
   
   <updated>2011-06-15T00:13:59.853Z</updated>
   <published>2011-06-15T00:13:59.853Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Suppose you begin keeping a personal library. You’ve rented a floor from the building in the Matrix. It’s just room after room, all identical; except the big main room at the end with the source. Helmut Bakaitis is your librarian, and he can perform a couple of minor miracles.</p>

<p><img src="http://www.iriscouch.com/blog_img/matrix_backdoor.jpg" alt="Plain hallway with identical doors" title="Your library facility" style="width: 100%; height: 166px;" /><br /><em>Your library facility</em></p>

<p>The big main room holds all your stuff. There is no organization at all. It’s just piles and piles of things. You can keep scientific journals, your childhood pop-up books, your private literature, an old globe that still says U.S.S.R.—pretty much anything. Just throw it in the pile. On your way out the door, the librarian asks, “what do you call that thing?” and you’re like, “whatever.” As far as <strong>adding</strong> to your library, nothing could be simpler.</p>

<p>To <strong>access</strong> the stuff in your library, you’ll exploit the librarian’s miracles. The librarian can make unlimited copies of your stuff, instantly! He’s got a full arts-and-crafts kit: colored paper, popsicle sticks, scissors, and sticky tack. He can complete any project you can conceive, instantly!</p>

<p>The librarian keeps <em>similar</em> copies of your library in <em>every normal room</em> on the floor. Normal rooms are impeccably organized: long shelves, sorted, everything in its place. Each room’s shelves are sorted differently, depending on what you want. Pick out a room and tell the librarian how to sort the shelves. You’ll say, "This is the <strong>titles</strong> room. Everything in here is always shelved by title." <em>Poof!</em> It’s just like your main library, but everything is shelved by title.</p>

<p>Go to the next room. You say, "Everything here is shelved by <strong>author</strong>." <em>Poof!</em> Now you’ve got two rooms, totally organized. When you need Asimov, you know just where to find him. On and on, you can use every room on the floor, and you can make specialized rooms. You can say, "This is the <strong>personal</strong> room. It’s got my private literature and nothing else." We’ve all got a personal room; but different people’s rooms will be differently-populated. Of course, the librarian can expand or pare-down your normal-room copies: whatever you need to look things up easily.</p>

<p>If you like, you can alter or even destroy your stuff in the big main room. The librarian ensures that normal rooms reflect changes from the source material. For example, if you scribble corrections on your globe, you won’t find the USSR in your normal rooms anymore.</p>

<p>But the big main room is disorganized. How will you find anything? Fortunately, the librarian remembers it all. Just ask him, “Hey, where’s my globe?” And there’s your globe! Start scribbling.</p>

<p>The End.</p>

<h2 class="notoc">Key (Spoilers)</h2>

<table class="key" summary="Translation Key">
<thead>
  <tr>
    <th scope="col">In the story</th>
    <th scope="col">In CouchDB</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Personal library</td>
    <td>Database</td>
  </tr>
  <tr>
    <td scope="col">Floor</td>
    <td scope="col">Hard disk space</td>
  </tr>
  <tr>
    <td scope="col">Big main room</td>
    <td scope="col">The database API</td>
  </tr>
  <tr>
    <td scope="col">Things in the main room</td>
    <td scope="col">Records ("documents") in the DB</td>
  </tr>
  <tr>
    <td scope="col">What do you call that / whatever</td>
    <td scope="col">Optional document ID ("_id")</td>
  </tr>
  <tr>
    <td scope="col">Normal room</td>
    <td scope="col">Database view</td>
  </tr>
  <tr>
    <td scope="col">Librarian's miracle</td>
    <td scope="col">Internal CouchDB mechanism</td>
  </tr>
  <tr>
    <td scope="col">Altering your stuff</td>
    <td scope="col">Updating a document</td>
  </tr>
</tbody>
</table><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/DqgLhiYKD0U" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2011/06/the-parable-of-couchdb</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2011-06-28:/blog/Post/davisp</id>
   <title>Paul Davis joins Cloudant</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/he_84yHBPNQ/paul-davis-joins-cloudant" />
   
   <updated>2011-06-28T08:41:02.864Z</updated>
   <published>2011-06-28T08:41:02.864Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>We are glad to hear that Paul Davis, long-time Apache CouchDB committer and community leader, is <a href="http://blog.cloudant.com/paul-davis-joining-cloudant/">joining Cloudant</a>.</p>

<p><a href="https://cloudant.com/">Cloudant</a> is just brilliant. They are building awesome software and services around Apache CouchDB. May Paul find his new role rewarding, and may Cloudant continue its brilliance.</p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/he_84yHBPNQ" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2011/06/paul-davis-joins-cloudant</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2011-05-12:/blog/Post/bailing</id>
   <title>How-To: Bail out on Iris Couch</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/F0gIUv2MS68/how-to-bail-out-on-iris-couch" />
   
   <updated>2011-05-12T02:07:42.636Z</updated>
   <published>2011-05-12T02:07:42.636Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Iris Couch and CouchDB means easy data replication and no vendor lock-in for you. It is important to explore what that means.</p>

<p>Let’s walk through how you would pack up and move on. Thanks to CouchDB, it’s simple! Even if you actually <em>like</em> Iris Couch, this is a useful exercise:</p>

<ul>
<li>You’ll maintain an independent disaster-recovery or backup site.</li>
<li>You’ll stay <em>upstream</em>. If your needs ever change, at any time, for any reason, switch couches.</li>
<li>You’ll sharpen your CouchDB skills.</li>
</ul>

<h2>The Big Idea</h2>

<p>This is a basic disaster-recovery (DR) scenario. We want to perform one simple task to completely pull the plug, jumping to a different CouchDB system.</p>

<p>Thus these are the main objectives:</p>

<ul>
<li>Have a duplicate of the <strong>Iris couch</strong>, called <strong>B-Couch</strong>.</li>
<li>B-Couch syncs from Iris couch automatically or regularly.</li>
<li>Be able to activate B-Couch with a single domain name change.</li>
</ul>

<h2>Quick and Dirty Sidenote</h2>

<p>If you have no backups whatsoever, the dead-simple <em>partial solution</em> is to make a full document dump: <code>/my_db/_changes?include_docs=true</code></p>

<p>This is like an <strong>incomplete mysqldump</strong> because it does not fetch document attachments. On the other hand, it’s a quick one-liner which you can run from cron, so what’s stopping you?</p>

<pre><code class="no-highlight">$ curl '<a href="https://icuser:icsec@ex.iriscouch.com/db/_changes?include_docs=true">https://icuser:icsec@ex.iriscouch.com/db/_changes?include_docs=true</a>'
{"results":[
{"seq":5,"id":"doc 1","doc":{"_id":"doc 1","_rev":"7-1f6e64...","awesome":true}, etc. },
{"seq":8,"id":"other doc","doc":{"_id":"other doc","_rev":"3-8b92cd..."}, etc. },
{ ... etc ... },
],
"last_seq":97}
</code></pre>

<p><strong>This is not a complete copy</strong> of the data. Again: it will not include attachments.</p>

<p>However, if you have no backups in the first place, well, at least it’s a full replica of the data. Bang for buck.</p>

<p>Next I’ll explore a proper couch clone. Yeah. We all see what’s coming. We’re going to <em>replicate</em> CouchDB—no surprises there. Of course, “surprise” isn’t typically part of a good DR plan.</p>

<h2>Preparing the Iris couch</h2>

<p>First, you need a user account on the Iris couch. This account must have permission to read every database. In a pinch, that can be the system <code>_admin</code> account.</p>

<p>For this discussion, suppose the user name is <em>icuser</em> and the password is <em>icsec</em>, on the couch <em>ex.iriscouch.com</em>.</p>

<p>Confirm that <em>icuser</em> (or any of <em>icuser</em>’s roles) can access every database. The security object (in Futon’s “Security” section) for each database should list <em>icuser</em> in the “users” array, or one of <em>icuser</em>’s roles in the “roles” array.</p>

<p>In other words:</p>

<pre><code class="no-highlight">* For each database:
  * Check the _security object (the "Security" link in Futon)
  * Check the "Admins" section:
    * If Names contains icuser, ok.
    * If Roles contains any of icuser's roles, ok.
  * Check _security (the Security link in Futon) in the Readers section:
    * If Names and Roles are both empty, ok.
    * If Names contains icuser, ok.
    * If Roles contains any of icuser's roles, ok.
  * Otherwise, you must add icuser (or its role) somewhere in this mix.
</code></pre>

<p>You can confirm that everything works with <code>curl</code>.</p>

<pre><code class="no-highlight">$ curl <a href="https://icuser:icsec@ex.iriscouch.com/_all_dbs">https://icuser:icsec@ex.iriscouch.com/_all_dbs</a>
["stuff","not_stuff"]

$ curl <a href="https://icuser:icsec@ex.iriscouch.com/stuff">https://icuser:icsec@ex.iriscouch.com/stuff</a>
{"db_name":"stuff","doc_count":92,"doc_del_count":12,... // etc.

$ curl <a href="https://icuser:icsec@ex.iriscouch.com/not_stuff">https://icuser:icsec@ex.iriscouch.com/not_stuff</a>
{"db_name":"not_stuff","doc_count":8,"doc_del_count":0,... // etc.
</code></pre>

<h2>Preparing B-Couch</h2>

<p>Obviously, you need <strong>B-Couch</strong> on-line. This can be pretty much any CouchDB server you can find or run yourself. In fact, B-Couch can be on your laptop, or a spare computer in the office. If you haven’t got <em>any</em> clone of your couch, by all means, start with CouchDBX, homebrew, or (if you’re sophisticated) the CouchDB that comes with your OS.</p>

<p>If B-Couch is private, you won’t have the DNS switchover we discuss later. But again: that’s better than nothing.</p>

<p>Iris Couch runs the GeoCouch plugin. An easy way to build CouchDB with GeoCouch is with <a href="https://github.com/iriscouch/build-couchdb">Build CouchDB</a>. (Well, you might say “an easier way.”) <strong>GeoCouch is not necessary to have a complete backup</strong>; however, if you want to use B-Couch in production with geo queries, you’ll need it.</p>

<p>As before, you need a Couch user with write access to the databases. You could use the <code>_admin</code> account. Nobody’d blame you. But a less-privileged account is better.</p>

<p>A good place to start is replicating the user database straightaway.</p>

<pre><code class="no-highlight">$ curl -X POST <a href="http://admin:secret@couch.b-couch.com/_replicator/">http://admin:secret@couch.b-couch.com/_replicator/</a>      \
  -H 'Content-Type: application/json'                            \
  -d '{ "source":"<a href="http://icuser:icsec@ex.iriscouch.com/_users">http://icuser:icsec@ex.iriscouch.com/_users</a>"}  \
      , "target": "_users"}'
</code></pre>

<p>Replicating the <code>_users</code> database will add identical account names and roles to B-Couch. If you don’t want peopla <em>using</em> B-Couch, then set the <code>_security</code> objects differently on B-Couch. See? Locked down. That’s why security objects don’t replicate.</p>

<p>Confirm that B-Couch responds to queries and that everything looks good.</p>

<pre><code class="no-highlight">$ curl <a href="https://icuser:icsec@couch.b-couch.com/">https://icuser:icsec@couch.b-couch.com/</a>
{"couchdb":"Welcome","version":"1.1.0"}

$ curl <a href="https://icuser:icsec@couch.b-couch.com/_session">https://icuser:icsec@couch.b-couch.com/_session</a>
{ "ok": true
, "userCtx": { "name": "icuser", "roles": ["some_role"] }
, "info": { "authentication_db": "_users"
          , "authentication_handlers": [ "oauth", "cookie", "default" ]
          , "authenticated": "default"
          }
}
</code></pre>

<h2>Replicate</h2>

<p>You did it once already and it wasn’t so bad. Do that for every database you need.</p>

<pre><code class="no-highlight">for db in admin_db _users some_other_db; do
  curl -X POST <a href="http://admin:secret@couch.b-couch.com/_replicator/">http://admin:secret@couch.b-couch.com/_replicator/</a>    \
       -H 'Content-Type: application/json'                           \
       -d '{ "source":"<a href="http://icuser:icsec@ex.iriscouch.com/_users">http://icuser:icsec@ex.iriscouch.com/_users</a>"} \
           , "target": "_users"}'
done
</code></pre>

<p>Here our paths diverge a bit. This is <em>your</em> back-up, DR, cold-spare, hot-spare, or whatever. The point is, you’ve got your own couch that is a clone of your Iris couch. Back it up to tape. Put it in Dropbox. Whatever.</p>

<p>The command above <strong>does not use continuous replication</strong>.  Instead, it starts one-off replications, effective immediately. That’s easy to understand, easy to keep an eye on, and easy to back up correctly.</p>

<p>You might prefer a <em>continuous</em> replication, maintaining a real-time copy of the Iris couch. Any time, rain or shine, B-Couch will be identical to the Iris couch. If that sounds like something you want, add one more field to your replication requests:</p>

<pre><code class="javascript">{ <span class="string">"source"</span>: <span class="string">"<a href="http://icuser:icsec@ex.iriscouch.com/_users">http://icuser:icsec@ex.iriscouch.com/_users</a>"</span>}
, <span class="string">"target"</span>: <span class="string">"_users"</span>
, <span class="string">"continuous"</span>: <span class="literal">true</span>
}
</code></pre>

<h2>The hostname switch</h2>

<p>Finally, the big red button!</p>

<p>We want one simple place where we can change one configuration or setting, and B-Couch takes over in production.</p>

<p>The answer is to use your own DNS domain. For example, suppose your domain is <strong>example.com</strong>. Build your applications and services to use CouchDB from <strong>couch.example.com</strong>.</p>

<pre><code class="no-highlight">; Example BIND 9 setting. This points a domain name I
; control (couch.example.com) to whichever couch I
; prefer (currently Iris Couch).
couch           CNAME   ex.iriscouch.com.
</code></pre>

<p>Consider the time-to-live (TTL) for your domain. When you change the CNAME, users will still connect to the Iris couch for up to <em>TTL</em> seconds.</p>

<p>Confirm that your CNAME looks good and works for queries.</p>

<pre><code class="no-highlight">$ dig couch.example.com A

;; QUESTION SECTION:
;couch.example.com.             IN      A

;; ANSWER SECTION:
couch.example.com.      712     IN      CNAME   ex.iriscouch.com.
ex.iriscouch.com.       712     IN      A       184.73.200.44

$ curl <a href="https://icuser:icsec@couch.example.com/">https://icuser:icsec@couch.example.com/</a>
{"couchdb":"Welcome","version":"1.1.0"}
</code></pre>

<p><strong>You're done!</strong></p>

<p>Now, if you ever need to change which couch you use for production, just update the CNAME record in your DNS domain. No software changes, no downtime, no lock-in.</p>

<pre><code class="no-highlight">; Modified BIND 9 setting. This points a domain name I
; control (couch.example.com) to whichever couch I
; prefer (now B-Couch).
couch           CNAME   couch.b-couch.com.
</code></pre>

<p>When that pushes and propogates, the client-side (that is, your web app or iPhone app) doesn’t change.</p>

<pre><code class="no-highlight">$ dig couch.example.com A

;; QUESTION SECTION:
;couch.example.com.             IN      A

;; ANSWER SECTION:
couch.example.com.      811     IN      CNAME   couch.b-couch.com.
couch.b-couch.com.      811     IN      A       1.2.3.4
</code></pre>

<p>Note that the couch clients require no change at all.</p>

<pre><code class="no-highlight">$ curl <a href="http://couch.example.com/">http://couch.example.com/</a>
{"couchdb":"Welcome","version":"1.1.0"}
</code></pre><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/F0gIUv2MS68" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2011/05/how-to-bail-out-on-iris-couch</feedburner:origLink></entry>

 <entry>
   <id>tag:www.iriscouch.com,2011-04-12:/blog/Post/hello</id>
   <title>Hello, world</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iriscouch/~3/eN8SL1u0Vto/hello-world" />
   
   <updated>2011-04-12T00:00:00.000Z</updated>
   <published>2011-04-12T00:00:00.000Z</published>
   
     <author>
       <name>Jason</name>
       <email>jhs@iriscouch.com</email>
     </author>
   
   
   <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Welcome to Iris Couch!  I’m glad you visited the new site.</p>

<p>Our mantra is <em>Easy CouchDB</em>. We strongly feel that CouchDB doesn’t need developers working on it, it needs developers working <em>on</em> it—using Couch to build amazing stuff.</p>

<p>When you’re in CouchDB land, you write HTML and Javascript to do <em>everything</em>. It’s pretty liberating. I wonder if wordly problems such as installation and configuration prevented people from trying Couch. That seems very likely. So, the obvious answer is to make it a button press on the Internet.</p>

<p>Of course, with CouchDB (by way of <a href="http://www.couchbase.com/">Couchbase</a>) aggressively going after iOS and mobile, we’d better get started building amazing applications on top of CouchDB. </p><xhtml:img xmlns:xhtml="http://www.w3.org/1999/xhtml" src="http://feeds.feedburner.com/~r/iriscouch/~4/eN8SL1u0Vto" height="1" width="1" /></div></content>
 <feedburner:origLink>http://www.iriscouch.com/blog/2011/04/hello-world</feedburner:origLink></entry>

</feed>
