0
Introducing CouchDB
    Tuesday November 11, 2009
        Hatem Ben Yacoub
Who am I ?
●   Hatem Ben Yacoub
●   IT Consultant
●   Senior Systems Architect
●   PHP Expert
●   e-Government Specialist
...
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
Distributed Databases              (Redis, MongoDB,
 (...
CouchDB is NOT
●   A relational database.
●   A replacement for relational databases.
●   An object-oriented database.
CouchDB is
●   OpenSource Database
●   RESTful API
●   Schema-less document store (document in JSON
    format)
●   Multi-...
Let's give it a try


Ubuntu 9.10 already uses couchdb
  (all POSIX systems supported)


   Install the database server :
...
Test installation
CouchDB port 5984
CouchDB Management interface
         (Futon)
Create database test
Firebug
Creating a document with jQuery




// server respond with JSON also :
// {"ok":true,
"id":"323409622afb6477e7108684785256...
How to request this document ?




// response is also in JSON :
// {"_id":"323409622afb6477e7108684785256b8",
"_rev":"1-3...
What about updating ?




// notice in the response we have revision changed to 2
// {"ok":true,
"id":"323409622afb6477e71...
What about creating a view ?




// Server respond with {"ok":true,
"id":"_design/render",
"rev":"1-f95a9b997f1081043fda1a...
Easy ?!
Why CouchDB
●   Easy to use data storage (NoSQL)
●   Easy to integrate with web applications :
    JavaScript, JSON
●   Sc...
Who's using CouchDB ?
Relax
Ubuntu One
Ubuntu : 10 million desktops worldwide
Lounge
proxy-based partitioning/clustering framework
Mozilla Raindrop
New messaging platform built on top of CouchDB
Thank you
Read more ...
●   http://couchdb.org
●   http://planet.couchdb.org
●   http://horicky.blogspot.com/2008/10/couchdb-imple
●...
Questions ?
Intro Couchdb
Intro Couchdb
Intro Couchdb
Upcoming SlideShare
Loading in...5
×

Intro Couchdb

2,210

Published on

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,210
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
42
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Intro Couchdb"

  1. 1. Introducing CouchDB Tuesday November 11, 2009 Hatem Ben Yacoub
  2. 2. Who am I ? ● Hatem Ben Yacoub ● IT Consultant ● Senior Systems Architect ● PHP Expert ● e-Government Specialist ● Energy Engineer ● Open Source Evangelist ● http://phpmagazine.net ● hatem@php.net / @hatem / http://hatem.tel
  3. 3. How to build faster, bigger, reliable websites...
  4. 4. Scalability
  5. 5. Scalability ~== Database optimization
  6. 6. RDBMS … old fashion
  7. 7. … new fashion ??
  8. 8. NoSQL “Not Only SQL”
  9. 9. Scaling writes & Scaling reads
  10. 10. NoSQL Non-Distributed databases Distributed Databases (Redis, MongoDB, (Cassandra, Hbase, CouchDB, Neo4j, Riak, Scalaris...) Tokyo cabinet ...)
  11. 11. CouchDB is NOT ● A relational database. ● A replacement for relational databases. ● An object-oriented database.
  12. 12. CouchDB is ● 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
  13. 13. 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
  14. 14. Test installation
  15. 15. CouchDB port 5984
  16. 16. CouchDB Management interface (Futon)
  17. 17. Create database test
  18. 18. Firebug
  19. 19. Creating a document with jQuery // server respond with JSON also : // {"ok":true, "id":"323409622afb6477e7108684785256b8", "rev":"1-3182c819b0f98858c54ad920d6c44498"} // including the document id and revision, and a confirmation variable ok=true
  20. 20. How to request this document ? // response is also in JSON : // {"_id":"323409622afb6477e7108684785256b8", "_rev":"1-3182c819b0f98858c54ad920d6c44498", "Name":"Makkah", "Zip":21955}
  21. 21. What about updating ? // notice in the response we have revision changed to 2 // {"ok":true, "id":"323409622afb6477e7108684785256b8", "rev":"2-03779debc847f783493a69e61bd98560"}
  22. 22. What about creating a view ? // Server respond with {"ok":true, "id":"_design/render", "rev":"1-f95a9b997f1081043fda1a34be76c47e" } http://127.0.0.1:5984/test/_design/render/_show/code/480f17c996bcbd174ac64b976de47f79
  23. 23. Easy ?!
  24. 24. Why CouchDB ● Easy to use data storage (NoSQL) ● Easy to integrate with web applications : JavaScript, JSON ● Scalability for large web applications : Incremental Replication, bi-directional conflict detection and management ● Query-able and index-able ● Offline by default
  25. 25. Who's using CouchDB ?
  26. 26. Relax
  27. 27. Ubuntu One Ubuntu : 10 million desktops worldwide
  28. 28. Lounge proxy-based partitioning/clustering framework
  29. 29. Mozilla Raindrop New messaging platform built on top of CouchDB
  30. 30. Thank you
  31. 31. Read more ... ● http://couchdb.org ● http://planet.couchdb.org ● http://horicky.blogspot.com/2008/10/couchdb-imple ● http://jan.prima.de ● http://damienkatz.net/ ● http://jchrisa.net
  32. 32. Questions ?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×