SlideShare ist ein Scribd-Unternehmen logo
1 von 73
Downloaden Sie, um offline zu lesen
Apache
CouchDB
Relax
Hello
•   J Chris Anderson
     •   Apache CouchDB committer
     •   Web programmer (Rails, Ajax, etc)
•   Director, couch.io
About You?
•   Web developers are easy
•   Scalable key/value store
•   Peer-based Replication
•   Append-only IO pattern
Scaling Up

  •   Hot. Literally.


  •   You don’t have to think.
X
Scaling Up

  •   Hot. Literally.


  •   You don’t have to think.
Scale Enforces Constraints
  •   Distributed key / value stores
      •   Context is expensive
  •   No joins or autoincrement
  •   Eventual consistency
e Web Scales
Why CouchDB?
Native to the Web
Scale from a cluster to a smartphone
Local data == low latency
Replicated applications - the p2p web
Of the Web
  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 19, 2007
                      http://jacobian.org/writing/of-the-web/
JSON
HTTP
Local
Robust
JSON Documents
{
    "_id": "BCCD12CBB",         Schema Free
    "_rev": "1-AB764C",

    "type": "person",
    "name": "Darth Vader",
                                Self-Contained
    "age": 63,
    "headware":
      ["Helmet", "Sombrero"],   JavaScript Map
}
    "dark_side": true
                                Reduce Views
Map Reduce Views
     Docs
{ “user” : “Chris”,
                                 Map
                                                           { “key” : “Alice”, “value” : 5 }
    “points” : 3 }                                          { “key” : “Bob”, “value” : 7 }
  { “user” : “Joe”,    function(doc) {                     { “key” : “Chris”, “value” : 3 }
   “points” : 10 }       if (doc.user && doc.points) {      { “key” : “Joe”, “value” : 10 }
{ “user” : “Alice”,         emit(doc.user, doc.points);    { “key” : “Mary”, “value” : 9 }
    “points” : 5 }       }
{ “user” : “Mary”,     }
    “points” : 9 }
 { “user” : “Bob”,             Reduce
    “points” : 7 }
                                                                Alice ... Chris: 15
                      function(keys, values, rereduce) {          Everyone: 34
                        return sum(values);
                      }
JavaScript Map Reduce
ful 

You already know the API

Use existing HTTP tools

Talk directly to the browser
ful 
                              CRUD
•   Create
    HTTP PUT /db/mydocid
•   Read
    HTTP GET /db/mydocid
•   Update
    HTTP PUT /db/mydocid
•   Delete
    HTTP DELETE /db/mydocid
Local Data
Low latency (fast)

Peer-based incremental replication

View source --> Open source
Gives Control to Users




    CC-BY-SA http://www.flickr.com/photos/kelleys/492253912/
Robust Storage

Append Only
File Structure

Designed to Crash

Instant-On
Happy IO Patterns
Bandwidth Explosion
“no bars”
http://www.flickr.com/photos/hercwad/2290378571/
http://www.flickr.com/photos/mcpig/872293700/
Latency Sucks
Scaling Down
   4 MB RAM
Erlang
Parallel

Fault tolerant

Addictive

Ninja Syntax      http://www.sics.se/~joe/apachevsyaws.html
Browser Couch
                       JavaScript port

                Uses HTML5 storage

            Replicates with CouchDB

http://hg.toolness.com/browser-couch/
No SQL
  in
HTML5
Incremental Replication
curl -X POST http://127.0.0.1:5984/_replicate -d
'{"source":"http://couch.example.com:5984/remote-db",
                 "target":"local-db"}'
curl -X POST http://127.0.0.1:5984/_replicate -d
'{"source":"http://couch.example.com:5984/remote-db",
                 "target":"local-db"}'
Document Oriented
                                   Not Relational
•   Documents in the Real World™
    •   Bills, letters, tax forms…
    •   Same type != same structure
    •   Self contained
    •   Can be out of date (so what?)
    •   No references
Document Oriented
                                   Not Relational
•   Documents in the Real World™
        Bills, letters, tax forms…
        Natural Data
    •


    •   Same type != same structure
    •
           Behaviour
        Can be out of date  (so what?)

    •   No references
Render JSON Docs as HTML
shows/post.js          /drl/_design/sofa/_show/post/Hello-World-For-Real-This-Time
Render Views as HTML
lists/index.js            /drl/_list/sofa/index/recent-posts?descending=true&limit=8
Resources
                  @CouchDB

           http://couchdb.apache.org/

  Dress like a Couch: http://shop.couchdb.com

           http://planet.couchdb.org/

https://peepcode.com/products/couchdb-with-rails
@couchdbinaction




http://books.couchdb.org/relax
couch.io
Berlin – London – Portland
anks!
CC-by-nd http://www.flic.kr/photos/eifelyeti110/273939759/

Weitere ähnliche Inhalte

Was ist angesagt?

Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
chriskite
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation Framework
MongoDB
 
Introduction to couch_db
Introduction to couch_dbIntroduction to couch_db
Introduction to couch_db
Romain Testard
 

Was ist angesagt? (19)

MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchApps
 
Indexing
IndexingIndexing
Indexing
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Mongo-Drupal
Mongo-DrupalMongo-Drupal
Mongo-Drupal
 
An introduction to CouchDB
An introduction to CouchDBAn introduction to CouchDB
An introduction to CouchDB
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
Back to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQLBack to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQL
 
Querying mongo db
Querying mongo dbQuerying mongo db
Querying mongo db
 
Mongo DB 102
Mongo DB 102Mongo DB 102
Mongo DB 102
 
Visualizing Web Data Query Results
Visualizing Web Data Query ResultsVisualizing Web Data Query Results
Visualizing Web Data Query Results
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source Database
 
MongoDB at GUL
MongoDB at GULMongoDB at GUL
MongoDB at GUL
 
The Aggregation Framework
The Aggregation FrameworkThe Aggregation Framework
The Aggregation Framework
 
2011 Mongo FR - MongoDB introduction
2011 Mongo FR - MongoDB introduction2011 Mongo FR - MongoDB introduction
2011 Mongo FR - MongoDB introduction
 
MongoDB: How it Works
MongoDB: How it WorksMongoDB: How it Works
MongoDB: How it Works
 
Introduction to couch_db
Introduction to couch_dbIntroduction to couch_db
Introduction to couch_db
 
JSOP in 60 seconds
JSOP in 60 secondsJSOP in 60 seconds
JSOP in 60 seconds
 

Ähnlich wie CouchDB Open Source Bridge

CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009
Jason Davies
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
BigBlueHat
 

Ähnlich wie CouchDB Open Source Bridge (20)

Couchdb Nosql
Couchdb NosqlCouchdb Nosql
Couchdb Nosql
 
CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009
 
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's PerspectiveTearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
Tearing the Sofa Apart: CouchDB and CouchApps from a Beginner's Perspective
 
Couchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problemCouchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problem
 
CouchDB introduction
CouchDB introductionCouchDB introduction
CouchDB introduction
 
Dealing with Azure Cosmos DB
Dealing with Azure Cosmos DBDealing with Azure Cosmos DB
Dealing with Azure Cosmos DB
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
AWS CloudFormation under the Hood (DMG303) | AWS re:Invent 2013
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
FOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDBFOXX - a Javascript application framework on top of ArangoDB
FOXX - a Javascript application framework on top of ArangoDB
 
CouchDB Google
CouchDB GoogleCouchDB Google
CouchDB Google
 
CouchDB - Local Web Platform
CouchDB - Local Web PlatformCouchDB - Local Web Platform
CouchDB - Local Web Platform
 
曾勇 Elastic search-intro
曾勇 Elastic search-intro曾勇 Elastic search-intro
曾勇 Elastic search-intro
 
Your Database Cannot Do this (well)
Your Database Cannot Do this (well)Your Database Cannot Do this (well)
Your Database Cannot Do this (well)
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 
Managing Social Content with MongoDB
Managing Social Content with MongoDBManaging Social Content with MongoDB
Managing Social Content with MongoDB
 
Vidoop CouchDB Talk
Vidoop CouchDB TalkVidoop CouchDB Talk
Vidoop CouchDB Talk
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
Not only SQL
Not only SQL Not only SQL
Not only SQL
 
Elastic search intro-@lamper
Elastic search intro-@lamperElastic search intro-@lamper
Elastic search intro-@lamper
 

Kürzlich hochgeladen

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Kürzlich hochgeladen (20)

TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 

CouchDB Open Source Bridge