• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Why couchdb is cool
 

Why couchdb is cool

on

  • 2,562 views

A short presentation (25') focused on why I think couchdb is cool, what he does really well and for what problems he should be used to solve

A short presentation (25') focused on why I think couchdb is cool, what he does really well and for what problems he should be used to solve

Statistics

Views

Total Views
2,562
Views on SlideShare
2,562
Embed Views
0

Actions

Likes
6
Downloads
56
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Why couchdb is cool Why couchdb is cool Presentation Transcript

    • Webtechcon Milano 10/11/2010
    • gabriele lana gabriele.lana@cleancode.it twitter: @gabrielelana
    • “i can’t tell you how i work in 25’ but i can tell you why i am cool”
    • what i am #1 document oriented database
    • key -> document name: “Gabriele” 1 job: “Programmer” born: “02/07/1977” company: “CleanCode” name: “Paolo” 2 job: “Manager” born: “17/12/1965” company: “BadCode” name: “Enzo” 3 job: “Plumber” born: “22/04/1982” company: “CleanPipe”
    • complex values name: “Gabriele” 1 job: “Programmer” born: [ 2, 7, 1977 ] company: “CleanCode”
    • map as filter function(document)
{ 



if
(document.job
===
"Programmer")
{ 







emit(document.id,
document) 



} } 1 ... 1 ... 2 ... 2 ... 3 ... 3 ...
    • map as filter function(document)
{ 



if
(document.job
===
"Programmer")
{ 







emit(document.id,
document) 



} } yep is javascript
    • map -> index function(document)
{ 



emit(document.born,
document) } 19970702 ... 19651217 ... 19820422 ...
    • range queries are fast function(document)
{ 



emit(document.born,
document) } 19970702 ... 19651217 ... 19820422 ...
    • map -> reduce -> index from: “Gabriele” 1 to: “Chiara” at: [2010,11,11,21,30] message: “...” How many messages sended from gabriele?
    • map -> reduce -> index function(document)
{ function(from,
messages)
{ 



emit(document.from,
1) 



sum(messages) } } “Gabriele” 10 “Chiara” 127 “Renato” 45
    • index with complex key function(document)
{ 



emit([
document.from
].concat(document.at)),
1) } [ “Gabriele”,2010,11,11,21,30 ] 1
    • reduce by group levels [ “Gabriele”,2010,11,11,21,30 ] 1 level 3 [ “Gabriele”,2010,11 ] 4 level 2 [ “Gabriele”,2010 ] 7 level 1 [ “Gabriele” ] 10
    • logarithmic update map/ reduce
    • logarithmic update map/ reduce
    • logarithmic update (real time queries) map/ reduce
    • crash only policy append only multiversion rev/0 rev/1 concurrency control
    • replication • master -> slave
    • replication • master -> slave • master -> slaves
    • replication • master -> slave • master -> slaves • master -> master
    • replication • master -> slave • master -> slaves • master -> master • PEEr -> peer
    • sharding
    • usage patterns oltp olap Relatively Often complex standardized and queries involving simple queries aggregations. Returning Periodic batch relatively few jobs refresh the records data
    • what i am #2 web server
    • web server http • crud on documents • documents attachments • long polling changes • proper caching • lots of libraries • firewall friendly
    • what i am #3 application server
    • application server
    • application server
    • application server • show document • list documents • authentication • url rewrite • good for small applications • good for back offices
    • i have good friends
    • books...
    • questions?
    • gabriele lana gabriele.lana@cleancode.it twitter: @gabrielelana