Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introducing CouchDB Tuesday November 11, 2009 Hatem Ben Yacoub
Who am I ? <ul><li>Hatem Ben Yacoub
IT Consultant
Senior Systems Architect
PHP Expert
e-Government Specialist
Energy Engineer
Open Source Evangelist
http://phpmagazine.net
[email_address]  /  @hatem  /  http://hatem.tel   </li></ul>
How to build faster, bigger, reliable websites...
Scalability
Scalability ~== Database optimization
RDBMS … old fashion
…  new fashion ??
NoSQL “ Not Only SQL”
Scaling writes & Scaling reads
NoSQL Non-Distributed databases (Redis, MongoDB, CouchDB , Neo4j, Tokyo cabinet ...) Distributed Databases (Cassandra, Hba...
 
CouchDB is NOT <ul><li>A relational database.
A replacement for relational databases.
An object-oriented database. </li></ul>
CouchDB is <ul><li>OpenSource Database
RESTful API
Schema-less document store (document in JSON format)
Multi-Version-Concurrency-Control model
User-defined query structured as map/reduce
Incremental Index Update mechanism
Multi-Master Replication model
Written in Erlang </li></ul>
Let's give it a try Ubuntu 9.10 already uses couchdb  (all POSIX systems supported) Install the database server : $sudo ap...
Test installation
CouchDB port 5984
CouchDB Management interface (Futon)
Create database test
Upcoming SlideShare
Loading in …5
×

Introducing CouchDB

3,056 views

Published on

An introduction to CouchDB for the first Jeddah Geeks meetup on 13/Nov/2009

Published in: Technology

Introducing CouchDB

  1. 1. Introducing CouchDB Tuesday November 11, 2009 Hatem Ben Yacoub
  2. 2. Who am I ? <ul><li>Hatem Ben Yacoub
  3. 3. IT Consultant
  4. 4. Senior Systems Architect
  5. 5. PHP Expert
  6. 6. e-Government Specialist
  7. 7. Energy Engineer
  8. 8. Open Source Evangelist
  9. 9. http://phpmagazine.net
  10. 10. [email_address] / @hatem / http://hatem.tel </li></ul>
  11. 11. How to build faster, bigger, reliable websites...
  12. 12. Scalability
  13. 13. Scalability ~== Database optimization
  14. 14. RDBMS … old fashion
  15. 15. … new fashion ??
  16. 16. NoSQL “ Not Only SQL”
  17. 17. Scaling writes & Scaling reads
  18. 18. NoSQL Non-Distributed databases (Redis, MongoDB, CouchDB , Neo4j, Tokyo cabinet ...) Distributed Databases (Cassandra, Hbase, Riak, Scalaris...)
  19. 20. CouchDB is NOT <ul><li>A relational database.
  20. 21. A replacement for relational databases.
  21. 22. An object-oriented database. </li></ul>
  22. 23. CouchDB is <ul><li>OpenSource Database
  23. 24. RESTful API
  24. 25. Schema-less document store (document in JSON format)
  25. 26. Multi-Version-Concurrency-Control model
  26. 27. User-defined query structured as map/reduce
  27. 28. Incremental Index Update mechanism
  28. 29. Multi-Master Replication model
  29. 30. Written in Erlang </li></ul>
  30. 31. Let's give it a try Ubuntu 9.10 already uses couchdb (all POSIX systems supported) Install the database server : $sudo apt-get install couchdb
  31. 32. Test installation
  32. 33. CouchDB port 5984
  33. 34. CouchDB Management interface (Futon)
  34. 35. Create database test
  35. 36. Firebug
  36. 37. Creating a document with jQuery // server respond with JSON also : // {&quot;ok&quot;:true, &quot;id&quot;:&quot;323409622afb6477e7108684785256b8&quot;, &quot;rev&quot;:&quot;1-3182c819b0f98858c54ad920d6c44498&quot;} // including the document id and revision, and a confirmation variable ok=true
  37. 38. How to request this document ? // response is also in JSON : // {&quot;_id&quot;:&quot;323409622afb6477e7108684785256b8&quot;, &quot;_rev&quot;:&quot;1-3182c819b0f98858c54ad920d6c44498&quot;, &quot;Name&quot;:&quot;Makkah&quot;, &quot;Zip&quot;:21955}
  38. 39. What about updating ? // notice in the response we have revision changed to 2 // {&quot;ok&quot;:true, &quot;id&quot;:&quot;323409622afb6477e7108684785256b8&quot;, &quot;rev&quot;:&quot;2-03779debc847f783493a69e61bd98560&quot;}
  39. 40. What about creating a view ? // Server respond with {&quot;ok&quot;:true, &quot;id&quot;:&quot;_design/render&quot;, &quot;rev&quot;:&quot;1-f95a9b997f1081043fda1a34be76c47e&quot; } http://127.0.0.1:5984/test/_design/render/_show/code/480f17c996bcbd174ac64b976de47f79
  40. 41. Easy ?!
  41. 42. Why CouchDB <ul><li>Easy to use data storage (NoSQL)
  42. 43. Easy to integrate with web applications : JavaScript, JSON
  43. 44. Scalability for large web applications : Incremental Replication, bi-directional conflict detection and management
  44. 45. Query-able and index-able
  45. 46. Offline by default </li></ul>
  46. 47. Who's using CouchDB ?
  47. 48. Relax
  48. 50. Ubuntu One Ubuntu : 10 million desktops worldwide
  49. 52. Lounge proxy-based partitioning/clustering framework
  50. 53. Mozilla Raindrop New messaging platform built on top of CouchDB
  51. 54. Thank you
  52. 55. Read more ... <ul><li>http://couchdb.org
  53. 56. http://planet.couchdb.org
  54. 57. http://horicky.blogspot.com/2008/10/couchdb-implementation.html
  55. 58. http://jan.prima.de
  56. 59. http://damienkatz.net/
  57. 60. http://jchrisa.net </li></ul>
  58. 61. Questions ?

×