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.
Deploying to the Edge




                             Apache
                        CouchDB
Friday, 27 March 2009
Relax
Friday, 27 March 2009
Who’s Talking?

                        •   J Chris Anderson / jchris@apache.org / @jchris
                        •   PHP...
And You?

                        •   Web developers?
                        •   JavaScript coders?
                     ...
CouchDB at the Edge
                        •   CouchDB Basics
                        •   Design Documents
              ...
Damien Katz
  Wassat?
Friday, 27 March 2009

What’s CouchDB?
Schema Free (JSON)
                        •

                                                   CouchDB
                 ...
RESTful HTTP
                 •      Binary attachments

                 •      JSON is ideal for Ajax

                 ...
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •     ...
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •     ...
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •     ...
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •     ...
View Source ➙ Open Source
                                                                        •   “Running at the Edge...
Easy to Share
                                •   Design Docs are
                                    replicated.

       ...
Oooh... Replication




Friday, 27 March 2009
Friday, 27 March 2009
Friday, 27 March 2009
Friday, 27 March 2009
Friday, 27 March 2009
Friday, 27 March 2009
Friday, 27 March 2009
Friday, 27 March 2009

periodic, notifier system
Friday, 27 March 2009
Friday, 27 March 2009

P2P apps
Deployment
                 •      Traditional Server

                        •   couchapp push

                 •      ...
Traditional Server
                        •   We’re familiar with the application model.
                        •   We k...
Offline Mode
                        •   Application model is more like a desktop.
                        •   Code runs pri...
Peer to Peer
                        •   Needs no primary service provider.
                        •   Users can mashup a...
Friday, 27 March 2009

P2P apps
Programming
                         at the Edge


Friday, 27 March 2009
More than Ajax




Friday, 27 March 2009
•   Side Effect Free JavaScript Function
•   Converts from a single document into...
Render JSON Docs as HTML
         shows/post.js                                                            /drl/_show/sofa...
Render Views as HTML
          lists/index.js                                     /drl/_list/sofa/index/recent-posts?desce...
Context is Expensive
                        •   Validate one document.

                        •   Render requests have ...
Identity
                 •      Can we trust
                        intermediate servers?

                 •      Key-B...
Where do I start?
                        •   @CouchDB on Twitter
                        •   http://couchdb.org/
        ...
couch.io
                        Berlin – London – Portland




Friday, 27 March 2009
anks!
Friday, 27 March 2009
Friday, 27 March 2009
Upcoming SlideShare
Loading in …5
×

CouchDB to the Edge ApacheCon EU

1,443 views

Published on

Published in: Technology
  • Be the first to comment

CouchDB to the Edge ApacheCon EU

  1. 1. Deploying to the Edge Apache CouchDB Friday, 27 March 2009
  2. 2. Relax Friday, 27 March 2009
  3. 3. Who’s Talking? • J Chris Anderson / jchris@apache.org / @jchris • PHP -> Rails -> JSON -> CouchDB • Director, couch.io Friday, 27 March 2009
  4. 4. And You? • Web developers? • JavaScript coders? • CouchDB users? Friday, 27 March 2009
  5. 5. CouchDB at the Edge • CouchDB Basics • Design Documents • View Source ➙ Open Source • Deployment • Application Constraints Friday, 27 March 2009
  6. 6. Damien Katz Wassat? Friday, 27 March 2009 What’s CouchDB?
  7. 7. Schema Free (JSON) • CouchDB • Document Oriented, Not Relational • Highly Concurrent • RESTful HTTP API • JavaScript Powered Map/Reduce • N-Master Replication • Robust Storage Friday, 27 March 2009
  8. 8. RESTful HTTP • Binary attachments • JSON is ideal for Ajax • Web Native • Standalone Applications Friday, 27 March 2009
  9. 9. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  10. 10. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  11. 11. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  12. 12. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  13. 13. View Source ➙ Open Source • “Running at the Edge” when users run local CouchDB nodes. • Applications are data. • Give control to users. CC-BY-SA http://www.flickr.com/photos/kelleys/492253912/ Friday, 27 March 2009
  14. 14. Easy to Share • Design Docs are replicated. • If you can see an application, you can have the code. Friday, 27 March 2009
  15. 15. Oooh... Replication Friday, 27 March 2009
  16. 16. Friday, 27 March 2009
  17. 17. Friday, 27 March 2009
  18. 18. Friday, 27 March 2009
  19. 19. Friday, 27 March 2009
  20. 20. Friday, 27 March 2009
  21. 21. Friday, 27 March 2009
  22. 22. Friday, 27 March 2009 periodic, notifier system
  23. 23. Friday, 27 March 2009
  24. 24. Friday, 27 March 2009 P2P apps
  25. 25. Deployment • Traditional Server • couchapp push • Replicated to User • offline-mode • Peer to Peer • Ad hoc sharing Friday, 27 March 2009
  26. 26. Traditional Server • We’re familiar with the application model. • We know we can scale CouchDB. • Centralized servers are hard to run. • Users expect low latency responses. • Peak traffic events are interesting. Friday, 27 March 2009
  27. 27. Offline Mode • Application model is more like a desktop. • Code runs primarily at the client. • Replication keeps the edge in sync with the cloud. • Latency is less important than throughput. Friday, 27 March 2009
  28. 28. Peer to Peer • Needs no primary service provider. • Users can mashup apps and data. • Generative because people own the code. • We’re still learning application models. Friday, 27 March 2009
  29. 29. Friday, 27 March 2009 P2P apps
  30. 30. Programming at the Edge Friday, 27 March 2009
  31. 31. More than Ajax Friday, 27 March 2009 • Side Effect Free JavaScript Function • Converts from a single document into a response with any Content-Type • CouchApp makes it easy to use http://embeddedjs.com templates in your _show functions. • Cacheable with Etags
  32. 32. Render JSON Docs as HTML shows/post.js /drl/_show/sofa/post/Hello-World-For-Real-This-Time Friday, 27 March 2009 • Side Effect Free JavaScript Function • Converts from a single document into a response with any Content-Type • CouchApp makes it easy to use http://embeddedjs.com templates in your _show functions. • Cacheable with Etags
  33. 33. Render Views as HTML lists/index.js /drl/_list/sofa/index/recent-posts?descending=true&limit=8 Friday, 27 March 2009 • Side effect free and cacheable, like _show • Run with different parameters for the head, tail, and each individual row of the view.
  34. 34. Context is Expensive • Validate one document. • Render requests have no side effects. • Limited to a single document or view. • Document updates trigger asynchronous processing. Friday, 27 March 2009
  35. 35. Identity • Can we trust intermediate servers? • Key-Based Identity • Signed Messages • Canonical JSON • Web of Trust Friday, 27 March 2009
  36. 36. Where do I start? • @CouchDB on Twitter • http://couchdb.org/ • http://planet.couchdb.org/ • http://books.couchdb.org/relax/ • http://groups.google.com/group/couchapp Friday, 27 March 2009
  37. 37. couch.io Berlin – London – Portland Friday, 27 March 2009
  38. 38. anks! Friday, 27 March 2009
  39. 39. Friday, 27 March 2009

×