SlideShare uma empresa Scribd logo
1 de 53
Baixar para ler offline
BDhcuoC
Who’s talking?

         Jan Lehnardt
         CouchDB Developer
         jan@apache.org


And you?
Who hasn't seen previous talk? Joe's Talk? Tim's?
Number Bragging
 Silly read-only benchmark with
 memory saturation
 2,500 req/s sustained on a
 2Ghz dual core Athlon
Number Bragging
 Silly read-only benchmark with
 memory saturation
 2,500 req/s sustained on a
 2Ghz dual core Athlon
 Using 9.8 MB RAM
Views
of Keys and Values
Views — Map Tags
              Keys     Values
             family      1
             friends     1
             friends     1
              work       1
              work       1
             youtube     1
               …         …
Views — Reduce Tag Count
 Keys     Values    Keys     Values
family      1
                   family      1
friends     1
friends     1      friends     2
 work       1       work       2
 work       1
                   youtube     1
youtube     1
  …         …        …         …
Views — Map Tags


function (doc) {
  for(var i in doc.tags)
    emit(doc.tags[i], 1);
}
Views — Reduce Tag Count
 Keys     Values    Keys     Values
family      1
                   family      1
friends     1
friends     1      friends     2
 work       1       work       2
 work       1
                   youtube     1
youtube     1
  …         …        …         …
Views — Reduce Tag Count

     function (key, values)
     {
       var sum = 0;
       for(var i in values)
         sum += values[i];
       return sum;
     }


Incremental, On-demand
reduce optional
View Examples – Docs by Date


function(doc) {
  emit(doc.date, doc.amount);
}


  [2007, 10, 12, 20, 13, 12]   3000
View Examples – Docs by Date
                 Map

           Key               Value

[2007, 10, 12, 20, 13, 12]   3000

[2007, 10, 26, 08, 37, 55]   4000

[2008, 02, 03, 10, 22, 34]   2000

[2008, 05, 01, 14, 16, 11]   6000
View Examples – Docs by Date


function(key, values) {
  return sum(values);
}
View Examples – Docs by Date
               Reduce

        Key             Value

        null            15000
View Examples – Docs by Date
    Reduce with group_level = 1

         Key                  Value

        [2007]                7000

        [2008]                8000
View Examples – Docs by Date
                  Reduce with group_level = 2

                              Key                                      Value

                      [2007, 10]                                       7000

                      [2008, 02]                                       2000

                      [2008, 05]                                       6000




Just the beginning, knock yourself out, averages, standard deviation, jchris twitter tag cloud
ranking.
Relation(ship)s
http://flickr.com/photos/fazen
Relation(ship)s
 JOINs please!
 What for?
 Get data that “belongs
 together”
Relation(ship)s — One Big Doc
{
    "type": "person",
    "name": "Darth Vader",
    "children":[
      {"name": "Luke"...},
      {"name": "Leia"...}
    ],
    "dark_side": true
}
Relation(ship)s — One Big Doc


           Pros: Easy – Cons: Bad with
           concurrent updates
           Use for: Low volume updates


e.g. user-supplied tags, postings
Relation(ship)s — Master-
Slave Docs
 Cons: A little more complex –
 Pros: Fast; good with
 concurrent updates; gives you
 tree operations
 Use for: Everything else
Relation(ship)s
function(doc) {
  if(doc.is_master) {
    emit([doc._id, doc.date], doc);
  } else {
    emit([doc.master_id, doc.date], doc);
  }
}
Relation(ship)s
                        ...              ...
  ["BAAC67", "2008-09-21"]        {"is_parent",true}
  ["BAAC67", "2008-09-22"]          {"...","..."}
  ["BAAC67", "2008-09-23"]          {"...","..."}
  ["BAAC67", "2008-09-24"]          {"...","..."}
  ["DBCA82", "2008-09-21"]        {"is_parent",true}
                        ...              ...

arbitrary trees, deeper nesting
Where is my auto_increment
 What is auto_increment?
 Unique identifier
 Sequence denominator
Where is my auto_increment?




what's it used for? identification, sequences / sorting
location prefixes, datacenters, digg, facebook
Where is my auto_increment?
        Documents have _ids




what's it used for? identification, sequences / sorting
location prefixes, datacenters, digg, facebook
Where is my auto_increment?
        Documents have _ids
         Sequences in distributed
         databases are…




what's it used for? identification, sequences / sorting
location prefixes, datacenters, digg, facebook
Where is my auto_increment?
        Documents have _ids
         Sequences in distributed
         databases are…
         …not


what's it used for? identification, sequences / sorting
location prefixes, datacenters, digg, facebook
Where is my auto_increment?
        Documents have _ids
         Sequences in distributed
         databases are…
         …not
         Use natural keys
what's it used for? identification, sequences / sorting
location prefixes, datacenters, digg, facebook
Transactions
 Run multiple operations at
 once
 They all succeed or none gets
 applied
Transactions
POST
{
  "docs": [
    {"_id": "0", "int": 0, "str": "0"},
    {"_id": "1", "int": 1, "str": "1"},
    {"_id": "2", "int": 2, "str": "2"}
  ]
}
Transactions — Watch out
 Statement transaction, not
 data transaction
 No roundtripping
 No multi-node transactions
 (It's a good thing)
Multi-Node Transactions
 Why? – Data redundancy
 Use an HTTP proxy
 Nice and easy to build on
 standard protocols
 Projects in development for
 consistent hashing & Paxos
Architectures
periodic, notifier system
P2P apps
Hot backup?



 POSIX compliant
Hot backup?



$ cp -r /var/lib/couchdb/* 
  /mnt/backup
Commercial Break
The Book

O'Reilly
http://books.couchdb.org/relax
Apache 2.0 Licensed
Summer 2009
The Book —Can’t wait?

 Help CouchDB
 Hire me for Consulting,
 Training, Development
 jan@apache.org
Resources
        Twitter: @CouchDB & http://couchdb.org/
        Dress like a Couch:
        http://shop.couchdb.com
        http://damienkatz.net/ & http://jan.prima.de/
        http://blog.racklabs.com/?p=74
        https://peepcode.com/products/couchdb-
        with-rails

not covered everything,
other talks + tutorials
Thank You
Really, thanks.
Got it?
Questions
Jan Lehnardt Couch Db In A Real World Setting

Mais conteúdo relacionado

Mais procurados

CodeIgniter Class Reference
CodeIgniter Class ReferenceCodeIgniter Class Reference
CodeIgniter Class ReferenceJamshid Hashimi
 
Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling rogerbodamer
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...MongoDB
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDBrogerbodamer
 
Back to Basics Webinar 3: Schema Design Thinking in Documents
 Back to Basics Webinar 3: Schema Design Thinking in Documents Back to Basics Webinar 3: Schema Design Thinking in Documents
Back to Basics Webinar 3: Schema Design Thinking in DocumentsMongoDB
 
Building a Social Network with MongoDB
  Building a Social Network with MongoDB  Building a Social Network with MongoDB
Building a Social Network with MongoDBFred Chu
 
Introduction To Core Data
Introduction To Core DataIntroduction To Core Data
Introduction To Core Datadanielctull
 
MongoDB World 2018: Using Change Streams to Keep Up with Your Data
MongoDB World 2018: Using Change Streams to Keep Up with Your DataMongoDB World 2018: Using Change Streams to Keep Up with Your Data
MongoDB World 2018: Using Change Streams to Keep Up with Your DataMongoDB
 
Montreal Sql saturday: moving data from no sql db to azure data lake
Montreal Sql saturday: moving data from no sql db to azure data lakeMontreal Sql saturday: moving data from no sql db to azure data lake
Montreal Sql saturday: moving data from no sql db to azure data lakeDiponkar Paul
 
Dealing with Azure Cosmos DB
Dealing with Azure Cosmos DBDealing with Azure Cosmos DB
Dealing with Azure Cosmos DBMihail Mateev
 
Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Javaantoinegirbal
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDBYnon Perek
 
The State of NoSQL
The State of NoSQLThe State of NoSQL
The State of NoSQLBen Scofield
 
Distributed DataFrame (DDF) Simplifying Big Data For The Rest Of Us
Distributed DataFrame (DDF) Simplifying Big Data  For The Rest Of UsDistributed DataFrame (DDF) Simplifying Big Data  For The Rest Of Us
Distributed DataFrame (DDF) Simplifying Big Data For The Rest Of UsArimo, Inc.
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know Norberto Leite
 
Webinar: Schema Design
Webinar: Schema DesignWebinar: Schema Design
Webinar: Schema DesignMongoDB
 
Java Development with MongoDB
Java Development with MongoDBJava Development with MongoDB
Java Development with MongoDBScott Hernandez
 

Mais procurados (20)

CodeIgniter Class Reference
CodeIgniter Class ReferenceCodeIgniter Class Reference
CodeIgniter Class Reference
 
Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDB
 
Back to Basics Webinar 3: Schema Design Thinking in Documents
 Back to Basics Webinar 3: Schema Design Thinking in Documents Back to Basics Webinar 3: Schema Design Thinking in Documents
Back to Basics Webinar 3: Schema Design Thinking in Documents
 
Building a Social Network with MongoDB
  Building a Social Network with MongoDB  Building a Social Network with MongoDB
Building a Social Network with MongoDB
 
Indexing
IndexingIndexing
Indexing
 
Introduction To Core Data
Introduction To Core DataIntroduction To Core Data
Introduction To Core Data
 
MongoDB World 2018: Using Change Streams to Keep Up with Your Data
MongoDB World 2018: Using Change Streams to Keep Up with Your DataMongoDB World 2018: Using Change Streams to Keep Up with Your Data
MongoDB World 2018: Using Change Streams to Keep Up with Your Data
 
Montreal Sql saturday: moving data from no sql db to azure data lake
Montreal Sql saturday: moving data from no sql db to azure data lakeMontreal Sql saturday: moving data from no sql db to azure data lake
Montreal Sql saturday: moving data from no sql db to azure data lake
 
Dealing with Azure Cosmos DB
Dealing with Azure Cosmos DBDealing with Azure Cosmos DB
Dealing with Azure Cosmos DB
 
Building a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and JavaBuilding a Scalable Inbox System with MongoDB and Java
Building a Scalable Inbox System with MongoDB and Java
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
 
The State of NoSQL
The State of NoSQLThe State of NoSQL
The State of NoSQL
 
Distributed DataFrame (DDF) Simplifying Big Data For The Rest Of Us
Distributed DataFrame (DDF) Simplifying Big Data  For The Rest Of UsDistributed DataFrame (DDF) Simplifying Big Data  For The Rest Of Us
Distributed DataFrame (DDF) Simplifying Big Data For The Rest Of Us
 
Database2
Database2Database2
Database2
 
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
 
Webinar: Schema Design
Webinar: Schema DesignWebinar: Schema Design
Webinar: Schema Design
 
Java Development with MongoDB
Java Development with MongoDBJava Development with MongoDB
Java Development with MongoDB
 
MySQL Rises with JSON Support
MySQL Rises with JSON SupportMySQL Rises with JSON Support
MySQL Rises with JSON Support
 

Destaque

Couch Db In 60 Minutes
Couch Db In 60 MinutesCouch Db In 60 Minutes
Couch Db In 60 MinutesGeorge Ang
 
HamidHamed-Twitter
HamidHamed-TwitterHamidHamed-Twitter
HamidHamed-Twitterrulyeta
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourPeter Friese
 
Aws, play! couch db scaling soa in the cloud
Aws, play! couch db  scaling soa in the cloudAws, play! couch db  scaling soa in the cloud
Aws, play! couch db scaling soa in the cloudChristophe Marchal
 
Laravel - back-end framework in persian language
Laravel - back-end framework in persian languageLaravel - back-end framework in persian language
Laravel - back-end framework in persian languageOmid Khosrojerdi
 
Couch db@nosql+taiwan
Couch db@nosql+taiwanCouch db@nosql+taiwan
Couch db@nosql+taiwanKenzou Yeh
 
Python-CouchDB Training at PyCon PL 2012
Python-CouchDB Training at PyCon PL 2012Python-CouchDB Training at PyCon PL 2012
Python-CouchDB Training at PyCon PL 2012Stefan Kögl
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 
اسلايد آموزشي هوش تجاري
اسلايد آموزشي هوش تجارياسلايد آموزشي هوش تجاري
اسلايد آموزشي هوش تجاريAli Masoombeigi
 

Destaque (19)

Couchdb
CouchdbCouchdb
Couchdb
 
Couch db and_the_web
Couch db and_the_webCouch db and_the_web
Couch db and_the_web
 
Couch db
Couch dbCouch db
Couch db
 
Couch Db In 60 Minutes
Couch Db In 60 MinutesCouch Db In 60 Minutes
Couch Db In 60 Minutes
 
HamidHamed-Twitter
HamidHamed-TwitterHamidHamed-Twitter
HamidHamed-Twitter
 
No sql Database
No sql DatabaseNo sql Database
No sql Database
 
Meet Couch DB
Meet Couch DBMeet Couch DB
Meet Couch DB
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
 
Aws, play! couch db scaling soa in the cloud
Aws, play! couch db  scaling soa in the cloudAws, play! couch db  scaling soa in the cloud
Aws, play! couch db scaling soa in the cloud
 
Laravel - back-end framework in persian language
Laravel - back-end framework in persian languageLaravel - back-end framework in persian language
Laravel - back-end framework in persian language
 
Couch db@nosql+taiwan
Couch db@nosql+taiwanCouch db@nosql+taiwan
Couch db@nosql+taiwan
 
Python-CouchDB Training at PyCon PL 2012
Python-CouchDB Training at PyCon PL 2012Python-CouchDB Training at PyCon PL 2012
Python-CouchDB Training at PyCon PL 2012
 
Couch db skillsmatter-prognosql
Couch db skillsmatter-prognosqlCouch db skillsmatter-prognosql
Couch db skillsmatter-prognosql
 
MongoDB
MongoDBMongoDB
MongoDB
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
اسلايد آموزشي هوش تجاري
اسلايد آموزشي هوش تجارياسلايد آموزشي هوش تجاري
اسلايد آموزشي هوش تجاري
 
Intro To Couch Db
Intro To Couch DbIntro To Couch Db
Intro To Couch Db
 
Couch db
Couch dbCouch db
Couch db
 
معماری جاری نرم افزار های شرکت
معماری جاری نرم افزار های شرکتمعماری جاری نرم افزار های شرکت
معماری جاری نرم افزار های شرکت
 

Semelhante a Jan Lehnardt Couch Db In A Real World Setting

2012 mongo db_bangalore_roadmap_new
2012 mongo db_bangalore_roadmap_new2012 mongo db_bangalore_roadmap_new
2012 mongo db_bangalore_roadmap_newMongoDB
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB RoadmapMongoDB
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB RoadmapMongoDB
 
AMD - Why, What and How
AMD - Why, What and HowAMD - Why, What and How
AMD - Why, What and HowMike Wilcox
 
When Relational Isn't Enough: Neo4j at Squidoo
When Relational Isn't Enough: Neo4j at SquidooWhen Relational Isn't Enough: Neo4j at Squidoo
When Relational Isn't Enough: Neo4j at SquidooGil Hildebrand
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB RoadmapMongoDB
 
Unlock user behavior with 87 Million events using Hudi, StarRocks & MinIO
Unlock user behavior with 87 Million events using Hudi, StarRocks & MinIOUnlock user behavior with 87 Million events using Hudi, StarRocks & MinIO
Unlock user behavior with 87 Million events using Hudi, StarRocks & MinIOnadine39280
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB RoadmapMongoDB
 
Scaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter ExperienceScaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter ExperienceDataWorks Summit
 
New Developments in Spark
New Developments in SparkNew Developments in Spark
New Developments in SparkDatabricks
 
Stream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/joinStream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/joinAlex Miller
 
MongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & AnalyticsMongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & AnalyticsServer Density
 
Your Database Cannot Do this (well)
Your Database Cannot Do this (well)Your Database Cannot Do this (well)
Your Database Cannot Do this (well)javier ramirez
 
GOTO 2011 preso: 3x Hadoop
GOTO 2011 preso: 3x HadoopGOTO 2011 preso: 3x Hadoop
GOTO 2011 preso: 3x Hadoopfvanvollenhoven
 
PHP Development With MongoDB
PHP Development With MongoDBPHP Development With MongoDB
PHP Development With MongoDBFitz Agard
 

Semelhante a Jan Lehnardt Couch Db In A Real World Setting (20)

CouchDB
CouchDBCouchDB
CouchDB
 
2012 mongo db_bangalore_roadmap_new
2012 mongo db_bangalore_roadmap_new2012 mongo db_bangalore_roadmap_new
2012 mongo db_bangalore_roadmap_new
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB Roadmap
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB Roadmap
 
AMD - Why, What and How
AMD - Why, What and HowAMD - Why, What and How
AMD - Why, What and How
 
When Relational Isn't Enough: Neo4j at Squidoo
When Relational Isn't Enough: Neo4j at SquidooWhen Relational Isn't Enough: Neo4j at Squidoo
When Relational Isn't Enough: Neo4j at Squidoo
 
Hadoop
HadoopHadoop
Hadoop
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB Roadmap
 
Unlock user behavior with 87 Million events using Hudi, StarRocks & MinIO
Unlock user behavior with 87 Million events using Hudi, StarRocks & MinIOUnlock user behavior with 87 Million events using Hudi, StarRocks & MinIO
Unlock user behavior with 87 Million events using Hudi, StarRocks & MinIO
 
MongoDB Roadmap
MongoDB RoadmapMongoDB Roadmap
MongoDB Roadmap
 
Scaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter ExperienceScaling Big Data Mining Infrastructure Twitter Experience
Scaling Big Data Mining Infrastructure Twitter Experience
 
New Developments in Spark
New Developments in SparkNew Developments in Spark
New Developments in Spark
 
Stream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/joinStream Execution with Clojure and Fork/join
Stream Execution with Clojure and Fork/join
 
MongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & AnalyticsMongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & Analytics
 
Evolution of Spark APIs
Evolution of Spark APIsEvolution of Spark APIs
Evolution of Spark APIs
 
Green dao
Green daoGreen dao
Green dao
 
Latinoware
LatinowareLatinoware
Latinoware
 
Your Database Cannot Do this (well)
Your Database Cannot Do this (well)Your Database Cannot Do this (well)
Your Database Cannot Do this (well)
 
GOTO 2011 preso: 3x Hadoop
GOTO 2011 preso: 3x HadoopGOTO 2011 preso: 3x Hadoop
GOTO 2011 preso: 3x Hadoop
 
PHP Development With MongoDB
PHP Development With MongoDBPHP Development With MongoDB
PHP Development With MongoDB
 

Mais de George Ang

Wrapper induction construct wrappers automatically to extract information f...
Wrapper induction   construct wrappers automatically to extract information f...Wrapper induction   construct wrappers automatically to extract information f...
Wrapper induction construct wrappers automatically to extract information f...George Ang
 
Opinion mining and summarization
Opinion mining and summarizationOpinion mining and summarization
Opinion mining and summarizationGeorge Ang
 
Huffman coding
Huffman codingHuffman coding
Huffman codingGeorge Ang
 
Do not crawl in the dust 
different ur ls similar text
Do not crawl in the dust 
different ur ls similar textDo not crawl in the dust 
different ur ls similar text
Do not crawl in the dust 
different ur ls similar textGeorge Ang
 
大规模数据处理的那些事儿
大规模数据处理的那些事儿大规模数据处理的那些事儿
大规模数据处理的那些事儿George Ang
 
腾讯大讲堂02 休闲游戏发展的文化趋势
腾讯大讲堂02 休闲游戏发展的文化趋势腾讯大讲堂02 休闲游戏发展的文化趋势
腾讯大讲堂02 休闲游戏发展的文化趋势George Ang
 
腾讯大讲堂03 qq邮箱成长历程
腾讯大讲堂03 qq邮箱成长历程腾讯大讲堂03 qq邮箱成长历程
腾讯大讲堂03 qq邮箱成长历程George Ang
 
腾讯大讲堂04 im qq
腾讯大讲堂04 im qq腾讯大讲堂04 im qq
腾讯大讲堂04 im qqGeorge Ang
 
腾讯大讲堂05 面向对象应对之道
腾讯大讲堂05 面向对象应对之道腾讯大讲堂05 面向对象应对之道
腾讯大讲堂05 面向对象应对之道George Ang
 
腾讯大讲堂06 qq邮箱性能优化
腾讯大讲堂06 qq邮箱性能优化腾讯大讲堂06 qq邮箱性能优化
腾讯大讲堂06 qq邮箱性能优化George Ang
 
腾讯大讲堂07 qq空间
腾讯大讲堂07 qq空间腾讯大讲堂07 qq空间
腾讯大讲堂07 qq空间George Ang
 
腾讯大讲堂08 可扩展web架构探讨
腾讯大讲堂08 可扩展web架构探讨腾讯大讲堂08 可扩展web架构探讨
腾讯大讲堂08 可扩展web架构探讨George Ang
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站George Ang
 
腾讯大讲堂01 移动qq产品发展历程
腾讯大讲堂01 移动qq产品发展历程腾讯大讲堂01 移动qq产品发展历程
腾讯大讲堂01 移动qq产品发展历程George Ang
 
腾讯大讲堂10 customer engagement
腾讯大讲堂10 customer engagement腾讯大讲堂10 customer engagement
腾讯大讲堂10 customer engagementGeorge Ang
 
腾讯大讲堂11 拍拍ce工作经验分享
腾讯大讲堂11 拍拍ce工作经验分享腾讯大讲堂11 拍拍ce工作经验分享
腾讯大讲堂11 拍拍ce工作经验分享George Ang
 
腾讯大讲堂14 qq直播(qq live) 介绍
腾讯大讲堂14 qq直播(qq live) 介绍腾讯大讲堂14 qq直播(qq live) 介绍
腾讯大讲堂14 qq直播(qq live) 介绍George Ang
 
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍George Ang
 
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍George Ang
 
腾讯大讲堂16 产品经理工作心得分享
腾讯大讲堂16 产品经理工作心得分享腾讯大讲堂16 产品经理工作心得分享
腾讯大讲堂16 产品经理工作心得分享George Ang
 

Mais de George Ang (20)

Wrapper induction construct wrappers automatically to extract information f...
Wrapper induction   construct wrappers automatically to extract information f...Wrapper induction   construct wrappers automatically to extract information f...
Wrapper induction construct wrappers automatically to extract information f...
 
Opinion mining and summarization
Opinion mining and summarizationOpinion mining and summarization
Opinion mining and summarization
 
Huffman coding
Huffman codingHuffman coding
Huffman coding
 
Do not crawl in the dust 
different ur ls similar text
Do not crawl in the dust 
different ur ls similar textDo not crawl in the dust 
different ur ls similar text
Do not crawl in the dust 
different ur ls similar text
 
大规模数据处理的那些事儿
大规模数据处理的那些事儿大规模数据处理的那些事儿
大规模数据处理的那些事儿
 
腾讯大讲堂02 休闲游戏发展的文化趋势
腾讯大讲堂02 休闲游戏发展的文化趋势腾讯大讲堂02 休闲游戏发展的文化趋势
腾讯大讲堂02 休闲游戏发展的文化趋势
 
腾讯大讲堂03 qq邮箱成长历程
腾讯大讲堂03 qq邮箱成长历程腾讯大讲堂03 qq邮箱成长历程
腾讯大讲堂03 qq邮箱成长历程
 
腾讯大讲堂04 im qq
腾讯大讲堂04 im qq腾讯大讲堂04 im qq
腾讯大讲堂04 im qq
 
腾讯大讲堂05 面向对象应对之道
腾讯大讲堂05 面向对象应对之道腾讯大讲堂05 面向对象应对之道
腾讯大讲堂05 面向对象应对之道
 
腾讯大讲堂06 qq邮箱性能优化
腾讯大讲堂06 qq邮箱性能优化腾讯大讲堂06 qq邮箱性能优化
腾讯大讲堂06 qq邮箱性能优化
 
腾讯大讲堂07 qq空间
腾讯大讲堂07 qq空间腾讯大讲堂07 qq空间
腾讯大讲堂07 qq空间
 
腾讯大讲堂08 可扩展web架构探讨
腾讯大讲堂08 可扩展web架构探讨腾讯大讲堂08 可扩展web架构探讨
腾讯大讲堂08 可扩展web架构探讨
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
 
腾讯大讲堂01 移动qq产品发展历程
腾讯大讲堂01 移动qq产品发展历程腾讯大讲堂01 移动qq产品发展历程
腾讯大讲堂01 移动qq产品发展历程
 
腾讯大讲堂10 customer engagement
腾讯大讲堂10 customer engagement腾讯大讲堂10 customer engagement
腾讯大讲堂10 customer engagement
 
腾讯大讲堂11 拍拍ce工作经验分享
腾讯大讲堂11 拍拍ce工作经验分享腾讯大讲堂11 拍拍ce工作经验分享
腾讯大讲堂11 拍拍ce工作经验分享
 
腾讯大讲堂14 qq直播(qq live) 介绍
腾讯大讲堂14 qq直播(qq live) 介绍腾讯大讲堂14 qq直播(qq live) 介绍
腾讯大讲堂14 qq直播(qq live) 介绍
 
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
 
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
腾讯大讲堂15 市场研究及数据分析理念及方法概要介绍
 
腾讯大讲堂16 产品经理工作心得分享
腾讯大讲堂16 产品经理工作心得分享腾讯大讲堂16 产品经理工作心得分享
腾讯大讲堂16 产品经理工作心得分享
 

Último

📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call GirlsNitya salvi
 
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment BookingRanikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment BookingNitya salvi
 
(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...
(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...
(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...rahim quresi
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...rahim quresi
 
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...priyasharma62062
 
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...Nitya salvi
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...HyderabadDolls
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser... Shivani Pandey
 
Kolkata Call Girls Service ❤️ at @30% discount Everyday
Kolkata Call Girls Service ❤️ at @30% discount EverydayKolkata Call Girls Service ❤️ at @30% discount Everyday
Kolkata Call Girls Service ❤️ at @30% discount Everydayonly4webmaster01
 
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls AgencyHire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls AgencyNitya salvi
 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe... Shivani Pandey
 
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...ritikasharma
 
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyNitya salvi
 
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.Nitya salvi
 
VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...
VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...
VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...SUHANI PANDEY
 
Verified Trusted Call Girls Egmore Chennai ✔✔7427069034 Independent Chennai ...
Verified Trusted Call Girls Egmore Chennai ✔✔7427069034  Independent Chennai ...Verified Trusted Call Girls Egmore Chennai ✔✔7427069034  Independent Chennai ...
Verified Trusted Call Girls Egmore Chennai ✔✔7427069034 Independent Chennai ... Shivani Pandey
 
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...rahim quresi
 
Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...
Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...
Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...hotbabesbook
 
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...mriyagarg453
 

Último (20)

📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls📞 Contact Number 8617370543VIP Rajsamand Call Girls
📞 Contact Number 8617370543VIP Rajsamand Call Girls
 
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment BookingRanikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
Ranikhet call girls 📞 8617697112 At Low Cost Cash Payment Booking
 
(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...
(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...
(Verified Models) Airport Kolkata Escorts Service (+916297143586) Escort agen...
 
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
𓀤Call On 6297143586 𓀤 Sonagachi Call Girls In All Kolkata 24/7 Provide Call W...
 
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
Navi Mumbai Call Girls -📞9833754194-Call Girls Number Vashi-Nerul Call Girls ...
 
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
VIP ( Goa Call Girls ) Margao Beach👉 8617370543 Escort Service Enjoy Your Dre...
 
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Warangal Escorts ☎️7427069034  🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Warangal Escorts ☎️7427069034 🔝 💃 Enjoy 24/7 Escort Service En...
 
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
Model Call Girls In Pazhavanthangal WhatsApp Booking 7427069034 call girl ser...
 
Kolkata Call Girls Service ❤️ at @30% discount Everyday
Kolkata Call Girls Service ❤️ at @30% discount EverydayKolkata Call Girls Service ❤️ at @30% discount Everyday
Kolkata Call Girls Service ❤️ at @30% discount Everyday
 
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls AgencyHire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
Hire 💕 8617697112 Pauri Garhwal Call Girls Service Call Girls Agency
 
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Manjri Call Me 7737669865 Budget Friendly No Advance Booking
 
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034  Independe...
Verified Trusted Call Girls Singaperumal Koil Chennai ✔✔7427069034 Independe...
 
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
Dum Dum ( Call Girls ) Kolkata ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Ready...
 
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls AgencyHire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
Hire 💕 8617697112 North Sikkim Call Girls Service Call Girls Agency
 
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
❤Personal Whatsapp Number Mukteshwar Call Girls 8617697112 💦✅.
 
VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...
VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...
VIP Model Call Girls Vijayawada ( Pune ) Call ON 8005736733 Starting From 5K ...
 
Verified Trusted Call Girls Egmore Chennai ✔✔7427069034 Independent Chennai ...
Verified Trusted Call Girls Egmore Chennai ✔✔7427069034  Independent Chennai ...Verified Trusted Call Girls Egmore Chennai ✔✔7427069034  Independent Chennai ...
Verified Trusted Call Girls Egmore Chennai ✔✔7427069034 Independent Chennai ...
 
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
𓀤Call On 6297143586 𓀤 Park Street Call Girls In All Kolkata 24/7 Provide Call...
 
Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...
Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...
Thane West \ Escort Service in Mumbai - 450+ Call Girl Cash Payment 983332523...
 
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
Navsari Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girl...
 

Jan Lehnardt Couch Db In A Real World Setting

  • 2. Who’s talking? Jan Lehnardt CouchDB Developer jan@apache.org And you? Who hasn't seen previous talk? Joe's Talk? Tim's?
  • 3. Number Bragging Silly read-only benchmark with memory saturation 2,500 req/s sustained on a 2Ghz dual core Athlon
  • 4. Number Bragging Silly read-only benchmark with memory saturation 2,500 req/s sustained on a 2Ghz dual core Athlon Using 9.8 MB RAM
  • 6. Views — Map Tags Keys Values family 1 friends 1 friends 1 work 1 work 1 youtube 1 … …
  • 7. Views — Reduce Tag Count Keys Values Keys Values family 1 family 1 friends 1 friends 1 friends 2 work 1 work 2 work 1 youtube 1 youtube 1 … … … …
  • 8. Views — Map Tags function (doc) { for(var i in doc.tags) emit(doc.tags[i], 1); }
  • 9. Views — Reduce Tag Count Keys Values Keys Values family 1 family 1 friends 1 friends 1 friends 2 work 1 work 2 work 1 youtube 1 youtube 1 … … … …
  • 10. Views — Reduce Tag Count function (key, values) { var sum = 0; for(var i in values) sum += values[i]; return sum; } Incremental, On-demand reduce optional
  • 11. View Examples – Docs by Date function(doc) { emit(doc.date, doc.amount); } [2007, 10, 12, 20, 13, 12] 3000
  • 12. View Examples – Docs by Date Map Key Value [2007, 10, 12, 20, 13, 12] 3000 [2007, 10, 26, 08, 37, 55] 4000 [2008, 02, 03, 10, 22, 34] 2000 [2008, 05, 01, 14, 16, 11] 6000
  • 13. View Examples – Docs by Date function(key, values) { return sum(values); }
  • 14. View Examples – Docs by Date Reduce Key Value null 15000
  • 15. View Examples – Docs by Date Reduce with group_level = 1 Key Value [2007] 7000 [2008] 8000
  • 16. View Examples – Docs by Date Reduce with group_level = 2 Key Value [2007, 10] 7000 [2008, 02] 2000 [2008, 05] 6000 Just the beginning, knock yourself out, averages, standard deviation, jchris twitter tag cloud ranking.
  • 18. Relation(ship)s JOINs please! What for? Get data that “belongs together”
  • 19. Relation(ship)s — One Big Doc { "type": "person", "name": "Darth Vader", "children":[ {"name": "Luke"...}, {"name": "Leia"...} ], "dark_side": true }
  • 20. Relation(ship)s — One Big Doc Pros: Easy – Cons: Bad with concurrent updates Use for: Low volume updates e.g. user-supplied tags, postings
  • 21. Relation(ship)s — Master- Slave Docs Cons: A little more complex – Pros: Fast; good with concurrent updates; gives you tree operations Use for: Everything else
  • 22. Relation(ship)s function(doc) { if(doc.is_master) { emit([doc._id, doc.date], doc); } else { emit([doc.master_id, doc.date], doc); } }
  • 23. Relation(ship)s ... ... ["BAAC67", "2008-09-21"] {"is_parent",true} ["BAAC67", "2008-09-22"] {"...","..."} ["BAAC67", "2008-09-23"] {"...","..."} ["BAAC67", "2008-09-24"] {"...","..."} ["DBCA82", "2008-09-21"] {"is_parent",true} ... ... arbitrary trees, deeper nesting
  • 24. Where is my auto_increment What is auto_increment? Unique identifier Sequence denominator
  • 25. Where is my auto_increment? what's it used for? identification, sequences / sorting location prefixes, datacenters, digg, facebook
  • 26. Where is my auto_increment? Documents have _ids what's it used for? identification, sequences / sorting location prefixes, datacenters, digg, facebook
  • 27. Where is my auto_increment? Documents have _ids Sequences in distributed databases are… what's it used for? identification, sequences / sorting location prefixes, datacenters, digg, facebook
  • 28. Where is my auto_increment? Documents have _ids Sequences in distributed databases are… …not what's it used for? identification, sequences / sorting location prefixes, datacenters, digg, facebook
  • 29. Where is my auto_increment? Documents have _ids Sequences in distributed databases are… …not Use natural keys what's it used for? identification, sequences / sorting location prefixes, datacenters, digg, facebook
  • 30. Transactions Run multiple operations at once They all succeed or none gets applied
  • 31. Transactions POST { "docs": [ {"_id": "0", "int": 0, "str": "0"}, {"_id": "1", "int": 1, "str": "1"}, {"_id": "2", "int": 2, "str": "2"} ] }
  • 32. Transactions — Watch out Statement transaction, not data transaction No roundtripping No multi-node transactions (It's a good thing)
  • 33. Multi-Node Transactions Why? – Data redundancy Use an HTTP proxy Nice and easy to build on standard protocols Projects in development for consistent hashing & Paxos
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 43.
  • 45. Hot backup? POSIX compliant
  • 46. Hot backup? $ cp -r /var/lib/couchdb/* /mnt/backup
  • 49. The Book —Can’t wait? Help CouchDB Hire me for Consulting, Training, Development jan@apache.org
  • 50. Resources Twitter: @CouchDB & http://couchdb.org/ Dress like a Couch: http://shop.couchdb.com http://damienkatz.net/ & http://jan.prima.de/ http://blog.racklabs.com/?p=74 https://peepcode.com/products/couchdb- with-rails not covered everything, other talks + tutorials