SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Apache
                           CouchDB
Monday, November 2, 2009

how couchdb treats the disks
append only btree
Replication
                           JSON
 Map Reduce
                           HTTP
Monday, November 2, 2009

intro:
offline apps
simple development
easy to deploy
Stuart Langridge - Canonical




      !                                       !


Monday, November 2, 2009

15 million desktops by the end of the year.
solve the data island problem
Monday, November 2, 2009

raindrop - next gen messaging platform
name: your own personal piece of the cloud
Monday, November 2, 2009
Monday, November 2, 2009

Couchapps
-- easiest way to deploy an Ajax application that needs to store data.
-- capable of scaling up with CouchDB. (etags etc)
“Ground Computing”
                                                                          @jhuggins




                                                     http://www.flickr.com/photos/mcpig/872293700/
Monday, November 2, 2009

app runs near the user. lower latency, lower cost.
Monday, November 2, 2009
Offline by Default




                                               http://www.flickr.com/photos/shane-h/280084650
Monday, November 2, 2009

reliable
telephone poles / like akamai but for dynamic database backed applications.
 - same application on the client and server or the cloud
http://apod.nasa.gov/apod/ap050930.html




                                  “Of the Web”



                            http://jacobian.org/writing/of-the-web/



Monday, November 2, 2009
Let me tell you something: Django may be built for the Web, but CouchDB is built of the Web. I've never seen software that so
completely embraces the philosophies behind HTTP. ... this is what the software of the future looks like. Jacob Kaplan-Moss --
October, 2007

perfect spot - discovered not invented

When you can move data via replication, it

 changes the physics of the web

so data is useful independent of location.
Lockless
                           Storage
Monday, November 2, 2009

html5 story

   js

   ruby

   
   transactions?

-- getting CouchDB right involves going all the way to core lockless storage engine.

performance, map reduce, and deployment
B-Tree

Monday, November 2, 2009

data structure
sorted by keys
minimize disk seeks
Monday, November 2, 2009

logical btree
Monday, November 2, 2009

indexes - efficient
key lookups
range scans
Append

                                Only
Monday, November 2, 2009

robust / reliable
never touch bytes that are on disk
can’t be inconsistent
Monday, November 2, 2009

append only - in action
update J to a new value (rewrite j’s leaf node)
Monday, November 2, 2009

rewrite the path along the tree to J
up the parent path until we write the root.
Monday, November 2, 2009

all pointers point backwards into the file
Monday, November 2, 2009

update cost?

only has O(log n) cost where n is the # of keys
Monday, November 2, 2009

another update - add 5.

rewrite path to Z node to add 5
Monday, November 2, 2009

time follows the blue arrow.
top half is actually an accumulation of updates like the bottom.
note: batch efficiency -- save block updates
Monday, November 2, 2009

2 day test run
couchdb over long haul
4 writers, 16 readers, random access, small keyspace - lots of 409s etc.
Incremental

                           Reduce
Monday, November 2, 2009

takes advantage of the write pattern we’ve seen
setup main storage doc count example
Monday, November 2, 2009

rereduce = false
count # of keys in the block
Monday, November 2, 2009

rereduce = true
sum # of docs in child nodes
flexible range querying
Monday, November 2, 2009

intermediate reductions stored during a view calculation
updating J doesn’t change any counts, adding the 5 key does
Monday, November 2, 2009

we are rewriting the parent nodes anyway, so it makes sense to run the reduce calculation
Concurrent
               Access
Monday, November 2, 2009

readers see a consistent view
we can support many readers
reads don’t block writes
writes don’t block reads
Monday, November 2, 2009

concurrent readers
list all docs, then a write comes in, you don’t want to be surprised by an extra doc
readers can be as long lived as they want without blocking writers or seeing inconsistencies
Local Web
                    Platform
Monday, November 2, 2009

user interviews
http://www.longnow.org/projects/clock/orrery/
Monday, November 2, 2009

append-only
no fixup phase
reliable and concurrent
sequential write pattern (few writer seeks)
hot backups
compaction

Weitere ähnliche Inhalte

Ähnlich wie Btree Nosql Oak

Apache Hadoop Talk at QCon
Apache Hadoop Talk at QConApache Hadoop Talk at QCon
Apache Hadoop Talk at QConCloudera, Inc.
 
How OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
How OpenNTF Open Source Solutions Can Save You Time, Money And Your HairHow OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
How OpenNTF Open Source Solutions Can Save You Time, Money And Your HairBruce Elgort
 
Game Changing Dependency Management
Game Changing Dependency ManagementGame Changing Dependency Management
Game Changing Dependency ManagementJeremy Kendall
 
The State of the Social Desktop 2009
The State of the Social Desktop 2009The State of the Social Desktop 2009
The State of the Social Desktop 2009Frank Karlitschek
 
Caching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practicesCaching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practicesLars Jankowfsky
 
Fast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browserFast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browserAndreas Bovens
 
Macruby - RubyConf Presentation 2010
Macruby - RubyConf Presentation 2010Macruby - RubyConf Presentation 2010
Macruby - RubyConf Presentation 2010Matt Aimonetti
 
Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013
Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013
Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013Amazon Web Services
 
2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 20092009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009Caue Guerra
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009John Woodell
 
Building A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionBuilding A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionPhil Cryer
 
The Open-PC - OpenSourceExpo 2009
The Open-PC - OpenSourceExpo 2009The Open-PC - OpenSourceExpo 2009
The Open-PC - OpenSourceExpo 2009Frank Karlitschek
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookThe Hive
 
Functional Java Script - Webtechcon 2009
Functional Java Script - Webtechcon 2009Functional Java Script - Webtechcon 2009
Functional Java Script - Webtechcon 2009wolframkriesing
 

Ähnlich wie Btree Nosql Oak (20)

Performance Strategies
Performance StrategiesPerformance Strategies
Performance Strategies
 
Go Course Day1
Go Course Day1Go Course Day1
Go Course Day1
 
Apache Hadoop Talk at QCon
Apache Hadoop Talk at QConApache Hadoop Talk at QCon
Apache Hadoop Talk at QCon
 
How OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
How OpenNTF Open Source Solutions Can Save You Time, Money And Your HairHow OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
How OpenNTF Open Source Solutions Can Save You Time, Money And Your Hair
 
Docker
DockerDocker
Docker
 
Game Changing Dependency Management
Game Changing Dependency ManagementGame Changing Dependency Management
Game Changing Dependency Management
 
The State of the Social Desktop 2009
The State of the Social Desktop 2009The State of the Social Desktop 2009
The State of the Social Desktop 2009
 
Caching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practicesCaching, sharding, distributing - Scaling best practices
Caching, sharding, distributing - Scaling best practices
 
Fast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browserFast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browser
 
Macruby - RubyConf Presentation 2010
Macruby - RubyConf Presentation 2010Macruby - RubyConf Presentation 2010
Macruby - RubyConf Presentation 2010
 
Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013
Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013
Bringing Your Applications to the Fast Lane (CPN203) | AWS re:Invent 2013
 
2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 20092009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
2009, o ano do Ruby on Rails no Brasil - CaelumDay 2009
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009
 
Building A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage SolutionBuilding A Scalable Open Source Storage Solution
Building A Scalable Open Source Storage Solution
 
Everyday - mongodb
Everyday - mongodbEveryday - mongodb
Everyday - mongodb
 
The Open-PC - OpenSourceExpo 2009
The Open-PC - OpenSourceExpo 2009The Open-PC - OpenSourceExpo 2009
The Open-PC - OpenSourceExpo 2009
 
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of FacebookTech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
Tech Talk: RocksDB Slides by Dhruba Borthakur & Haobo Xu of Facebook
 
Functional Java Script - Webtechcon 2009
Functional Java Script - Webtechcon 2009Functional Java Script - Webtechcon 2009
Functional Java Script - Webtechcon 2009
 
JRubyConf 2009
JRubyConf 2009JRubyConf 2009
JRubyConf 2009
 
Cloudera Desktop
Cloudera DesktopCloudera Desktop
Cloudera Desktop
 

Mehr von Chris Anderson

CouchDB - Local Web Platform
CouchDB - Local Web PlatformCouchDB - Local Web Platform
CouchDB - Local Web PlatformChris Anderson
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source BridgeChris Anderson
 
CouchDB to the Edge ApacheCon EU
CouchDB to the  Edge ApacheCon EUCouchDB to the  Edge ApacheCon EU
CouchDB to the Edge ApacheCon EUChris Anderson
 
CouchDB Talk JChris NYC
CouchDB Talk JChris NYCCouchDB Talk JChris NYC
CouchDB Talk JChris NYCChris Anderson
 

Mehr von Chris Anderson (6)

CouchDB - Local Web Platform
CouchDB - Local Web PlatformCouchDB - Local Web Platform
CouchDB - Local Web Platform
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source Bridge
 
CouchDB To The Edge
CouchDB To The EdgeCouchDB To The Edge
CouchDB To The Edge
 
CouchDB to the Edge ApacheCon EU
CouchDB to the  Edge ApacheCon EUCouchDB to the  Edge ApacheCon EU
CouchDB to the Edge ApacheCon EU
 
Vidoop CouchDB Talk
Vidoop CouchDB TalkVidoop CouchDB Talk
Vidoop CouchDB Talk
 
CouchDB Talk JChris NYC
CouchDB Talk JChris NYCCouchDB Talk JChris NYC
CouchDB Talk JChris NYC
 

Kürzlich hochgeladen

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 

Kürzlich hochgeladen (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

Btree Nosql Oak

  • 1. Apache CouchDB Monday, November 2, 2009 how couchdb treats the disks append only btree
  • 2. Replication JSON Map Reduce HTTP Monday, November 2, 2009 intro: offline apps simple development easy to deploy
  • 3. Stuart Langridge - Canonical ! ! Monday, November 2, 2009 15 million desktops by the end of the year. solve the data island problem
  • 4. Monday, November 2, 2009 raindrop - next gen messaging platform name: your own personal piece of the cloud
  • 6. Monday, November 2, 2009 Couchapps -- easiest way to deploy an Ajax application that needs to store data. -- capable of scaling up with CouchDB. (etags etc)
  • 7. “Ground Computing” @jhuggins http://www.flickr.com/photos/mcpig/872293700/ Monday, November 2, 2009 app runs near the user. lower latency, lower cost.
  • 9. Offline by Default http://www.flickr.com/photos/shane-h/280084650 Monday, November 2, 2009 reliable telephone poles / like akamai but for dynamic database backed applications. - same application on the client and server or the cloud
  • 10. http://apod.nasa.gov/apod/ap050930.html “Of the Web” http://jacobian.org/writing/of-the-web/ Monday, November 2, 2009 Let me tell you something: Django may be built for the Web, but CouchDB is built of the Web. I've never seen software that so completely embraces the philosophies behind HTTP. ... this is what the software of the future looks like. Jacob Kaplan-Moss -- October, 2007 perfect spot - discovered not invented When you can move data via replication, it changes the physics of the web so data is useful independent of location.
  • 11. Lockless Storage Monday, November 2, 2009 html5 story js ruby transactions? -- getting CouchDB right involves going all the way to core lockless storage engine. performance, map reduce, and deployment
  • 12. B-Tree Monday, November 2, 2009 data structure sorted by keys minimize disk seeks
  • 13. Monday, November 2, 2009 logical btree
  • 14. Monday, November 2, 2009 indexes - efficient key lookups range scans
  • 15. Append Only Monday, November 2, 2009 robust / reliable never touch bytes that are on disk can’t be inconsistent
  • 16. Monday, November 2, 2009 append only - in action update J to a new value (rewrite j’s leaf node)
  • 17. Monday, November 2, 2009 rewrite the path along the tree to J up the parent path until we write the root.
  • 18. Monday, November 2, 2009 all pointers point backwards into the file
  • 19. Monday, November 2, 2009 update cost? only has O(log n) cost where n is the # of keys
  • 20. Monday, November 2, 2009 another update - add 5. rewrite path to Z node to add 5
  • 21. Monday, November 2, 2009 time follows the blue arrow. top half is actually an accumulation of updates like the bottom. note: batch efficiency -- save block updates
  • 22. Monday, November 2, 2009 2 day test run couchdb over long haul 4 writers, 16 readers, random access, small keyspace - lots of 409s etc.
  • 23. Incremental Reduce Monday, November 2, 2009 takes advantage of the write pattern we’ve seen setup main storage doc count example
  • 24. Monday, November 2, 2009 rereduce = false count # of keys in the block
  • 25. Monday, November 2, 2009 rereduce = true sum # of docs in child nodes flexible range querying
  • 26. Monday, November 2, 2009 intermediate reductions stored during a view calculation updating J doesn’t change any counts, adding the 5 key does
  • 27. Monday, November 2, 2009 we are rewriting the parent nodes anyway, so it makes sense to run the reduce calculation
  • 28. Concurrent Access Monday, November 2, 2009 readers see a consistent view we can support many readers reads don’t block writes writes don’t block reads
  • 29. Monday, November 2, 2009 concurrent readers list all docs, then a write comes in, you don’t want to be surprised by an extra doc readers can be as long lived as they want without blocking writers or seeing inconsistencies
  • 30. Local Web Platform Monday, November 2, 2009 user interviews
  • 31. http://www.longnow.org/projects/clock/orrery/ Monday, November 2, 2009 append-only no fixup phase reliable and concurrent sequential write pattern (few writer seeks) hot backups compaction