Vidoop CouchDB Talk

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    7 Favorites

    Vidoop CouchDB Talk - Presentation Transcript

    1. Who Am I? • Chris Anderson <jchris@apache.org> • CouchDB committer • Blog: http://jchrisa.net
    2. Couch History • Damien Katz <http://damienkatz.net/> • Worked on Lotus Notes & MySQL • Started CouchDB in 2005 • 2006: Moved to Erlang, JSON and JavaScript • Approaching 0.9 Release
    3. 2008 Erlang User of the Year
    4. This Talk • Hello CouchDB • Hands on with CouchApp • The Future • Get Involved
    5. Hello CouchDB • JSON Documents • HTTP / REST (You already know the API) • ACID Storage Engine • Map Reduce Views • Replication for Freedom • Portable Standalone Applications
    6. JSON Documents {“json” : “key / value pairs”, “_id” : “some uuid”, “_rev” : “mvcc key”, “string keys” : [1,2,3,”four”,null], “schema free” : true} Your programming language supports JSON.
    7. JSON Documents {“json” : “key / value pairs”, “_id” : “some uuid”, “_rev” : “mvcc key”, “string keys” : [1,2,3,”four”,null], “schema free” : “flexible”} Adapt data as your application changes.
    8. HTTP / CRUD You already know the API. GET read PUT create or update DELETE delete POST bulk operation
    9. ACID Storage Engine • Append Only • Multi Version Concurrency Control • B-Tree Indexes O(log n) • Attachment Streaming Oooh, self-similar
    10. Map Reduce Views Docs Map { “user” : “Chris”, { “key” : “Alice”, “value” : 5 } “points” : 3 } function(doc) { { “key” : “Bob”, “value” : 7 } { “user” : “Joe”, if (doc.user && doc.points) { { “key” : “Chris”, “value” : 3 } emit(doc.user, doc.points); “points” : 10 } { “key” : “Joe”, “value” : 10 } } { “user” : “Alice”, { “key” : “Mary”, “value” : 9 } } “points” : 5 } { “user” : “Mary”, Reduce “points” : 9 } { “user” : “Bob”, “points” : 7 } function(keys, values, rereduce) { Alice ... Chris: 15 return sum(values); Everyone: 34 }
    11. Peer-Based Replication for Freedom Triggered Incremental Filtered*
    12. Let’s Replicate Everything! • Take full advantage of CouchDB • View-source Open Source • The Future is Distributed
    13. But that’s not RESTful! Representational State Transfer... it’s more than just verbs, it’s the hyperlinks. Webpage Webpage Webpage Webpage ∴ We need HTML.
    14. Render JSON Docs as HTML shows/post.js /drl/_show/sofa/post/Hello-World-For-Real-This-Time
    15. Render Views as HTML lists/index.js /drl/_list/sofa/index/recent-posts?descending=true&limit=8
    16. Hands On with CouchApp • CouchApp is just some filesystem helpers • Embodies “best practices” • CouchApp is not opinionated, CouchDB is. • Don’t shoot the messenger.
    17. Install CouchApp sudo easy_install couchapp or git clone git://github.com/jchris/couchapp.git
    18. Check Your CouchDB http://127.0.0.1:5984/_utils/
    19. Setup Credentials Leaky Abstraction! edit: /usr/local/etc/couchdb/local.ini add: [admins] username = secretpassword
    20. Get the Example App (ajax version) couchapp clone http://jchrisa.net/sofa-ajax/_design/sofa cd sofa couchapp push http://user:pass@localhost:5984/sofa-ajax
    21. The Guts
    22. First Post!
    23. Firebug to see requests
    24. Upgrade to real HTML couchapp clone http://jchrisa.net/drl/_design/sofa cd sofa couchapp push http://user:pass@localhost:5984/sofa
    25. How’s it Work? Macros so functions can be in multiple files.
    26. Templating
    27. The Future • Key-Centric Identity? • P2P Topologies don’t leave room to trust the server. • Multi-Node clusters • High performance, large databases
    28. Resources • #couchdb and #couchapp on irc.freenode.net • http://couchdb.apache.org for mailing lists • http://planet.couchdb.org/ • http://books.couchdb.org/relax/ • Twitter search for “couchdb”
    29. Thank You!

    + Chris AndersonChris Anderson, 8 months ago

    custom

    1247 views, 7 favs, 3 embeds more stats

    Overview of CouchDB,
    Demo of CouchApp,
    Future of Di more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1247
      • 1139 on SlideShare
      • 108 from embeds
    • Comments 0
    • Favorites 7
    • Downloads 20
    Most viewed embeds
    • 104 views on http://jchrisa.net
    • 3 views on http://tpno.blogspot.com
    • 1 views on http://static.slideshare.net

    more

    All embeds
    • 104 views on http://jchrisa.net
    • 3 views on http://tpno.blogspot.com
    • 1 views on http://static.slideshare.net

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories