SlideShare a Scribd company logo
1 of 103
Download to read offline
CouchDB: JSON,
HTTP & MapReduce
   Bradley Holt (http://bradley-holt.com/)
@BradleyHolt (http://twitter.com/BradleyHolt)
About Me
Co-Founder and
Technical Director
from Vermont
Organizer   BTV
Contributor
Author




         http://oreilly.com/catalog/9781449303129/   http://oreilly.com/catalog/9781449303433/
CouchDB Basics
Cluster Of Unreliable
Commodity Hardware
Document-oriented, schema-less

Shared nothing, horizontally scalable

Runs on the Erlang OTP platform

Peer-based, bi-directional replication

RESTful HTTP API

Queries are done against MapReduce “views”, or indexes
When You Might
Consider CouchDB
You’ve found yourself denormalizing your SQL database for better
performance.

Your domain model is a “ t” for documents (e.g. a CMS).

Your application is read-heavy.

You need a high level of concurrency and can give up consistency
in exchange.

You need horizontal scalability.

You want your database to be able to run anywhere, even on
mobile devices, and even when disconnected from the cluster.
Trade-Offs
No ad hoc queries. You need to know what you’re going to want to
query ahead of time. For example, SQL would be a better t for
business intelligence reporting.

No concept of “joins”. You can relate data, but watch out for
consistency issues.

Transactions are limited to document boundaries.

CouchDB trades storage space for performance.
Other Alternatives to SQL
MongoDB
http://www.mongodb.org/

Redis
http://redis.io/

Cassandra
http://cassandra.apache.org/

Riak
http://www.basho.com/

HBase (a database for Hadoop)
http://hbase.apache.org/
Don’t be so quick to get rid of SQL!
There are many problems for which an
SQL database is a good t. SQL is very
powerful and exible query language.
JSON Documents
{"title":"CouchDB: The De nitive Guide"}
JSON (JavaScript Object Notation) is a
human-readable and lightweight data
interchange format.

Data structures from many
programming languages can be
easily converted to and from JSON.
JSON Values
A JSON object is a collection of key/value pairs.

JSON values can be strings, numbers, booleans (false or true),
arrays (e.g. ["a", "b", "c"]), null, or another JSON object.
A “Book” JSON Object
{
    "_id":"978-0-596-15589-6",
    "title":"CouchDB: The De nitive Guide",
    "subtitle":"Time to Relax",
    "authors":[
       "J. Chris Anderson",
       "Jan Lehnardt",
       "Noah Slater"
    ],
    "publisher":"O'Reilly Media",
    "released":"2010-01-19",
    "pages":272
}
RESTful HTTP API
curl -iX PUT http://localhost:5984/mydb
Representational State Transfer (REST)
is a software architecture style that
describes distributed hypermedia
systems such as the World Wide Web.
HTTP is distributed,
scalable, and cacheable.
Everyone speaks HTTP.
Create a Database
$ curl -iX PUT http://localhost:5984/mydb

HTTP/1.1 201 Created
Location: http://localhost:5984/mydb
{"ok":true}
Create a Document
$ curl -iX POST http://localhost:5984/mydb
-H "Content-Type: application/json"
-d '{"_id":"42621b2516001626"}'

HTTP/1.1 201 Created
Location: http://localhost:5984/mydb/42621b2516001626

{
    "ok":true,
    "id":"42621b2516001626",
    "rev":"1-967a00dff5e02add41819138abb3284d"
}
Read a Document
$ curl -iX GET http://localhost:5984/mydb/42621b2516001626

HTTP/1.1 200 OK
Etag: "1-967a00dff5e02add41819138abb3284d"

{
    "_id":"42621b2516001626",
    "_rev":"1-967a00dff5e02add41819138abb3284d"
}
When updating a document, CouchDB
requires the correct document revision
number as part of its Multi-Version
Concurrency Control (MVCC). This form
of optimistic concurrency ensures that
another client hasn't modi ed the
document since it was last retrieved.
Update a Document
$ curl -iX PUT http://localhost:5984/mydb/42621b2516001626
-H "Content-Type: application/json"
-d '{
   "_id":"42621b2516001626",
   "_rev":"1-967a00dff5e02add41819138abb3284d",
   "title":"CouchDB: The De nitive Guide"
}'

HTTP/1.1 201 Created

{
    "ok":true,
    "id":"42621b2516001626",
    "rev":"2-bbd27429fd1a0daa2b946cbacb22dc3e"
}
Conditional GET
$ curl -iX GET http://localhost:5984/mydb/42621b2516001626
-H 'If-None-Match: "2-bbd27429fd1a0daa2b946cbacb22dc3e"'

HTTP/1.1 304 Not Modified
Etag: "2-bbd27429fd1a0daa2b946cbacb22dc3e"
Content-Length: 0
Delete a Document
$ curl -iX DELETE http://localhost:5984/mydb/42621b2516001626
-H 'If-Match: "2-bbd27429fd1a0daa2b946cbacb22dc3e"'

HTTP/1.1 200 OK

{
    "ok":true,
    "id":"42621b2516001626",
    "rev":"3-29d2ef6e0d3558a3547a92dac51f3231"
}
Read a Deleted Document
$ curl -iX GET http://localhost:5984/mydb/42621b2516001626

HTTP/1.1 404 Object Not Found
{
    "error":"not_found",
    "reason":"deleted"
}
Read a Deleted Document
$ curl -iX GET http://localhost:5984/mydb/42621b2516001626
?rev=3-29d2ef6e0d3558a3547a92dac51f3231

HTTP/1.1 200 OK
Etag: "3-29d2ef6e0d3558a3547a92dac51f3231"
{
    "_id":"42621b2516001626",
    "_rev":"3-29d2ef6e0d3558a3547a92dac51f3231",
    "_deleted":true
}
Fetch Revisions
$ curl -iX GET http://localhost:5984/mydb/42621b2516001626
?rev=3-29d2ef6e0d3558a3547a92dac51f3231&revs=true

HTTP/1.1 200 OK
{
    // …
    "_revisions":{
      "start":3,
      "ids":[
        "29d2ef6e0d3558a3547a92dac51f3231",
        "bbd27429fd1a0daa2b946cbacb22dc3e",
        "967a00dff5e02add41819138abb3284d"
      ]
    }
}
Do not rely on older revisions.
Revisions are used for concurrency
control and for replication. Old
revisions are removed during database
compaction.
MapReduce Views
function(doc) { if (doc.title) { emit(doc.title); } }
MapReduce consists of Map and
Reduce steps which can be distributed
in a way that takes advantage of the
multiple processor cores found in
modern hardware.
Futon
Create a Database
Map and Reduce are written as
JavaScript functions that are de ned
within views. Temporary views can be
used during development but should
be saved permanently to design
documents for production. Temporary
views can be very slow.
Map
Add the First Document
{
    "_id":"978-0-596-15589-6",
    "title":"CouchDB: The De nitive Guide",
    "subtitle":"Time to Relax",
    "authors":[
       "J. Chris Anderson",
       "Jan Lehnardt",
       "Noah Slater"
    ],
    "publisher":"O'Reilly Media",
    "released":"2010-01-19",
    "pages":272
}
One-To-One Mapping
Map Book Titles
function(doc) { // JSON object representing a doc to be mapped
  if (doc.title) { // make sure this doc has a title
     emit(doc.title); // emit the doc’s title as the key
  }
}
The emit function accepts two
arguments. The rst is a key and the
second a value. Both are optional and
default to null.
“Titles” Temporary View
“Titles” Temporary View

      key                  id            value
 "CouchDB: The
                   "978-0-596-15589-6"   null
Definitive Guide"
Add a Second Document
{
    "_id":"978-0-596-52926-0",
    "title":"RESTful Web Services",
    "subtitle":"Web services for the real world",
    "authors":[
       "Leonard Richardson",
       "Sam Ruby"
    ],
    "publisher":"O'Reilly Media",
    "released":"2007-05-08",
    "pages":448
}
“Titles” Temporary View
“Titles” Temporary View

      key                  id            value
 "CouchDB: The
                   "978-0-596-15589-6"   null
Definitive Guide"

 "RESTful Web
                   "978-0-596-52926-0"   null
   Services"
One-To-Many Mapping
Add a “formats” Field to
Both Documents
{
    // …
    "formats":[
      "Print",
      "Ebook",
      "Safari Books Online"
    ]
}
Add a Third Document
{
    "_id":"978-1-565-92580-9",
    "title":"DocBook: The De nitive Guide",
    "authors":[
       "Norman Walsh",
       "Leonard Muellner"
    ],
    "publisher":"O'Reilly Media",
    "formats":[
       "Print"
    ],
    "released":"1999-10-28",
    "pages":648
}
Map Book Formats
function(doc) { // JSON object representing a doc to be mapped
  if (doc.formats) { // make sure this doc has a formats eld
     for (var i in doc.formats) {
       emit(doc.formats[i]); // emit each format as the key
     }
  }
}
“Formats” Temporary View
        key                   id            value
      "Ebook"        "978-0-596-15589-6"    null
      "Ebook"        "978-0-596-52926-0"    null
      "Print"        "978-0-596-15589-6"    null
      "Print"        "978-0-596-52926-0"    null
      "Print"        "978-1-565-92580-9"    null
"Safari Books Online" "978-0-596-15589-6"   null
"Safari Books Online" "978-0-596-52926-0"   null
When querying a view, the “key” and
“id” elds can be used to select a row or
range of rows. Optionally, rows can be
grouped by “key” elds or by levels of
“key” elds.
Map Book Authors
function(doc) { // JSON object representing a doc to be mapped
  if (doc.authors) { // make sure this doc has an authors eld
     for (var i in doc.authors) {
       emit(doc.authors[i]); // emit each author as the key
     }
  }
}
“Authors” Temporary View
        key                    id            value
 "J. Chris Anderson"   "978-0-596-15589-6"   null
   "Jan Lehnardt"      "978-0-596-15589-6"   null
 "Leonard Muellner"    "978-1-565-92580-9"   null
"Leonard Richardson" "978-0-596-52926-0"     null
   "Noah Slater"       "978-0-596-15589-6"   null
  "Norman Walsh"       "978-1-565-92580-9"   null
    "Sam Ruby"         "978-0-596-52926-0"   null
Reduce
Built-in Reduce Functions
   Function                        Output

_count        Returns the number of mapped values in the set


_sum          Returns the sum of the set of mapped values

              Returns numerical statistics of the mapped values in
_stats
              the set including the sum, count, min, and max
Count
Format Count, Not Grouped
Format Count, Not Grouped


    key           value
    null           7
Format Count, Grouped
Format Count, Grouped

         key             value
       "Ebook"            2
        "Print"           3
 "Safari Books Online"    2
Sum
Sum of Pages by Format
Sum of Pages by Format

         key             value
       "Ebook"           720
        "Print"          1368
 "Safari Books Online"   720
Stats

sum, count, minimum, maximum,
sum over all square roots
Stats of Pages by Format
Stats of Pages by Format
        key                          value
                        {"sum":720,"count":2,"min":272,
      "Ebook"
                          "max":448,"sumsqr":274688}

                        {"sum":1368,"count":3,"min":272,
       "Print"
                          "max":648,"sumsqr":694592}

                        {"sum":720,"count":2,"min":272,
"Safari Books Online"
                          "max":448,"sumsqr":274688}
Custom Reduce Functions
The built-in Reduce functions should
serve your needs most, if not all, of the
time. If you nd yourself writing a
custom Reduce function, then take a
step back and make sure that one of
the built-in Reduce functions won't
serve your needs better.
Reduce Function Skeleton
function(keys, values, rereduce) {
}
Parameters
Keys: An array of mapped key and document IDs in the form of
[key,id] where id is the document ID.

Values: An array of mapped values.

Rereduce: Whether or not the Reduce function is being called
recursively on its own output.
Count Equivalent
function(keys, values, rereduce) {
  if (rereduce) {
     return sum(values);
  } else {
     return values.length;
  }
}
Sum Equivalent
function(keys, values, rereduce) {
  return sum(values);
}
MapReduce Limitations
Full-text indexing and ad hoc searching
  • couchdb-lucene
     https://github.com/rnewson/couchdb-lucene
  • ElasticSearch and CouchDB
   https://github.com/elasticsearch/elasticsearch/wiki/Couchdb-integration

Geospatial indexing and search (two dimensional)
  • GeoCouch
    https://github.com/vmx/couchdb
  • Geohash (e.g. dr5rusx1qkvvr)
    http://geohash.org/
Querying Views
You can query for all rows, a single
contiguous range of rows, or even rows
matching a speci ed key.
Add a Fourth Document
{
    "_id":"978-0-596-80579-1",
    "title":"Building iPhone Apps with HTML, CSS, and JavaScript",
    "subtitle":"Making App Store Apps Without Objective-C or Cocoa",
    "authors":[
       "Jonathan Stark"
    ],
    "publisher":"O'Reilly Media",
    "formats":[
       "Print",
       "Ebook",
       "Safari Books Online"
    ],
    "released":"2010-01-08",
    "pages":192
}
Map Book Releases
function(doc) {
  if (doc.released) {
     emit(doc.released.split("-"), doc.pages);
  }
}
Save the “Releases” View
“Releases”, Exact Grouping
“Releases”, Exact Grouping
       key                        value
                     {"sum":648,"count":1,"min":648,
["1999","10","28"]
                       "max":648,"sumsqr":419904}

                     {"sum":448,"count":1,"min":448,
["2007","05","08"]
                       "max":448,"sumsqr":200704}

                     {"sum":192,"count":1,"min":192,
["2010","01","08"]
                       "max":192,"sumsqr":36864}

                     {"sum":272,"count":1,"min":272,
["2010","01","19"]
                       "max":272,"sumsqr":73984}
“Releases”, Level 1 Grouping
“Releases”, Level 1 Grouping
    key                   value
             {"sum":648,"count":1,"min":648,
  ["1999"]
               "max":648,"sumsqr":419904}

             {"sum":448,"count":1,"min":448,
  ["2007"]
               "max":448,"sumsqr":200704}

             {"sum":464,"count":2,"min":192,
  ["2010"]
               "max":272,"sumsqr":110848}
“Releases”, Level 2 Grouping
“Releases”, Level 2 Grouping
     key                      value
                 {"sum":648,"count":1,"min":648,
 ["1999","10"]
                   "max":648,"sumsqr":419904}

                 {"sum":448,"count":1,"min":448,
 ["2007","05"]
                   "max":448,"sumsqr":200704}

                 {"sum":464,"count":2,"min":192,
 ["2010","01"]
                   "max":272,"sumsqr":110848}
PHP Libraries for CouchDB
PHPCouch
http://www.phpcouch.org/

PHPillow
http://arbitracker.org/phpillow.html

PHP CouchDB Extension (PECL)
http://www.topdog.za.net/php_couchdb_extension

Doctrine2 ODM
Do-It-Yourself
Zend_Http_Client + Zend_Cache

PEAR’s HTTP_Client

PHP cURL

JSON maps nicely to and from PHP arrays using Zend_Json or
PHP’s json_ functions
Scaling
Load Balancing
Send POST, PUT, and DELETE requests to a write-only master node

Setup continuous replication from the master node to multiple
read-only nodes

Load balance GET, HEAD, and OPTIONS requests amongst
read-only nodes
  • Apache HTTP Server (mod_proxy)
  • nginx
  • HAProxy
  • Varnish
  • Squid
Clustering
(Partitioning/Sharding)
Lounge
http://tilgovi.github.com/couchdb-lounge/
  • Proxy, partitioning, and sharding
BigCouch
https://github.com/cloudant/bigcouch
  • Clusters modeled after Amazon’s Dynamo approach
Pillow
https://github.com/khellan/Pillow
   • “…a combined router and rereducer for CouchDB.”
What else?
Authentication
Basic Authentication

Cookie Authentication

OAuth
Authorization
Server Admin

Database Reader

Document Update Validation
http://wiki.apache.org/couchdb/Document_Update_Validation
Hypermedia Controls
Show Functions

List Functions

See:
http://wiki.apache.org/couchdb/Formatting_with_Show_and_List
Replication
Peer-based & bi-directional

Documents and modi ed elds are incrementally replicated.

All data will be eventually consistent.

Con icts are agged and can be handled by application logic.

Partial replicas can be created via JavaScript lter functions.
Hosting
CouchOne (now CouchBase)
http://www.couchone.com/

Cloudant
https://cloudant.com/
Distributing
CouchApp
http://couchapp.org/
  • Applications built using JavaScript, HTML5, CSS and CouchDB
Mobile
 • Android
   http://www.couchone.com/android
CouchDB Resources
CouchDB: The De nitive Guide     CouchDB Wiki
by J. Chris Anderson, Jan        http://wiki.apache.org/couchdb/
Lehnardt, and Noah Slater
(O’Reilly)                       Beginning CouchDB
978-0-596-15589-6                by Joe Lennon (Apress)
                                 978-1-430-27237-3
Writing and Querying MapReduce
Views in CouchDB
by Bradley Holt (O’Reilly)
978-1-449-30312-9

Scaling CouchDB
by Bradley Holt (O’Reilly)
063-6-920-01840-7
Questions?
Thank You
                Bradley Holt (http://bradley-holt.com/)
             @BradleyHolt (http://twitter.com/BradleyHolt)




Copyright © 2011 Bradley Holt. All rights reserved.

More Related Content

What's hot

OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQLLuca Garulli
 
Practical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo DbPractical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo DbAlex Sharp
 
JSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataGregg Kellogg
 
Socialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social GraphSocialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social GraphMongoDB
 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDBNorberto Leite
 
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...MongoDB
 
Webinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaWebinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaMongoDB
 
Modeling Data in MongoDB
Modeling Data in MongoDBModeling Data in MongoDB
Modeling Data in MongoDBlehresman
 
MongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMike Friedman
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
 
Socialite, the Open Source Status Feed Part 3: Scaling the Data Feed
Socialite, the Open Source Status Feed Part 3: Scaling the Data FeedSocialite, the Open Source Status Feed Part 3: Scaling the Data Feed
Socialite, the Open Source Status Feed Part 3: Scaling the Data FeedMongoDB
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)Uwe Printz
 
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentosConceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentosMongoDB
 
CouchDB : More Couch
CouchDB : More CouchCouchDB : More Couch
CouchDB : More Couchdelagoya
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema DesignMongoDB
 
Socialite, the Open Source Status Feed
Socialite, the Open Source Status FeedSocialite, the Open Source Status Feed
Socialite, the Open Source Status FeedMongoDB
 

What's hot (20)

Mongo db operations_v2
Mongo db operations_v2Mongo db operations_v2
Mongo db operations_v2
 
MongoDB and hadoop
MongoDB and hadoopMongoDB and hadoop
MongoDB and hadoop
 
OrientDB introduction - NoSQL
OrientDB introduction - NoSQLOrientDB introduction - NoSQL
OrientDB introduction - NoSQL
 
Practical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo DbPractical Ruby Projects With Mongo Db
Practical Ruby Projects With Mongo Db
 
JSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked Data
 
Socialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social GraphSocialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social Graph
 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDB
 
JSON-LD and MongoDB
JSON-LD and MongoDBJSON-LD and MongoDB
JSON-LD and MongoDB
 
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
 
Webinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaWebinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and Java
 
Modeling Data in MongoDB
Modeling Data in MongoDBModeling Data in MongoDB
Modeling Data in MongoDB
 
MongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World ExamplesMongoDB Schema Design: Four Real-World Examples
MongoDB Schema Design: Four Real-World Examples
 
Mongo db queries
Mongo db queriesMongo db queries
Mongo db queries
 
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'tsThe Fine Art of Schema Design in MongoDB: Dos and Don'ts
The Fine Art of Schema Design in MongoDB: Dos and Don'ts
 
Socialite, the Open Source Status Feed Part 3: Scaling the Data Feed
Socialite, the Open Source Status Feed Part 3: Scaling the Data FeedSocialite, the Open Source Status Feed Part 3: Scaling the Data Feed
Socialite, the Open Source Status Feed Part 3: Scaling the Data Feed
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
 
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentosConceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
 
CouchDB : More Couch
CouchDB : More CouchCouchDB : More Couch
CouchDB : More Couch
 
MongoDB Schema Design
MongoDB Schema DesignMongoDB Schema Design
MongoDB Schema Design
 
Socialite, the Open Source Status Feed
Socialite, the Open Source Status FeedSocialite, the Open Source Status Feed
Socialite, the Open Source Status Feed
 

Viewers also liked

XVII Certamen Jóvenes Creadores 2014
XVII Certamen Jóvenes Creadores 2014XVII Certamen Jóvenes Creadores 2014
XVII Certamen Jóvenes Creadores 2014EspacioJovenAvila
 
LWUIT: Uma alternativa para interface gráfica em dispositivos móveis
LWUIT: Uma alternativa para interface gráfica em dispositivos móveisLWUIT: Uma alternativa para interface gráfica em dispositivos móveis
LWUIT: Uma alternativa para interface gráfica em dispositivos móveisDaniel De Macedo
 
Trabajo grupal.
Trabajo grupal.Trabajo grupal.
Trabajo grupal.9521
 
31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...
31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...
31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...AXA SEGUROS ESPAÑA
 
Manual do teclado Fenix FK620B (PORTUGUÊS)
Manual do teclado Fenix FK620B (PORTUGUÊS)Manual do teclado Fenix FK620B (PORTUGUÊS)
Manual do teclado Fenix FK620B (PORTUGUÊS)Habro Group
 
ZendCon 2011 Learning CouchDB
ZendCon 2011 Learning CouchDBZendCon 2011 Learning CouchDB
ZendCon 2011 Learning CouchDBBradley Holt
 
CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...
CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...
CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...StampedeCon
 
Migrating to CouchDB
Migrating to CouchDBMigrating to CouchDB
Migrating to CouchDBJohn Wood
 
Couch Db In 60 Minutes
Couch Db In 60 MinutesCouch Db In 60 Minutes
Couch Db In 60 MinutesGeorge Ang
 
Couch db@nosql+taiwan
Couch db@nosql+taiwanCouch db@nosql+taiwan
Couch db@nosql+taiwanKenzou Yeh
 
CouchDB – A Database for the Web
CouchDB – A Database for the WebCouchDB – A Database for the Web
CouchDB – A Database for the WebKarel Minarik
 
Dons do espírito santo 2
Dons do espírito santo 2Dons do espírito santo 2
Dons do espírito santo 2UEPB
 
COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...
COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...
COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...Alex Lolol
 
CouchApps: Requiem for Accidental Complexity
CouchApps: Requiem for Accidental ComplexityCouchApps: Requiem for Accidental Complexity
CouchApps: Requiem for Accidental ComplexityFederico Galassi
 

Viewers also liked (20)

XVII Certamen Jóvenes Creadores 2014
XVII Certamen Jóvenes Creadores 2014XVII Certamen Jóvenes Creadores 2014
XVII Certamen Jóvenes Creadores 2014
 
LWUIT: Uma alternativa para interface gráfica em dispositivos móveis
LWUIT: Uma alternativa para interface gráfica em dispositivos móveisLWUIT: Uma alternativa para interface gráfica em dispositivos móveis
LWUIT: Uma alternativa para interface gráfica em dispositivos móveis
 
Trabajo grupal.
Trabajo grupal.Trabajo grupal.
Trabajo grupal.
 
31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...
31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...
31/05/2010 La Fundación AXA presenta la exposición Espacio y Desarrollo Soste...
 
Manual do teclado Fenix FK620B (PORTUGUÊS)
Manual do teclado Fenix FK620B (PORTUGUÊS)Manual do teclado Fenix FK620B (PORTUGUÊS)
Manual do teclado Fenix FK620B (PORTUGUÊS)
 
ZendCon 2011 Learning CouchDB
ZendCon 2011 Learning CouchDBZendCon 2011 Learning CouchDB
ZendCon 2011 Learning CouchDB
 
CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...
CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...
CouchDB at its Core: Global Data Storage and Rich Incremental Indexing at Clo...
 
Migrating to CouchDB
Migrating to CouchDBMigrating to CouchDB
Migrating to CouchDB
 
Apache CouchDB
Apache CouchDBApache CouchDB
Apache CouchDB
 
CouchDB-Lucene
CouchDB-LuceneCouchDB-Lucene
CouchDB-Lucene
 
Couch Db In 60 Minutes
Couch Db In 60 MinutesCouch Db In 60 Minutes
Couch Db In 60 Minutes
 
Couch db
Couch dbCouch db
Couch db
 
Couch db@nosql+taiwan
Couch db@nosql+taiwanCouch db@nosql+taiwan
Couch db@nosql+taiwan
 
CouchDB – A Database for the Web
CouchDB – A Database for the WebCouchDB – A Database for the Web
CouchDB – A Database for the Web
 
Couch db
Couch dbCouch db
Couch db
 
Dons do espírito santo 2
Dons do espírito santo 2Dons do espírito santo 2
Dons do espírito santo 2
 
CouchDB
CouchDBCouchDB
CouchDB
 
COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...
COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...
COMERCIO Y TRANSPORTE EN ANDALUCIA - TEMA 2 EL TRANSPORTE EN ANDALUCÍA - FP A...
 
CouchApps: Requiem for Accidental Complexity
CouchApps: Requiem for Accidental ComplexityCouchApps: Requiem for Accidental Complexity
CouchApps: Requiem for Accidental Complexity
 
CouchDB Vs MongoDB
CouchDB Vs MongoDBCouchDB Vs MongoDB
CouchDB Vs MongoDB
 

Similar to CouchDB at New York PHP

Modeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databasesModeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databasesRyan CrawCour
 
Mongodb intro
Mongodb introMongodb intro
Mongodb introchristkv
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source BridgeChris Anderson
 
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018Keshav Murthy
 
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysConexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysCAPSiDE
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaGuido Schmutz
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...confluent
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaGuido Schmutz
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data ModelingDATAVERSITY
 
d3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlind3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in BerlinToshiaki Katayama
 
Lightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and CassandraLightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and Cassandranickmbailey
 
Building Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query EnginesBuilding Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query EnginesMapR Technologies
 
CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009Jason Davies
 
MVP Cloud OS Week Track 1 9 Sept: Data liberty
MVP Cloud OS Week Track 1 9 Sept: Data libertyMVP Cloud OS Week Track 1 9 Sept: Data liberty
MVP Cloud OS Week Track 1 9 Sept: Data libertycsmyth501
 
MVP Cloud OS Week: 9 Sept, Track 1 Data Liberty
MVP Cloud OS Week: 9 Sept, Track 1 Data LibertyMVP Cloud OS Week: 9 Sept, Track 1 Data Liberty
MVP Cloud OS Week: 9 Sept, Track 1 Data Libertycsmyth501
 

Similar to CouchDB at New York PHP (20)

Modeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databasesModeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databases
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source Bridge
 
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
 
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDaysConexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
Conexión de MongoDB con Hadoop - Luis Alberto Giménez - CAPSiDE #DevOSSAzureDays
 
Introduction to solr
Introduction to solrIntroduction to solr
Introduction to solr
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
 
MongoDB Meetup
MongoDB MeetupMongoDB Meetup
MongoDB Meetup
 
Couchdb Nosql
Couchdb NosqlCouchdb Nosql
Couchdb Nosql
 
10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling
 
d3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlind3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlin
 
Polyglot Persistence
Polyglot PersistencePolyglot Persistence
Polyglot Persistence
 
Querying mongo db
Querying mongo dbQuerying mongo db
Querying mongo db
 
Lightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and CassandraLightning fast analytics with Spark and Cassandra
Lightning fast analytics with Spark and Cassandra
 
Building Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query EnginesBuilding Highly Flexible, High Performance Query Engines
Building Highly Flexible, High Performance Query Engines
 
CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009CouchDB at JAOO Århus 2009
CouchDB at JAOO Århus 2009
 
MVP Cloud OS Week Track 1 9 Sept: Data liberty
MVP Cloud OS Week Track 1 9 Sept: Data libertyMVP Cloud OS Week Track 1 9 Sept: Data liberty
MVP Cloud OS Week Track 1 9 Sept: Data liberty
 
MVP Cloud OS Week: 9 Sept, Track 1 Data Liberty
MVP Cloud OS Week: 9 Sept, Track 1 Data LibertyMVP Cloud OS Week: 9 Sept, Track 1 Data Liberty
MVP Cloud OS Week: 9 Sept, Track 1 Data Liberty
 

More from Bradley Holt

Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012Bradley Holt
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven DesignBradley Holt
 
CouchConf NYC CouchApps
CouchConf NYC CouchAppsCouchConf NYC CouchApps
CouchConf NYC CouchAppsBradley Holt
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignBradley Holt
 
jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsBradley Holt
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with ApacheBradley Holt
 
New Features in PHP 5.3
New Features in PHP 5.3New Features in PHP 5.3
New Features in PHP 5.3Bradley Holt
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web ServicesBradley Holt
 
Zend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughZend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughBradley Holt
 
Burlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion PresentationBurlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion PresentationBradley Holt
 

More from Bradley Holt (12)

Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012Domain-Driven Design at ZendCon 2012
Domain-Driven Design at ZendCon 2012
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
 
CouchConf NYC CouchApps
CouchConf NYC CouchAppsCouchConf NYC CouchApps
CouchConf NYC CouchApps
 
ZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven DesignZendCon 2011 UnCon Domain-Driven Design
ZendCon 2011 UnCon Domain-Driven Design
 
jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchApps
 
Load Balancing with Apache
Load Balancing with ApacheLoad Balancing with Apache
Load Balancing with Apache
 
Intermediate PHP
Intermediate PHPIntermediate PHP
Intermediate PHP
 
New Features in PHP 5.3
New Features in PHP 5.3New Features in PHP 5.3
New Features in PHP 5.3
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Resource-Oriented Web Services
Resource-Oriented Web ServicesResource-Oriented Web Services
Resource-Oriented Web Services
 
Zend Framework Quick Start Walkthrough
Zend Framework Quick Start WalkthroughZend Framework Quick Start Walkthrough
Zend Framework Quick Start Walkthrough
 
Burlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion PresentationBurlington, VT PHP Users Group Subversion Presentation
Burlington, VT PHP Users Group Subversion Presentation
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

CouchDB at New York PHP

  • 1. CouchDB: JSON, HTTP & MapReduce Bradley Holt (http://bradley-holt.com/) @BradleyHolt (http://twitter.com/BradleyHolt)
  • 5. Organizer BTV
  • 7. Author http://oreilly.com/catalog/9781449303129/ http://oreilly.com/catalog/9781449303433/
  • 9. Cluster Of Unreliable Commodity Hardware Document-oriented, schema-less Shared nothing, horizontally scalable Runs on the Erlang OTP platform Peer-based, bi-directional replication RESTful HTTP API Queries are done against MapReduce “views”, or indexes
  • 10. When You Might Consider CouchDB You’ve found yourself denormalizing your SQL database for better performance. Your domain model is a “ t” for documents (e.g. a CMS). Your application is read-heavy. You need a high level of concurrency and can give up consistency in exchange. You need horizontal scalability. You want your database to be able to run anywhere, even on mobile devices, and even when disconnected from the cluster.
  • 11. Trade-Offs No ad hoc queries. You need to know what you’re going to want to query ahead of time. For example, SQL would be a better t for business intelligence reporting. No concept of “joins”. You can relate data, but watch out for consistency issues. Transactions are limited to document boundaries. CouchDB trades storage space for performance.
  • 12. Other Alternatives to SQL MongoDB http://www.mongodb.org/ Redis http://redis.io/ Cassandra http://cassandra.apache.org/ Riak http://www.basho.com/ HBase (a database for Hadoop) http://hbase.apache.org/
  • 13. Don’t be so quick to get rid of SQL! There are many problems for which an SQL database is a good t. SQL is very powerful and exible query language.
  • 15. JSON (JavaScript Object Notation) is a human-readable and lightweight data interchange format. Data structures from many programming languages can be easily converted to and from JSON.
  • 16. JSON Values A JSON object is a collection of key/value pairs. JSON values can be strings, numbers, booleans (false or true), arrays (e.g. ["a", "b", "c"]), null, or another JSON object.
  • 17. A “Book” JSON Object { "_id":"978-0-596-15589-6", "title":"CouchDB: The De nitive Guide", "subtitle":"Time to Relax", "authors":[ "J. Chris Anderson", "Jan Lehnardt", "Noah Slater" ], "publisher":"O'Reilly Media", "released":"2010-01-19", "pages":272 }
  • 18. RESTful HTTP API curl -iX PUT http://localhost:5984/mydb
  • 19. Representational State Transfer (REST) is a software architecture style that describes distributed hypermedia systems such as the World Wide Web.
  • 22. Create a Database $ curl -iX PUT http://localhost:5984/mydb HTTP/1.1 201 Created Location: http://localhost:5984/mydb {"ok":true}
  • 23. Create a Document $ curl -iX POST http://localhost:5984/mydb -H "Content-Type: application/json" -d '{"_id":"42621b2516001626"}' HTTP/1.1 201 Created Location: http://localhost:5984/mydb/42621b2516001626 { "ok":true, "id":"42621b2516001626", "rev":"1-967a00dff5e02add41819138abb3284d" }
  • 24. Read a Document $ curl -iX GET http://localhost:5984/mydb/42621b2516001626 HTTP/1.1 200 OK Etag: "1-967a00dff5e02add41819138abb3284d" { "_id":"42621b2516001626", "_rev":"1-967a00dff5e02add41819138abb3284d" }
  • 25. When updating a document, CouchDB requires the correct document revision number as part of its Multi-Version Concurrency Control (MVCC). This form of optimistic concurrency ensures that another client hasn't modi ed the document since it was last retrieved.
  • 26. Update a Document $ curl -iX PUT http://localhost:5984/mydb/42621b2516001626 -H "Content-Type: application/json" -d '{ "_id":"42621b2516001626", "_rev":"1-967a00dff5e02add41819138abb3284d", "title":"CouchDB: The De nitive Guide" }' HTTP/1.1 201 Created { "ok":true, "id":"42621b2516001626", "rev":"2-bbd27429fd1a0daa2b946cbacb22dc3e" }
  • 27. Conditional GET $ curl -iX GET http://localhost:5984/mydb/42621b2516001626 -H 'If-None-Match: "2-bbd27429fd1a0daa2b946cbacb22dc3e"' HTTP/1.1 304 Not Modified Etag: "2-bbd27429fd1a0daa2b946cbacb22dc3e" Content-Length: 0
  • 28. Delete a Document $ curl -iX DELETE http://localhost:5984/mydb/42621b2516001626 -H 'If-Match: "2-bbd27429fd1a0daa2b946cbacb22dc3e"' HTTP/1.1 200 OK { "ok":true, "id":"42621b2516001626", "rev":"3-29d2ef6e0d3558a3547a92dac51f3231" }
  • 29. Read a Deleted Document $ curl -iX GET http://localhost:5984/mydb/42621b2516001626 HTTP/1.1 404 Object Not Found { "error":"not_found", "reason":"deleted" }
  • 30. Read a Deleted Document $ curl -iX GET http://localhost:5984/mydb/42621b2516001626 ?rev=3-29d2ef6e0d3558a3547a92dac51f3231 HTTP/1.1 200 OK Etag: "3-29d2ef6e0d3558a3547a92dac51f3231" { "_id":"42621b2516001626", "_rev":"3-29d2ef6e0d3558a3547a92dac51f3231", "_deleted":true }
  • 31. Fetch Revisions $ curl -iX GET http://localhost:5984/mydb/42621b2516001626 ?rev=3-29d2ef6e0d3558a3547a92dac51f3231&revs=true HTTP/1.1 200 OK { // … "_revisions":{ "start":3, "ids":[ "29d2ef6e0d3558a3547a92dac51f3231", "bbd27429fd1a0daa2b946cbacb22dc3e", "967a00dff5e02add41819138abb3284d" ] } }
  • 32. Do not rely on older revisions. Revisions are used for concurrency control and for replication. Old revisions are removed during database compaction.
  • 33. MapReduce Views function(doc) { if (doc.title) { emit(doc.title); } }
  • 34. MapReduce consists of Map and Reduce steps which can be distributed in a way that takes advantage of the multiple processor cores found in modern hardware.
  • 35. Futon
  • 37. Map and Reduce are written as JavaScript functions that are de ned within views. Temporary views can be used during development but should be saved permanently to design documents for production. Temporary views can be very slow.
  • 38. Map
  • 39. Add the First Document { "_id":"978-0-596-15589-6", "title":"CouchDB: The De nitive Guide", "subtitle":"Time to Relax", "authors":[ "J. Chris Anderson", "Jan Lehnardt", "Noah Slater" ], "publisher":"O'Reilly Media", "released":"2010-01-19", "pages":272 }
  • 41. Map Book Titles function(doc) { // JSON object representing a doc to be mapped if (doc.title) { // make sure this doc has a title emit(doc.title); // emit the doc’s title as the key } }
  • 42. The emit function accepts two arguments. The rst is a key and the second a value. Both are optional and default to null.
  • 44. “Titles” Temporary View key id value "CouchDB: The "978-0-596-15589-6" null Definitive Guide"
  • 45. Add a Second Document { "_id":"978-0-596-52926-0", "title":"RESTful Web Services", "subtitle":"Web services for the real world", "authors":[ "Leonard Richardson", "Sam Ruby" ], "publisher":"O'Reilly Media", "released":"2007-05-08", "pages":448 }
  • 47. “Titles” Temporary View key id value "CouchDB: The "978-0-596-15589-6" null Definitive Guide" "RESTful Web "978-0-596-52926-0" null Services"
  • 49. Add a “formats” Field to Both Documents { // … "formats":[ "Print", "Ebook", "Safari Books Online" ] }
  • 50. Add a Third Document { "_id":"978-1-565-92580-9", "title":"DocBook: The De nitive Guide", "authors":[ "Norman Walsh", "Leonard Muellner" ], "publisher":"O'Reilly Media", "formats":[ "Print" ], "released":"1999-10-28", "pages":648 }
  • 51. Map Book Formats function(doc) { // JSON object representing a doc to be mapped if (doc.formats) { // make sure this doc has a formats eld for (var i in doc.formats) { emit(doc.formats[i]); // emit each format as the key } } }
  • 52.
  • 53. “Formats” Temporary View key id value "Ebook" "978-0-596-15589-6" null "Ebook" "978-0-596-52926-0" null "Print" "978-0-596-15589-6" null "Print" "978-0-596-52926-0" null "Print" "978-1-565-92580-9" null "Safari Books Online" "978-0-596-15589-6" null "Safari Books Online" "978-0-596-52926-0" null
  • 54. When querying a view, the “key” and “id” elds can be used to select a row or range of rows. Optionally, rows can be grouped by “key” elds or by levels of “key” elds.
  • 55. Map Book Authors function(doc) { // JSON object representing a doc to be mapped if (doc.authors) { // make sure this doc has an authors eld for (var i in doc.authors) { emit(doc.authors[i]); // emit each author as the key } } }
  • 56.
  • 57. “Authors” Temporary View key id value "J. Chris Anderson" "978-0-596-15589-6" null "Jan Lehnardt" "978-0-596-15589-6" null "Leonard Muellner" "978-1-565-92580-9" null "Leonard Richardson" "978-0-596-52926-0" null "Noah Slater" "978-0-596-15589-6" null "Norman Walsh" "978-1-565-92580-9" null "Sam Ruby" "978-0-596-52926-0" null
  • 59. Built-in Reduce Functions Function Output _count Returns the number of mapped values in the set _sum Returns the sum of the set of mapped values Returns numerical statistics of the mapped values in _stats the set including the sum, count, min, and max
  • 60. Count
  • 61. Format Count, Not Grouped
  • 62. Format Count, Not Grouped key value null 7
  • 64. Format Count, Grouped key value "Ebook" 2 "Print" 3 "Safari Books Online" 2
  • 65. Sum
  • 66. Sum of Pages by Format
  • 67. Sum of Pages by Format key value "Ebook" 720 "Print" 1368 "Safari Books Online" 720
  • 68. Stats sum, count, minimum, maximum, sum over all square roots
  • 69. Stats of Pages by Format
  • 70. Stats of Pages by Format key value {"sum":720,"count":2,"min":272, "Ebook" "max":448,"sumsqr":274688} {"sum":1368,"count":3,"min":272, "Print" "max":648,"sumsqr":694592} {"sum":720,"count":2,"min":272, "Safari Books Online" "max":448,"sumsqr":274688}
  • 72. The built-in Reduce functions should serve your needs most, if not all, of the time. If you nd yourself writing a custom Reduce function, then take a step back and make sure that one of the built-in Reduce functions won't serve your needs better.
  • 74. Parameters Keys: An array of mapped key and document IDs in the form of [key,id] where id is the document ID. Values: An array of mapped values. Rereduce: Whether or not the Reduce function is being called recursively on its own output.
  • 75. Count Equivalent function(keys, values, rereduce) { if (rereduce) { return sum(values); } else { return values.length; } }
  • 76. Sum Equivalent function(keys, values, rereduce) { return sum(values); }
  • 77. MapReduce Limitations Full-text indexing and ad hoc searching • couchdb-lucene https://github.com/rnewson/couchdb-lucene • ElasticSearch and CouchDB https://github.com/elasticsearch/elasticsearch/wiki/Couchdb-integration Geospatial indexing and search (two dimensional) • GeoCouch https://github.com/vmx/couchdb • Geohash (e.g. dr5rusx1qkvvr) http://geohash.org/
  • 79. You can query for all rows, a single contiguous range of rows, or even rows matching a speci ed key.
  • 80. Add a Fourth Document { "_id":"978-0-596-80579-1", "title":"Building iPhone Apps with HTML, CSS, and JavaScript", "subtitle":"Making App Store Apps Without Objective-C or Cocoa", "authors":[ "Jonathan Stark" ], "publisher":"O'Reilly Media", "formats":[ "Print", "Ebook", "Safari Books Online" ], "released":"2010-01-08", "pages":192 }
  • 81. Map Book Releases function(doc) { if (doc.released) { emit(doc.released.split("-"), doc.pages); } }
  • 84. “Releases”, Exact Grouping key value {"sum":648,"count":1,"min":648, ["1999","10","28"] "max":648,"sumsqr":419904} {"sum":448,"count":1,"min":448, ["2007","05","08"] "max":448,"sumsqr":200704} {"sum":192,"count":1,"min":192, ["2010","01","08"] "max":192,"sumsqr":36864} {"sum":272,"count":1,"min":272, ["2010","01","19"] "max":272,"sumsqr":73984}
  • 86. “Releases”, Level 1 Grouping key value {"sum":648,"count":1,"min":648, ["1999"] "max":648,"sumsqr":419904} {"sum":448,"count":1,"min":448, ["2007"] "max":448,"sumsqr":200704} {"sum":464,"count":2,"min":192, ["2010"] "max":272,"sumsqr":110848}
  • 88. “Releases”, Level 2 Grouping key value {"sum":648,"count":1,"min":648, ["1999","10"] "max":648,"sumsqr":419904} {"sum":448,"count":1,"min":448, ["2007","05"] "max":448,"sumsqr":200704} {"sum":464,"count":2,"min":192, ["2010","01"] "max":272,"sumsqr":110848}
  • 89. PHP Libraries for CouchDB PHPCouch http://www.phpcouch.org/ PHPillow http://arbitracker.org/phpillow.html PHP CouchDB Extension (PECL) http://www.topdog.za.net/php_couchdb_extension Doctrine2 ODM
  • 90. Do-It-Yourself Zend_Http_Client + Zend_Cache PEAR’s HTTP_Client PHP cURL JSON maps nicely to and from PHP arrays using Zend_Json or PHP’s json_ functions
  • 92. Load Balancing Send POST, PUT, and DELETE requests to a write-only master node Setup continuous replication from the master node to multiple read-only nodes Load balance GET, HEAD, and OPTIONS requests amongst read-only nodes • Apache HTTP Server (mod_proxy) • nginx • HAProxy • Varnish • Squid
  • 93. Clustering (Partitioning/Sharding) Lounge http://tilgovi.github.com/couchdb-lounge/ • Proxy, partitioning, and sharding BigCouch https://github.com/cloudant/bigcouch • Clusters modeled after Amazon’s Dynamo approach Pillow https://github.com/khellan/Pillow • “…a combined router and rereducer for CouchDB.”
  • 96. Authorization Server Admin Database Reader Document Update Validation http://wiki.apache.org/couchdb/Document_Update_Validation
  • 97. Hypermedia Controls Show Functions List Functions See: http://wiki.apache.org/couchdb/Formatting_with_Show_and_List
  • 98. Replication Peer-based & bi-directional Documents and modi ed elds are incrementally replicated. All data will be eventually consistent. Con icts are agged and can be handled by application logic. Partial replicas can be created via JavaScript lter functions.
  • 100. Distributing CouchApp http://couchapp.org/ • Applications built using JavaScript, HTML5, CSS and CouchDB Mobile • Android http://www.couchone.com/android
  • 101. CouchDB Resources CouchDB: The De nitive Guide CouchDB Wiki by J. Chris Anderson, Jan http://wiki.apache.org/couchdb/ Lehnardt, and Noah Slater (O’Reilly) Beginning CouchDB 978-0-596-15589-6 by Joe Lennon (Apress) 978-1-430-27237-3 Writing and Querying MapReduce Views in CouchDB by Bradley Holt (O’Reilly) 978-1-449-30312-9 Scaling CouchDB by Bradley Holt (O’Reilly) 063-6-920-01840-7
  • 103. Thank You Bradley Holt (http://bradley-holt.com/) @BradleyHolt (http://twitter.com/BradleyHolt) Copyright © 2011 Bradley Holt. All rights reserved.