Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

CouchDB Open Source Bridge

4,479 views

Published on

Published in: Technology
  • CouchDB Job: MySQL Database Architect (Boulder, CO)

    details here:

    http://jobscolorado.blogspot.com/2009/06/mysql-database-architect-boulder-co.html

    contact:

    jobs @ createksolutions . com

    www.createksolutions.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

CouchDB Open Source Bridge

  1. Apache CouchDB
  2. Relax
  3. Hello • J Chris Anderson • Apache CouchDB committer • Web programmer (Rails, Ajax, etc) • Director, couch.io
  4. About You? • Web developers are easy • Scalable key/value store • Peer-based Replication • Append-only IO pattern
  5. Scaling Up • Hot. Literally. • You don’t have to think.
  6. X Scaling Up • Hot. Literally. • You don’t have to think.
  7. Scale Enforces Constraints • Distributed key / value stores • Context is expensive • No joins or autoincrement • Eventual consistency
  8. e Web Scales
  9. Why CouchDB? Native to the Web Scale from a cluster to a smartphone Local data == low latency Replicated applications - the p2p web
  10. 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/
  11. JSON HTTP Local Robust
  12. 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
  13. 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); }
  14. JavaScript Map Reduce
  15. ful  You already know the API Use existing HTTP tools Talk directly to the browser
  16. ful  CRUD • Create HTTP PUT /db/mydocid • Read HTTP GET /db/mydocid • Update HTTP PUT /db/mydocid • Delete HTTP DELETE /db/mydocid
  17. Local Data Low latency (fast) Peer-based incremental replication View source --> Open source
  18. Gives Control to Users CC-BY-SA http://www.flickr.com/photos/kelleys/492253912/
  19. Robust Storage Append Only File Structure Designed to Crash Instant-On
  20. Happy IO Patterns
  21. Bandwidth Explosion
  22. “no bars”
  23. http://www.flickr.com/photos/hercwad/2290378571/
  24. http://www.flickr.com/photos/mcpig/872293700/
  25. Latency Sucks
  26. Scaling Down 4 MB RAM
  27. Erlang Parallel Fault tolerant Addictive Ninja Syntax http://www.sics.se/~joe/apachevsyaws.html
  28. Browser Couch JavaScript port Uses HTML5 storage Replicates with CouchDB http://hg.toolness.com/browser-couch/
  29. No SQL in HTML5
  30. Incremental Replication
  31. curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://couch.example.com:5984/remote-db", "target":"local-db"}'
  32. curl -X POST http://127.0.0.1:5984/_replicate -d '{"source":"http://couch.example.com:5984/remote-db", "target":"local-db"}'
  33. 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
  34. 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
  35. Render JSON Docs as HTML shows/post.js /drl/_design/sofa/_show/post/Hello-World-For-Real-This-Time
  36. Render Views as HTML lists/index.js /drl/_list/sofa/index/recent-posts?descending=true&limit=8
  37. 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
  38. @couchdbinaction http://books.couchdb.org/relax
  39. couch.io Berlin – London – Portland
  40. anks!
  41. CC-by-nd http://www.flic.kr/photos/eifelyeti110/273939759/

×