SlideShare a Scribd company logo
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

More Related Content

What's hot

CodeIgniter Class Reference
CodeIgniter Class ReferenceCodeIgniter Class Reference
CodeIgniter Class Reference
Jamshid 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 MongoDB
rogerbodamer
 
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
MongoDB
 
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 Data
danielctull
 
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
MongoDB
 
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
Diponkar Paul
 
Dealing with Azure Cosmos DB
Dealing with Azure Cosmos DBDealing with Azure Cosmos DB
Dealing with Azure Cosmos DB
Mihail 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 Java
antoinegirbal
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
Ynon Perek
 
The State of NoSQL
The State of NoSQLThe State of NoSQL
The State of NoSQL
Ben 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.
 
Database2
Database2Database2
Database2
Claudio Guidi
 
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 Design
MongoDB
 
Java Development with MongoDB
Java Development with MongoDBJava Development with MongoDB
Java Development with MongoDBScott Hernandez
 
MySQL Rises with JSON Support
MySQL Rises with JSON SupportMySQL Rises with JSON Support
MySQL Rises with JSON Support
Okcan Yasin Saygılı
 

What's hot (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
 

Viewers also liked

Couchdb
CouchdbCouchdb
Couchdb
Brian Smith
 
Couch db
Couch dbCouch db
Couch db
arunamore
 
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-Twitter
rulyeta
 
No sql Database
No sql DatabaseNo sql Database
No sql Database
mymail2ashok
 
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
Peter 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 cloud
Christophe 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
 
Intro To Couch Db
Intro To Couch DbIntro To Couch Db
Intro To Couch Db
Shahar Evron
 
Couch db
Couch dbCouch db
معماری جاری نرم افزار های شرکت
معماری جاری نرم افزار های شرکتمعماری جاری نرم افزار های شرکت
معماری جاری نرم افزار های شرکت
عباس بني اسدي مقدم
 

Viewers also liked (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
 
معماری جاری نرم افزار های شرکت
معماری جاری نرم افزار های شرکتمعماری جاری نرم افزار های شرکت
معماری جاری نرم افزار های شرکت
 

Similar to 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 How
Mike 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 Squidoo
Gil Hildebrand
 
Hadoop
HadoopHadoop
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 & MinIO
nadine39280
 
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 Experience
DataWorks Summit
 
New Developments in Spark
New Developments in SparkNew Developments in Spark
New Developments in Spark
Databricks
 
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
Alex Miller
 
MongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & AnalyticsMongoDB: Optimising for Performance, Scale & Analytics
MongoDB: Optimising for Performance, Scale & Analytics
Server Density
 
Evolution of Spark APIs
Evolution of Spark APIsEvolution of Spark APIs
Evolution of Spark APIs
Máté Szalay-Bekő
 
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 Hadoop
fvanvollenhoven
 
PHP Development With MongoDB
PHP Development With MongoDBPHP Development With MongoDB
PHP Development With MongoDBFitz Agard
 

Similar to 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
 

More from 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
 

More from 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 产品经理工作心得分享
 

Recently uploaded

Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog EternalMeet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
Blog Eternal
 
Christina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptxChristina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptx
madeline604788
 
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to StardomYoung Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
greendigital
 
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles onlineTreasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Hidden Treasure Hunts
 
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
Rodney Thomas Jr
 
Skeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on ForumSkeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on Forum
Isaac More
 
Tom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive AnalysisTom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive Analysis
greendigital
 
The Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy DirectorThe Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy Director
Mark Murphy Director
 
This Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I MadeThis Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I Made
Aarush Ghate
 
240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf
Madhura TBRC
 
Scandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.zaScandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.za
Isaac More
 
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdfCreate a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Genny Knight
 
Reimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a SuccessReimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a Success
Mark Murphy Director
 
Panchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdfPanchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdf
Suleman Rana
 
A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024
Indira Srivatsa
 
I Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledgeI Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledge
Sabrina Ricci
 
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and LoveMeet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
get joys
 
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdfMaximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Xtreame HDTV
 
Hollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest galleryHollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest gallery
Zsolt Nemeth
 

Recently uploaded (19)

Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog EternalMeet Crazyjamjam - A TikTok Sensation | Blog Eternal
Meet Crazyjamjam - A TikTok Sensation | Blog Eternal
 
Christina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptxChristina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptx
 
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to StardomYoung Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
 
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles onlineTreasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
 
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
From Slave to Scourge: The Existential Choice of Django Unchained. The Philos...
 
Skeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on ForumSkeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on Forum
 
Tom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive AnalysisTom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive Analysis
 
The Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy DirectorThe Evolution of Animation in Film - Mark Murphy Director
The Evolution of Animation in Film - Mark Murphy Director
 
This Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I MadeThis Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I Made
 
240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf
 
Scandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.zaScandal! Teasers June 2024 on etv Forum.co.za
Scandal! Teasers June 2024 on etv Forum.co.za
 
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdfCreate a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
Create a Seamless Viewing Experience with Your Own Custom OTT Player.pdf
 
Reimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a SuccessReimagining Classics - What Makes a Remake a Success
Reimagining Classics - What Makes a Remake a Success
 
Panchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdfPanchayat Season 3 - Official Trailer.pdf
Panchayat Season 3 - Official Trailer.pdf
 
A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024
 
I Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledgeI Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledge
 
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and LoveMeet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
 
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdfMaximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
Maximizing Your Streaming Experience with XCIPTV- Tips for 2024.pdf
 
Hollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest galleryHollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest gallery
 

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