Download - RubyConf Brazil 2011
![Page 1: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/1.jpg)
Content Fabrics
Or the lost art of server side mash-‐ups.
![Page 2: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/2.jpg)
Me
![Page 3: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/3.jpg)
@nigelfds
github.com/nigelfds
![Page 4: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/4.jpg)
Products
Services
Consulting
XDrelease
test tech optimize
How?our approach
offshore & distributed
App dev
supportThoughtWorks
Delivery
mingle twist cruise
opensourceALM
![Page 5: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/5.jpg)
![Page 6: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/6.jpg)
Melbourne Australia
![Page 7: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/7.jpg)
Mash-‐ups right?
![Page 8: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/8.jpg)
uh.. not really.
![Page 9: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/9.jpg)
The world of big enterprise mess
![Page 10: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/10.jpg)
![Page 11: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/11.jpg)
Content producBon
Content Teams CMS system (Alfresco)
StaBc files served from Apache
End users
![Page 12: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/12.jpg)
Rails on JRuby Another App Yet another app
Tomcat
StaBc InformaBon
Business Processes
![Page 13: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/13.jpg)
The problem: Picking a soluBon
![Page 14: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/14.jpg)
DuplicaBon vs Coupling
![Page 15: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/15.jpg)
hQp://site.com/applicaBon
End users
Alfresco CMS
Rails on JRuby
![Page 16: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/16.jpg)
The Strangler PaQern
![Page 17: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/17.jpg)
Tomcat
Request
Inspired by Linked In
JRuby-‐Rack
Rails
Rails apps deployed as wars
Sitemesh
Webfabric
Alfresco CMS
Response
![Page 18: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/18.jpg)
Refreshing
Refreshing
![Page 19: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/19.jpg)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Booking - <%= yield :title %></title> <%= fetch("/website/content/integration-template.html").head %>
<%= yield :javascripts %> </head> <body> <%= fetch("/website/content/integration-template.html").div('header') %> <div class="pagelayout single-column-content”> <div class="maincontent"> <%= render 'shared/progress_bar' %> <div class="grid_24"> <%= yield %> </div> </div> <%= fetch("/website/content/integration-template.html").div('footer') %> </div> </body> </html>
![Page 20: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/20.jpg)
Evolving to the
next version
![Page 21: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/21.jpg)
The problem: Content scaling
![Page 22: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/22.jpg)
The general soluBon in compuBng to speed up access to the same informaBon is to use caches.
![Page 23: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/23.jpg)
Scaling by Caching
![Page 24: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/24.jpg)
Scaling using content freshness
![Page 25: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/25.jpg)
<div class="pagelayout single-‐column-‐content"> <%= fetch("/travel/news?filter=SaoPaulo").div('content') %>
<div class="maincontent"> <div class="grid_24">
<%= yield %> </div> </div> </div>
![Page 26: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/26.jpg)
Server side example
Travel Booking Rails App
News Updates Rails App
Get /travel/news?filter=SaoPaulo Accept: application/vnd.company.news+html If-None-Match:… Cache-Control:…
Travel Booking Rails App
News Updates Rails App
<a class="related" href=”/travel/news/13404492/”>Latest Travel News</a>
![Page 27: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/27.jpg)
Client side example
JavaScript in page
News Updates Rails App
Get /travel/news/13404492/ Accept: text/html, */* If-None-Match:… Cache-Control:…
Travel Booking Rails App
News Updates Rails App
<div> <label>…<> <input name="email”/> <label>…<> <input name=”password”/> … </div>
![Page 28: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/28.jpg)
The problem: ConBnuous incremental
deployments
![Page 29: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/29.jpg)
MigraBng content
![Page 30: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/30.jpg)
Batch process
![Page 31: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/31.jpg)
![Page 32: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/32.jpg)
Too many files
![Page 33: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/33.jpg)
Products manufactured by one company, that are packaged and sold by other companies under different brand names.
![Page 34: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/34.jpg)
![Page 35: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/35.jpg)
Enabling mulBple teams
![Page 36: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/36.jpg)
hQp://marBnfowler.com/bliki/SegmentaBonByFreshness.html
hQp://microformats.org/wiki/rest/ahah
hQp://www.sitemesh.org/overview.html
hQp://marBnfowler.com/bliki/StranglerApplicaBon.html
hQp://code.google.com/p/webfabric/
![Page 37: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/37.jpg)
![Page 38: RubyConf Brazil 2011](https://reader036.vdocuments.us/reader036/viewer/2022062615/54859317b4af9faf0d8b4e70/html5/thumbnails/38.jpg)