SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
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 -> Rails -> JSON -> CouchDB
                        •   Director, couch.io




Friday, 27 March 2009
And You?

                        •   Web developers?
                        •   JavaScript coders?
                        •   CouchDB users?




Friday, 27 March 2009
CouchDB at the Edge
                        •   CouchDB Basics
                        •   Design Documents
                        •   View Source ➙ Open Source
                        •   Deployment
                        •   Application Constraints




Friday, 27 March 2009
Damien Katz
  Wassat?
Friday, 27 March 2009

What’s CouchDB?
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
RESTful HTTP
                 •      Binary attachments

                 •      JSON is ideal for Ajax

                 •      Web Native

                 •      Standalone Applications




Friday, 27 March 2009
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •      Share

                        •   couchapp clone

                        •   Replication




Friday, 27 March 2009
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •      Share

                        •   couchapp clone

                        •   Replication




Friday, 27 March 2009
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •      Share

                        •   couchapp clone

                        •   Replication




Friday, 27 March 2009
Design Documents
                 •      Application Code

                 •      JSON Documents

                 •      Share

                        •   couchapp clone

                        •   Replication




Friday, 27 March 2009
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
Easy to Share
                                •   Design Docs are
                                    replicated.

                                •   If you can see an
                                    application, you can
                                    have the code.




Friday, 27 March 2009
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

                 •      Replicated to User

                        •   offline-mode

                 •      Peer to Peer

                        •   Ad hoc sharing



Friday, 27 March 2009
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
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
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
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 a response with any Content-Type
•   CouchApp makes it easy to use http://embeddedjs.com templates in your _show functions.
•   Cacheable with Etags
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
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.
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
Identity
                 •      Can we trust
                        intermediate servers?

                 •      Key-Based Identity

                 •      Signed Messages

                        •   Canonical JSON

                 •      Web of Trust




Friday, 27 March 2009
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
couch.io
                        Berlin – London – Portland




Friday, 27 March 2009
anks!
Friday, 27 March 2009
Friday, 27 March 2009

Mais conteúdo relacionado

Destaque

Hatching Chicks
Hatching ChicksHatching Chicks
Hatching Chicks
Jamie
 
1 caldecottbooks
1 caldecottbooks1 caldecottbooks
1 caldecottbooks
Jamie
 
Animals Definitely Should Not Borrow Library Books
Animals Definitely Should Not Borrow Library BooksAnimals Definitely Should Not Borrow Library Books
Animals Definitely Should Not Borrow Library Books
Jamie
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source Bridge
Chris Anderson
 
TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...
TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...
TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...
yosaggregator1
 

Destaque (15)

Hatching Chicks
Hatching ChicksHatching Chicks
Hatching Chicks
 
MIR - Migliora I Requisiti
MIR - Migliora I Requisiti MIR - Migliora I Requisiti
MIR - Migliora I Requisiti
 
1 caldecottbooks
1 caldecottbooks1 caldecottbooks
1 caldecottbooks
 
What Is A Computer
What Is A ComputerWhat Is A Computer
What Is A Computer
 
MIR - Migliora I Requisiti 2016
MIR  -  Migliora I Requisiti 2016MIR  -  Migliora I Requisiti 2016
MIR - Migliora I Requisiti 2016
 
Normas para la elaboracion y presentacion de trabajos de investigacion 2016
Normas para la elaboracion y presentacion de trabajos de investigacion 2016Normas para la elaboracion y presentacion de trabajos de investigacion 2016
Normas para la elaboracion y presentacion de trabajos de investigacion 2016
 
testSlideShare2008-11-24:03.30 - updated
testSlideShare2008-11-24:03.30 - updatedtestSlideShare2008-11-24:03.30 - updated
testSlideShare2008-11-24:03.30 - updated
 
Google Docs Apps Basics
Google Docs Apps BasicsGoogle Docs Apps Basics
Google Docs Apps Basics
 
Encyclopedia
EncyclopediaEncyclopedia
Encyclopedia
 
Animals Definitely Should Not Borrow Library Books
Animals Definitely Should Not Borrow Library BooksAnimals Definitely Should Not Borrow Library Books
Animals Definitely Should Not Borrow Library Books
 
German Photographer
German PhotographerGerman Photographer
German Photographer
 
Rainforest Food[1]
Rainforest Food[1]Rainforest Food[1]
Rainforest Food[1]
 
CouchDB Open Source Bridge
CouchDB Open Source BridgeCouchDB Open Source Bridge
CouchDB Open Source Bridge
 
Gmail Basics
Gmail BasicsGmail Basics
Gmail Basics
 
TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...
TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...
TestLongdescription-CHARLESTON, W.Va. – Utility companies and road crews prep...
 

Semelhante a CouchDB to the Edge ApacheCon EU

Portlets
PortletsPortlets
Portlets
ssetem
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
guestd34230
 
Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]
Ajax Experience 2009
 

Semelhante a CouchDB to the Edge ApacheCon EU (20)

MarvinSketch and MarvinView: Tips And Tricks: US UGM 2008
MarvinSketch and MarvinView: Tips And Tricks: US UGM 2008MarvinSketch and MarvinView: Tips And Tricks: US UGM 2008
MarvinSketch and MarvinView: Tips And Tricks: US UGM 2008
 
No Really, It's All About You
No Really, It's All About YouNo Really, It's All About You
No Really, It's All About You
 
Best Practices in Migrating to MySQL - Part 1
Best Practices in Migrating to MySQL - Part 1Best Practices in Migrating to MySQL - Part 1
Best Practices in Migrating to MySQL - Part 1
 
Building Scale Free Applications with Hadoop and Cascading
Building Scale Free Applications with Hadoop and CascadingBuilding Scale Free Applications with Hadoop and Cascading
Building Scale Free Applications with Hadoop and Cascading
 
Portlets
PortletsPortlets
Portlets
 
SAM SIG: Hadoop architecture, MapReduce patterns, and best practices with Cas...
SAM SIG: Hadoop architecture, MapReduce patterns, and best practices with Cas...SAM SIG: Hadoop architecture, MapReduce patterns, and best practices with Cas...
SAM SIG: Hadoop architecture, MapReduce patterns, and best practices with Cas...
 
Web Standards and Accessibility
Web Standards and AccessibilityWeb Standards and Accessibility
Web Standards and Accessibility
 
Rails in the Cloud
Rails in the CloudRails in the Cloud
Rails in the Cloud
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Why Architecture in Web Development matters
Why Architecture in Web Development mattersWhy Architecture in Web Development matters
Why Architecture in Web Development matters
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
 
Brandon
BrandonBrandon
Brandon
 
Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]Colin Clark Accessible U Is With J Query And Infusion[1]
Colin Clark Accessible U Is With J Query And Infusion[1]
 
Cloudera Desktop
Cloudera DesktopCloudera Desktop
Cloudera Desktop
 
Software Engineering In PHP
Software Engineering In PHPSoftware Engineering In PHP
Software Engineering In PHP
 
Drupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQueryDrupal 6 JavaScript and jQuery
Drupal 6 JavaScript and jQuery
 
The Beginning - Jan 20 2009
The Beginning - Jan 20 2009The Beginning - Jan 20 2009
The Beginning - Jan 20 2009
 
What is Ruby on Rails?
What is Ruby on Rails?What is Ruby on Rails?
What is Ruby on Rails?
 
The Boundaryless Value-Chain
The Boundaryless Value-ChainThe Boundaryless Value-Chain
The Boundaryless Value-Chain
 
LibX 2.0
LibX 2.0LibX 2.0
LibX 2.0
 

Último

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

CouchDB to the Edge ApacheCon EU

  • 1. Deploying to the Edge Apache CouchDB Friday, 27 March 2009
  • 3. Who’s Talking? • J Chris Anderson / jchris@apache.org / @jchris • PHP -> Rails -> JSON -> CouchDB • Director, couch.io Friday, 27 March 2009
  • 4. And You? • Web developers? • JavaScript coders? • CouchDB users? Friday, 27 March 2009
  • 5. CouchDB at the Edge • CouchDB Basics • Design Documents • View Source ➙ Open Source • Deployment • Application Constraints Friday, 27 March 2009
  • 6. Damien Katz Wassat? Friday, 27 March 2009 What’s CouchDB?
  • 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. RESTful HTTP • Binary attachments • JSON is ideal for Ajax • Web Native • Standalone Applications Friday, 27 March 2009
  • 9. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  • 10. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  • 11. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  • 12. Design Documents • Application Code • JSON Documents • Share • couchapp clone • Replication Friday, 27 March 2009
  • 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. Easy to Share • Design Docs are replicated. • If you can see an application, you can have the code. Friday, 27 March 2009
  • 22. Friday, 27 March 2009 periodic, notifier system
  • 24. Friday, 27 March 2009 P2P apps
  • 25. Deployment • Traditional Server • couchapp push • Replicated to User • offline-mode • Peer to Peer • Ad hoc sharing Friday, 27 March 2009
  • 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. 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. 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. Friday, 27 March 2009 P2P apps
  • 30. Programming at the Edge Friday, 27 March 2009
  • 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. 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. 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. 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. Identity • Can we trust intermediate servers? • Key-Based Identity • Signed Messages • Canonical JSON • Web of Trust Friday, 27 March 2009
  • 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. couch.io Berlin – London – Portland Friday, 27 March 2009