SlideShare a Scribd company logo
1 of 30
Download to read offline
Resource-Oriented Architecture
And Why It Matters
And How Waves Make It Easier
dan yoder                      interactive
                                     r&d
          director.hacking
        dan@zeraweb.com
http://twitter.com/dyoder
 http://dev.zeraweb.com/

 AutoCode • Functor • Filebase
Waves • Pages • Hoshi • DateJS
The Web works pretty well.
Web Sites (M)

160




120



         Scalability?
 80

       The Web Has It.
 40




  0
      2005   2006           2007    2008
HTML
      JSON
        CSS
Open? M I M E
      Yep. Mostly, anyway.
       XML
        RSS
       RDF
Existing Infrastructure?
Firewalls, Edge Caches, Proxy Servers, Etc.
But why does it work?
The Web Isn’t MVC
So Why Do We Use It So Often For Web Apps?
http://www.flickr.com/photos/seokchanyun/
RSS: From Blogs To Podcasts
Feed provides RDF-like metadata, media-type
can vary, many different clients.
http://www.flickr.com/photos/abletoven/
login                    get request token
           grant permission               get permission
                              Provider
                                                             Consumer
Resource
                               Proxy
           access resource                 access token




             HTTP Auth                       OAuth




OAuth Smart Proxies
Like firewalls for your apps - implementors don’t
need to add OAuth support directly.
Video Search
Edge caching takes the burden of caching away
from overloaded servers.
http://www.flickr.com/photos/33122834@N06/
Taking a step back ...
ROA Is Just Distributed Objects.
Except based on Fielding’s REST constraints.
ROA Solves An Old Problem.
RPC? CORBA? DCOM? DSOM? RMI? SOA?
http://www.flickr.com/photos/secretlondon/
Learning From Past Mistakes
Be platform neutral.
Don’t assume anything about the format of an
object. Let the client specify it, instead.
http://www.flickr.com/photos/dirigibleduck/
Be Wire Neutral, Too.
Protocols evolve and change. Make it possible to
link to resources using older protocols.
http://www.flickr.com/photos/megans_photography/
Define Meta-Object Protocols
“Uniform stateless interface” means rich
interactions happen on the client.
Don’t Forget Performance.
This means edge caching and pushing
computation out to the client.
http://www.flickr.com/photos/24293932@N00/
Allow Layered Architectures
Proxies and gateways can decouple server
implementations from network policies.
http://www.flickr.com/photos/rengel134/
Waves and ROA ...
Rich DSL for HTTP requests
on( :get, [ ‘location’ ],
  :query => { :lat => /d{4}/, :long => /d{4}/ },
  :accept => [ :json, :xml ] )
But it’s still just Ruby ...
pages $ waves console

Pages::Resources::Story.instance_methods &
  %w( get put post delete )

# => [quot;deletequot;, quot;postquot;, quot;putquot;, quot;getquot;]
Resource Classes

Inheritance. I can now just inherit from a base class to
provide common REST features.
Modularity. Request-handling is broken down into
logically discrete chunks, just like normal classes.
Performance. I don’t have to go through each
possible match - just those for the matching resource.
The One File Waves App

module HelloWorld

  include Waves::Foundations::Compact

  module Resources
    class Map
      on( :get, [] ) { quot;Hello #{query.name}quot;   }
    end
  end

end
Roadmap
# TODO: this is a hack ...
A Resource DSL
class Blog
  include Waves::Resource::Server
  resource :list, :expires => 3.days, [ ‘blogs’ ]  do
    get { model.find_all }
  end
  resource :element, :expires => 3.days, [ ‘blog’, :name ]  do
    get { model.find_by_name( captured.name ) }
  end
  schema :element, [ 'schema', 'blog', '2009-03' ] do
    attributes :title => String, :description => String
    link :entries, :list => Story
  end
  representations :list do
   as :html, :lang => :en do | blogs |
     view( :blog ).list( blogs )
   end
  end
end
Waves::Vitals
 Initial 0.7.0 release Feb 08
 Release 0.8.3 Available Soon!

 Of course, we’re on git.
 http://github.com/waves/stable

 Join Us On Google Groups.
 rubywaves

 irc:freenode.net#waves

 And, lest we forget, a Web site.
 http://rubywaves.com/
Shout Out
polymar, rue, leetspete, kaykay, automatthew,
pascal, copawaves, and many others.
Thanks!

More Related Content

What's hot

WEB SOCKET 應用
WEB SOCKET 應用WEB SOCKET 應用
WEB SOCKET 應用
Jerromy Lee
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
High performance website
High performance websiteHigh performance website
High performance website
Chamnap Chhorn
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
martinlippert
 
JAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScriptJAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScript
martinlippert
 

What's hot (20)

WEB SOCKET 應用
WEB SOCKET 應用WEB SOCKET 應用
WEB SOCKET 應用
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
ClubAJAX Basics - Server Communication
ClubAJAX Basics - Server CommunicationClubAJAX Basics - Server Communication
ClubAJAX Basics - Server Communication
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 
Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)
 
Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4Single Page Applications on JavaScript and ASP.NET MVC4
Single Page Applications on JavaScript and ASP.NET MVC4
 
REST in Practice
REST in PracticeREST in Practice
REST in Practice
 
Twitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessonsTwitter - Architecture and Scalability lessons
Twitter - Architecture and Scalability lessons
 
WebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer ConferenceWebApp / SPA @ AllFacebook Developer Conference
WebApp / SPA @ AllFacebook Developer Conference
 
WebApp #3 : API
WebApp #3 : APIWebApp #3 : API
WebApp #3 : API
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
Rest api design by george reese
Rest api design by george reeseRest api design by george reese
Rest api design by george reese
 
J web socket
J web socketJ web socket
J web socket
 
React server side rendering performance
React server side rendering performanceReact server side rendering performance
React server side rendering performance
 
Cache Rules Everything Around Me
Cache Rules Everything Around MeCache Rules Everything Around Me
Cache Rules Everything Around Me
 
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
 
High performance website
High performance websiteHigh performance website
High performance website
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
JAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScriptJAX 2012: Moderne Architektur mit Spring und JavaScript
JAX 2012: Moderne Architektur mit Spring und JavaScript
 
Dynamic web pages in java
Dynamic web pages in javaDynamic web pages in java
Dynamic web pages in java
 

Viewers also liked

محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]
freemadoo
 
محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]
freemadoo
 
محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]
freemadoo
 
الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]
freemadoo
 
Qnh Performance Management V2 5
Qnh Performance Management V2 5Qnh Performance Management V2 5
Qnh Performance Management V2 5
guest712728
 
Pro JavaScript Design Patterns
Pro JavaScript Design PatternsPro JavaScript Design Patterns
Pro JavaScript Design Patterns
chenwei
 

Viewers also liked (20)

محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]محاضرة 1 ظل.pps [compatibility mode]
محاضرة 1 ظل.pps [compatibility mode]
 
محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]محاضرة 2 ظل.pps [compatibility mode]
محاضرة 2 ظل.pps [compatibility mode]
 
محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]محاضرة 3 ظل.pps [compatibility mode]
محاضرة 3 ظل.pps [compatibility mode]
 
محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]محاضرة 4 ظل.pps [compatibility mode]
محاضرة 4 ظل.pps [compatibility mode]
 
محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]محاضرة 6 ظل.pps [compatibility mode]
محاضرة 6 ظل.pps [compatibility mode]
 
SD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloud
SD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloudSD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloud
SD-WAN Architecture Matters - Dr. Jim Metzler & VeloCloud
 
محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]محاضرة 7ظل.pps [compatibility mode]
محاضرة 7ظل.pps [compatibility mode]
 
محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]محاضرة 5 ظل.pps [compatibility mode]
محاضرة 5 ظل.pps [compatibility mode]
 
Why Architecture in Web Development matters
Why Architecture in Web Development mattersWhy Architecture in Web Development matters
Why Architecture in Web Development matters
 
الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]الفراغات المعماريه للعرض.Ppt [compatibility mode]
الفراغات المعماريه للعرض.Ppt [compatibility mode]
 
Design with nature review
Design with nature reviewDesign with nature review
Design with nature review
 
بحث عن المباني الثقافية والترفيهية - نظريات عمارة1
بحث عن المباني الثقافية والترفيهية - نظريات عمارة1بحث عن المباني الثقافية والترفيهية - نظريات عمارة1
بحث عن المباني الثقافية والترفيهية - نظريات عمارة1
 
101 Things I Learned In Interaction Design School - Web Directions South
101 Things I Learned In Interaction Design School - Web Directions South101 Things I Learned In Interaction Design School - Web Directions South
101 Things I Learned In Interaction Design School - Web Directions South
 
2ScsT141b
2ScsT141b2ScsT141b
2ScsT141b
 
Wacom event report 2007 - early 2008
Wacom event report 2007 - early 2008Wacom event report 2007 - early 2008
Wacom event report 2007 - early 2008
 
Qnh Performance Management V2 5
Qnh Performance Management V2 5Qnh Performance Management V2 5
Qnh Performance Management V2 5
 
Arcticfilm: time of Polar countries
Arcticfilm: time of Polar countriesArcticfilm: time of Polar countries
Arcticfilm: time of Polar countries
 
Pro JavaScript Design Patterns
Pro JavaScript Design PatternsPro JavaScript Design Patterns
Pro JavaScript Design Patterns
 
evoloop - Company Profile
evoloop - Company Profileevoloop - Company Profile
evoloop - Company Profile
 
Hashtag Marketing by Amex
Hashtag Marketing by Amex Hashtag Marketing by Amex
Hashtag Marketing by Amex
 

Similar to LA RubyConf 2009 Waves And Resource-Oriented Architecture

NU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web PerformanceNU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web Performance
Lee Roberson
 
Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29
Alexandre Morgaut
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love
 

Similar to LA RubyConf 2009 Waves And Resource-Oriented Architecture (20)

Decoupled cms sunshinephp 2014
Decoupled cms sunshinephp 2014Decoupled cms sunshinephp 2014
Decoupled cms sunshinephp 2014
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Robotlegs on Top of Gaia
Robotlegs on Top of GaiaRobotlegs on Top of Gaia
Robotlegs on Top of Gaia
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Wicket Web Framework 101
Wicket Web Framework 101Wicket Web Framework 101
Wicket Web Framework 101
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
 
NU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web PerformanceNU Web Steering Committee - Oct 11 - Web Performance
NU Web Steering Committee - Oct 11 - Web Performance
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Modern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScriptModern Architectures with Spring and JavaScript
Modern Architectures with Spring and JavaScript
 
Connect js nodejs_api_shubhra
Connect js nodejs_api_shubhraConnect js nodejs_api_shubhra
Connect js nodejs_api_shubhra
 
ReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... YawnReST Vs SOA(P) ... Yawn
ReST Vs SOA(P) ... Yawn
 
Server rendering-talk
Server rendering-talkServer rendering-talk
Server rendering-talk
 
Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29Wakanda - apps.berlin.js - 2012-11-29
Wakanda - apps.berlin.js - 2012-11-29
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig Presentation
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
 
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
 
RESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web DesignRESS: An Evolution of Responsive Web Design
RESS: An Evolution of Responsive Web Design
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

LA RubyConf 2009 Waves And Resource-Oriented Architecture

  • 1. Resource-Oriented Architecture And Why It Matters And How Waves Make It Easier
  • 2. dan yoder interactive r&d director.hacking dan@zeraweb.com http://twitter.com/dyoder http://dev.zeraweb.com/ AutoCode • Functor • Filebase Waves • Pages • Hoshi • DateJS
  • 3. The Web works pretty well.
  • 4. Web Sites (M) 160 120 Scalability? 80 The Web Has It. 40 0 2005 2006 2007 2008
  • 5. HTML JSON CSS Open? M I M E Yep. Mostly, anyway. XML RSS RDF
  • 6. Existing Infrastructure? Firewalls, Edge Caches, Proxy Servers, Etc.
  • 7. But why does it work?
  • 8. The Web Isn’t MVC So Why Do We Use It So Often For Web Apps? http://www.flickr.com/photos/seokchanyun/
  • 9. RSS: From Blogs To Podcasts Feed provides RDF-like metadata, media-type can vary, many different clients. http://www.flickr.com/photos/abletoven/
  • 10. login get request token grant permission get permission Provider Consumer Resource Proxy access resource access token HTTP Auth OAuth OAuth Smart Proxies Like firewalls for your apps - implementors don’t need to add OAuth support directly.
  • 11. Video Search Edge caching takes the burden of caching away from overloaded servers. http://www.flickr.com/photos/33122834@N06/
  • 12. Taking a step back ...
  • 13. ROA Is Just Distributed Objects. Except based on Fielding’s REST constraints.
  • 14. ROA Solves An Old Problem. RPC? CORBA? DCOM? DSOM? RMI? SOA? http://www.flickr.com/photos/secretlondon/
  • 15. Learning From Past Mistakes
  • 16. Be platform neutral. Don’t assume anything about the format of an object. Let the client specify it, instead. http://www.flickr.com/photos/dirigibleduck/
  • 17. Be Wire Neutral, Too. Protocols evolve and change. Make it possible to link to resources using older protocols. http://www.flickr.com/photos/megans_photography/
  • 18. Define Meta-Object Protocols “Uniform stateless interface” means rich interactions happen on the client.
  • 19. Don’t Forget Performance. This means edge caching and pushing computation out to the client. http://www.flickr.com/photos/24293932@N00/
  • 20. Allow Layered Architectures Proxies and gateways can decouple server implementations from network policies. http://www.flickr.com/photos/rengel134/
  • 22. Rich DSL for HTTP requests on( :get, [ ‘location’ ], :query => { :lat => /d{4}/, :long => /d{4}/ }, :accept => [ :json, :xml ] )
  • 23. But it’s still just Ruby ... pages $ waves console Pages::Resources::Story.instance_methods & %w( get put post delete ) # => [quot;deletequot;, quot;postquot;, quot;putquot;, quot;getquot;]
  • 24. Resource Classes Inheritance. I can now just inherit from a base class to provide common REST features. Modularity. Request-handling is broken down into logically discrete chunks, just like normal classes. Performance. I don’t have to go through each possible match - just those for the matching resource.
  • 25. The One File Waves App module HelloWorld include Waves::Foundations::Compact module Resources class Map on( :get, [] ) { quot;Hello #{query.name}quot; } end end end
  • 26. Roadmap # TODO: this is a hack ...
  • 27. A Resource DSL class Blog include Waves::Resource::Server   resource :list, :expires => 3.days, [ ‘blogs’ ]  do     get { model.find_all }   end   resource :element, :expires => 3.days, [ ‘blog’, :name ]  do     get { model.find_by_name( captured.name ) }   end   schema :element, [ 'schema', 'blog', '2009-03' ] do     attributes :title => String, :description => String     link :entries, :list => Story   end   representations :list do    as :html, :lang => :en do | blogs |      view( :blog ).list( blogs )    end   end end
  • 28. Waves::Vitals Initial 0.7.0 release Feb 08 Release 0.8.3 Available Soon! Of course, we’re on git. http://github.com/waves/stable Join Us On Google Groups. rubywaves irc:freenode.net#waves And, lest we forget, a Web site. http://rubywaves.com/
  • 29. Shout Out polymar, rue, leetspete, kaykay, automatthew, pascal, copawaves, and many others.