Five Things You Didn't Know You Could do with CouchDB Mark J. Headd Voxeo Labs @mheadd
CouchDB in Review <ul><ul><li>Document-oriented database (NoSQL). </li></ul></ul><ul><ul><li>&quot;Schemaless.&quot; </li>...
Geographic Queries <ul><ul><li>Ability to query CouchDB based on location. </li></ul></ul><ul><ul><li>GeoCouch - formerly ...
Change Notifications <ul><ul><li>_changes endpoint provides information on all changes. </li></ul></ul><ul><ul><li>Simple ...
Formatting with List and Show <ul><ul><li>Special types of design document elements - list and show. </li></ul></ul><ul><u...
URL Rewriting <ul><ul><li>URL paths to display output can be unfriendly. </li></ul></ul><ul><ul><li>CouchDB includes power...
CouchApps <ul><ul><li>Framework for serving HTML/JavaScript apps from Couch. </li></ul></ul><ul><ul><li>Leverages the form...
Questions?
Upcoming SlideShare
Loading in …5
×

5 Things You Didn't Know You Could do with CouchDB

2,339 views

Published on

A discussion of 5 cool features in CouchDB that you might not know about.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,339
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

5 Things You Didn't Know You Could do with CouchDB

  1. 1. Five Things You Didn't Know You Could do with CouchDB Mark J. Headd Voxeo Labs @mheadd
  2. 2. CouchDB in Review <ul><ul><li>Document-oriented database (NoSQL). </li></ul></ul><ul><ul><li>&quot;Schemaless.&quot; </li></ul></ul><ul><ul><li>Documents stored as JSON. </li></ul></ul><ul><ul><li>Queries (&quot;views&quot;) structured as JavaScript Map/Reduce. </li></ul></ul><ul><ul><li>RESTful API  - actually, more than 1: </li></ul></ul><ul><ul><ul><li>Bulk Document API </li></ul></ul></ul><ul><ul><ul><li>Database API </li></ul></ul></ul><ul><ul><ul><li>Document API </li></ul></ul></ul><ul><ul><ul><li>Changes API </li></ul></ul></ul>
  3. 3. Geographic Queries <ul><ul><li>Ability to query CouchDB based on location. </li></ul></ul><ul><ul><li>GeoCouch - formerly a separate fork of CouchDB proper. </li></ul></ul><ul><ul><li>GeoCouch baked in to CouchDB 1.0.2. </li></ul></ul><ul><ul><li>DBs with a &quot;spatial&quot; key in design doc - spatial indexing. </li></ul></ul><ul><ul><li>Special HTTP query to spatial view in design document. </li></ul></ul><ul><ul><li>Returns locations within specified bounding box. </li></ul></ul><ul><ul><li>Example. </li></ul></ul>
  4. 4. Change Notifications <ul><ul><li>_changes endpoint provides information on all changes. </li></ul></ul><ul><ul><li>Simple HTTP GET will list changes. </li></ul></ul><ul><ul><li>JSON payload delivered when change(s) occurs. </li></ul></ul><ul><ul><li>Long running HTTP connections. </li></ul></ul><ul><ul><li>Listening for specific changes with filters. </li></ul></ul><ul><ul><li>Example.  </li></ul></ul>
  5. 5. Formatting with List and Show <ul><ul><li>Special types of design document elements - list and show. </li></ul></ul><ul><ul><li>Purpose is to render CouchDB docs in other formats. </li></ul></ul><ul><ul><li>Show functions operate on a specified document. </li></ul></ul><ul><ul><li>List functions operate on the output of view queries. </li></ul></ul><ul><ul><li>Both are &quot;side effect free&quot; - no additional operations. </li></ul></ul><ul><ul><li>Examples. </li></ul></ul>
  6. 6. URL Rewriting <ul><ul><li>URL paths to display output can be unfriendly. </li></ul></ul><ul><ul><li>CouchDB includes powerful rewrite features. </li></ul></ul><ul><ul><li>Special design document entry called &quot;rewrites&quot;. </li></ul></ul><ul><ul><li>Special configuration setting &quot;vhosts&quot;. </li></ul></ul><ul><ul><li>Ability to use short (friendly) URLs with CouchDB endpoints. </li></ul></ul><ul><ul><li>Can condition on HTTP method used, access params. </li></ul></ul><ul><ul><li>Example. </li></ul></ul>
  7. 7. CouchApps <ul><ul><li>Framework for serving HTML/JavaScript apps from Couch. </li></ul></ul><ul><ul><li>Leverages the formatting, rewrite features discussed. </li></ul></ul><ul><ul><li>Can leverage the same jQuery logic used by Futon. </li></ul></ul><ul><ul><li>Easy to deploy / replicate. </li></ul></ul><ul><ul><li>Remote Agent example. </li></ul></ul>
  8. 8. Questions?

×