SlideShare a Scribd company logo
1 of 47
Service Oriented
Applications
How we built letitcast.com, Ruby Lugdunum, June 26, 2011




Michael Bensoussan
Developer
Service Oriented
Applications
              cc @elise_huard


How we built letitcast.com, Ruby Lugdunum, June 26, 2011




Michael Bensoussan
Developer
Service Oriented
Applications
How we built letitcast.com, Ruby Lugdunum, June 26, 2011




                                  Monolithic
                                applications are
                                  boooring !

                                cc @apotonick

Michael Bensoussan
Developer
Tons of
It was a
MySQL




Front-end
Redis                       MySQL




                                                  API for FTP
                        Rails API                users and dir.
                                                   (sinatra)
Configs
Engine
                                                 video uploaded
                      Client Library              on FTP notifier
                                                     (sinatra)




            Rails                      Rails
         Frontend 1                 Frontend 2




                          Rails
                       Frontend 3




          Configs                        Auth
          Engine                       Engine
What did we
Scale With Code
  Complexity
Scale With Team Size
Monolithic applications don’t
scale
Let’s build an API and
 multiple Front-ends
Choose a communication
           layer
and a serialization format
We choose HTTP
We choose HTTP and
JSON
Build the
API !
Tip: don’t load the
rails libs you don’t
         need
require "rails/all"
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
# require "active_resource/railtie"
require "rails/test_unit/railtie"
[
  ActionDispatch::Flash,
  ActionDispatch::Session::CookieStore,
  ActionDispatch::Cookies,
  ActionDispatch::Static
].each do |klass|
  config.middleware.delete klass
end
Tip: Build the API
response
fabrik42 / acts_as_api
class User < ActiveRecord::Base

 acts_as_api
 api_accessible(ApiAccessible.init(:user))

 def name
  "#{user.firstname} #{user.lastname}"
 end
end
:user:
  :default:
    - :id
    - :name
  :full:
    - :id
    - :name
    - :birthday
    - :created_at
    - :updated_at
def show
 user = User.find(params[:id])
 render_for_api :full, :json => user
end
MySQL




Rails API
Build your Client
Library
citizencast / restparty
class Casting < LetitCastClient
 resource_for :castings, :except => [:delete],
                 :association => [:parts, :productions],
                 :member => {
                    :add_production => :post,
                    :remove_production => :delete
                 },
                 :collection => {:search => :get}
end
   Casting.find(:all)      # GET /castings.json
   casting = Casting.find(42) # GET /castings/42.json
   parts = casting.parts     # GET /castings/42/parts.json
   Casting.delete(1)       # DEL /castings/1
   Casting.search(:q => "Mike") # GET /castings/search?q=Mike
class Casting < LetitCastClient
 resource_for :castings, :except => [:delete],
                 :association => [:parts, :productions],
                 :member => {
                    :add_production => :post,
                    :remove_production => :delete
                 },
                 :collection => {:search => :get}
end

   Casting.find(:all)      # GET /castings.json
   casting = Casting.find(42) # GET /castings/42.json
   parts = casting.parts     # GET /castings/42/parts.json
   Casting.delete(1)       # DEL /castings/1
   Casting.search(:q => "Mike") # GET /castings/search?q=Mike
MySQL



  Rails API



Client Library



    Rails
 Frontend 1
MySQL




             Rails API




         Client Library




   Rails                    Rails
Frontend 1               Frontend 2
Rails Engines !
Rails 3               Rails 3.1
gem install enginex
                      rails plugin new auth --full
enginex auth
Rails 3               Rails 3.1
gem install enginex
                      rails plugin new auth --full
enginex auth
MySQL




               Rails API




             Client Library




   Rails                         Rails
Frontend 1                    Frontend 2




 Configs                         Auth
 Engine                        Engine
HTTP is slow !
Cache !
jodosha / redis-store
Redis




         Cache           Invalidate
        HTTP calls         Cache




Frontends                        Rails API
def show
 @casting = Rails.cache.fetch("controller/castings/#{params[:id]}") do
  Casting.find(params[:id])
 end
end
class CastingSweeper < ActionController::Caching::Sweeper
 observe Casting

 def after_save(casting)
   Rails.cache.delete_matched("controller/castings/index*")
   Rails.cache.delete_matched("controller/castings/
#{casting.id}*")
 end
end
Redis                      MySQL




               Rails API




             Client Library




   Rails                         Rails
Frontend 1                    Frontend 2




 Configs                         Auth
 Engine                        Engine
Redis                       MySQL




                                                  API for FTP
                        Rails API                users and dir.
                                                   (sinatra)
Configs
Engine
                                                 video uploaded
                      Client Library              on FTP notifier
                                                     (sinatra)




            Rails                      Rails
         Frontend 1                 Frontend 2




                          Rails
                       Frontend 3




          Configs                        Auth
          Engine                       Engine
Questions
?

More Related Content

What's hot

Rails 5 – most effective features for apps upgradation
Rails 5 – most effective features for apps upgradationRails 5 – most effective features for apps upgradation
Rails 5 – most effective features for apps upgradationAndolasoft Inc
 
OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISBilal Haidar
 
LF_APIStrat17_The Great API Redesign
LF_APIStrat17_The Great API RedesignLF_APIStrat17_The Great API Redesign
LF_APIStrat17_The Great API RedesignLF_APIStrat
 
Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & consLaravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & consElenorWisozk
 
One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"testflyjets
 
ATLRUG Announcements - Septemer 2016
ATLRUG Announcements - Septemer 2016ATLRUG Announcements - Septemer 2016
ATLRUG Announcements - Septemer 2016jasnow
 
Tech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIsTech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIsGavin Cornwell
 
AppSyncをReactで使ってみた
AppSyncをReactで使ってみたAppSyncをReactで使ってみた
AppSyncをReactで使ってみたTakahiro Kobaru
 
Foreman - Process manager for applications with multiple components
Foreman - Process manager for applications with multiple componentsForeman - Process manager for applications with multiple components
Foreman - Process manager for applications with multiple componentsStoyan Zhekov
 
Going Serverless with Iron.io
Going Serverless with Iron.ioGoing Serverless with Iron.io
Going Serverless with Iron.ioIsak Rickyanto
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)Folio3 Software
 
Scala Vienna Website: reloaded
Scala Vienna Website: reloadedScala Vienna Website: reloaded
Scala Vienna Website: reloadedNikolay Kushin
 
The Ultimate iOS 11 Course Learn to Build Apps
The Ultimate iOS 11 Course Learn to Build AppsThe Ultimate iOS 11 Course Learn to Build Apps
The Ultimate iOS 11 Course Learn to Build AppsSam Dias
 
Server-side OSGi with Apache Sling
Server-side OSGi with Apache SlingServer-side OSGi with Apache Sling
Server-side OSGi with Apache SlingFelix Meschberger
 

What's hot (20)

Rails 5 – most effective features for apps upgradation
Rails 5 – most effective features for apps upgradationRails 5 – most effective features for apps upgradation
Rails 5 – most effective features for apps upgradation
 
OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIIS
 
LF_APIStrat17_The Great API Redesign
LF_APIStrat17_The Great API RedesignLF_APIStrat17_The Great API Redesign
LF_APIStrat17_The Great API Redesign
 
Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & consLaravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & cons
 
Owin and katana
Owin and katanaOwin and katana
Owin and katana
 
Introduction to OWIN
Introduction to OWINIntroduction to OWIN
Introduction to OWIN
 
One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"One does not simply "Upgrade to Rails 3"
One does not simply "Upgrade to Rails 3"
 
ATLRUG Announcements - Septemer 2016
ATLRUG Announcements - Septemer 2016ATLRUG Announcements - Septemer 2016
ATLRUG Announcements - Septemer 2016
 
Owin and Katana
Owin and KatanaOwin and Katana
Owin and Katana
 
Tech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIsTech Talk Live - 5.2 REST APIs
Tech Talk Live - 5.2 REST APIs
 
AppSyncをReactで使ってみた
AppSyncをReactで使ってみたAppSyncをReactで使ってみた
AppSyncをReactで使ってみた
 
Building a chatbot – step by step
Building a chatbot – step by stepBuilding a chatbot – step by step
Building a chatbot – step by step
 
Rack
RackRack
Rack
 
Foreman - Process manager for applications with multiple components
Foreman - Process manager for applications with multiple componentsForeman - Process manager for applications with multiple components
Foreman - Process manager for applications with multiple components
 
Going Serverless with Iron.io
Going Serverless with Iron.ioGoing Serverless with Iron.io
Going Serverless with Iron.io
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)
 
Scala Vienna Website: reloaded
Scala Vienna Website: reloadedScala Vienna Website: reloaded
Scala Vienna Website: reloaded
 
The Ultimate iOS 11 Course Learn to Build Apps
The Ultimate iOS 11 Course Learn to Build AppsThe Ultimate iOS 11 Course Learn to Build Apps
The Ultimate iOS 11 Course Learn to Build Apps
 
Server-side OSGi with Apache Sling
Server-side OSGi with Apache SlingServer-side OSGi with Apache Sling
Server-side OSGi with Apache Sling
 
New features of rails 5
New features of rails 5New features of rails 5
New features of rails 5
 

Viewers also liked

llamame.ppt
llamame.pptllamame.ppt
llamame.pptcexfod
 
Dani,pedro y miguel
Dani,pedro y miguelDani,pedro y miguel
Dani,pedro y miguelA Solaina
 
C:\Fakepath\πρωτη παρουσιαση φωτογραφιων
C:\Fakepath\πρωτη παρουσιαση φωτογραφιωνC:\Fakepath\πρωτη παρουσιαση φωτογραφιων
C:\Fakepath\πρωτη παρουσιαση φωτογραφιωνarc951
 
10 26 qua sinh nhat cho ma
10 26 qua sinh nhat cho ma 10 26 qua sinh nhat cho ma
10 26 qua sinh nhat cho ma taivang
 
10 40 dep giac mo hoa
10 40 dep giac mo hoa  10 40 dep giac mo hoa
10 40 dep giac mo hoa taivang
 
10 27 chiec dong ho
10 27 chiec dong ho 10 27 chiec dong ho
10 27 chiec dong ho taivang
 
Meaning of American Thanksgiving
Meaning of American ThanksgivingMeaning of American Thanksgiving
Meaning of American ThanksgivingMarkTab Ministries
 
Nursary galli new drawings
Nursary galli new drawingsNursary galli new drawings
Nursary galli new drawingsguest280587
 
24 10 goi nho que huong
24 10  goi nho que huong 24 10  goi nho que huong
24 10 goi nho que huong taivang
 
2 sant jordi 2013
2 sant jordi 20132 sant jordi 2013
2 sant jordi 2013gfarrasb
 
Optimize web content_targeting
Optimize web content_targetingOptimize web content_targeting
Optimize web content_targetingQuestexConf
 
Retallos. nº 2. 2009
Retallos. nº 2. 2009Retallos. nº 2. 2009
Retallos. nº 2. 2009A Solaina
 
Nelson Mandela. CEIP A Solaina
 Nelson Mandela. CEIP A Solaina Nelson Mandela. CEIP A Solaina
Nelson Mandela. CEIP A SolainaA Solaina
 

Viewers also liked (20)

3.5massvacaton
3.5massvacaton3.5massvacaton
3.5massvacaton
 
Make-a-blog
Make-a-blogMake-a-blog
Make-a-blog
 
llamame.ppt
llamame.pptllamame.ppt
llamame.ppt
 
Dani,pedro y miguel
Dani,pedro y miguelDani,pedro y miguel
Dani,pedro y miguel
 
Evaluation
EvaluationEvaluation
Evaluation
 
130923 pu woody plant list 3 slides
130923 pu woody plant list 3 slides130923 pu woody plant list 3 slides
130923 pu woody plant list 3 slides
 
C:\Fakepath\πρωτη παρουσιαση φωτογραφιων
C:\Fakepath\πρωτη παρουσιαση φωτογραφιωνC:\Fakepath\πρωτη παρουσιαση φωτογραφιων
C:\Fakepath\πρωτη παρουσιαση φωτογραφιων
 
Flyer Sloopadviseurs
Flyer SloopadviseursFlyer Sloopadviseurs
Flyer Sloopadviseurs
 
10 26 qua sinh nhat cho ma
10 26 qua sinh nhat cho ma 10 26 qua sinh nhat cho ma
10 26 qua sinh nhat cho ma
 
10 40 dep giac mo hoa
10 40 dep giac mo hoa  10 40 dep giac mo hoa
10 40 dep giac mo hoa
 
10 27 chiec dong ho
10 27 chiec dong ho 10 27 chiec dong ho
10 27 chiec dong ho
 
Meaning of American Thanksgiving
Meaning of American ThanksgivingMeaning of American Thanksgiving
Meaning of American Thanksgiving
 
AQUA03 ITA
AQUA03 ITAAQUA03 ITA
AQUA03 ITA
 
Nursary galli new drawings
Nursary galli new drawingsNursary galli new drawings
Nursary galli new drawings
 
Appalachain Trail
Appalachain TrailAppalachain Trail
Appalachain Trail
 
24 10 goi nho que huong
24 10  goi nho que huong 24 10  goi nho que huong
24 10 goi nho que huong
 
2 sant jordi 2013
2 sant jordi 20132 sant jordi 2013
2 sant jordi 2013
 
Optimize web content_targeting
Optimize web content_targetingOptimize web content_targeting
Optimize web content_targeting
 
Retallos. nº 2. 2009
Retallos. nº 2. 2009Retallos. nº 2. 2009
Retallos. nº 2. 2009
 
Nelson Mandela. CEIP A Solaina
 Nelson Mandela. CEIP A Solaina Nelson Mandela. CEIP A Solaina
Nelson Mandela. CEIP A Solaina
 

Similar to Service Oriented Applications

ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...Nicola Ferraro
 
What's new in Rails 5 - API Mode & Action Cable overview
What's new in Rails 5 - API Mode & Action Cable overviewWhat's new in Rails 5 - API Mode & Action Cable overview
What's new in Rails 5 - API Mode & Action Cable overviewMaxim Veksler
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do railsDNAD
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011Fabio Akita
 
TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011Lance Ball
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发shaokun
 
Dev309 from asgard to zuul - netflix oss-final
Dev309  from asgard to zuul - netflix oss-finalDev309  from asgard to zuul - netflix oss-final
Dev309 from asgard to zuul - netflix oss-finalRuslan Meshenberg
 
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...Amazon Web Services
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornMaxime Najim
 
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...Amazon Web Services
 
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018Amazon Web Services
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixYunong Xiao
 
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...apidays
 
apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...
apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...
apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...apidays
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 

Similar to Service Oriented Applications (20)

Elefrant [ng-Poznan]
Elefrant [ng-Poznan]Elefrant [ng-Poznan]
Elefrant [ng-Poznan]
 
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
 
What's new in Rails 5 - API Mode & Action Cable overview
What's new in Rails 5 - API Mode & Action Cable overviewWhat's new in Rails 5 - API Mode & Action Cable overview
What's new in Rails 5 - API Mode & Action Cable overview
 
Rack
RackRack
Rack
 
09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails09 - Fábio Akita - Além do rails
09 - Fábio Akita - Além do rails
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
 
TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
Dev309 from asgard to zuul - netflix oss-final
Dev309  from asgard to zuul - netflix oss-finalDev309  from asgard to zuul - netflix oss-final
Dev309 from asgard to zuul - netflix oss-final
 
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
(DEV309) From Asgard to Zuul: How Netflix’s Proven Open Source Tools Can Help...
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
 
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
 
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
Hands-on in the AWS Java Ecosystem (DEV325-R1) - AWS re:Invent 2018
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at Netflix
 
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
apidays LIVE India - REST the Events - REST APIs for Event-Driven Architectur...
 
apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...
apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...
apidays LIVE Singapore 2021 - REST the Events - REST APIs for Event-Driven Ar...
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Rails::Engine
Rails::EngineRails::Engine
Rails::Engine
 
Scala at Netflix
Scala at NetflixScala at Netflix
Scala at Netflix
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 

Recently uploaded

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Service Oriented Applications

  • 1. Service Oriented Applications How we built letitcast.com, Ruby Lugdunum, June 26, 2011 Michael Bensoussan Developer
  • 2. Service Oriented Applications cc @elise_huard How we built letitcast.com, Ruby Lugdunum, June 26, 2011 Michael Bensoussan Developer
  • 3. Service Oriented Applications How we built letitcast.com, Ruby Lugdunum, June 26, 2011 Monolithic applications are boooring ! cc @apotonick Michael Bensoussan Developer
  • 4.
  • 6.
  • 9. Redis MySQL API for FTP Rails API users and dir. (sinatra) Configs Engine video uploaded Client Library on FTP notifier (sinatra) Rails Rails Frontend 1 Frontend 2 Rails Frontend 3 Configs Auth Engine Engine
  • 11. Scale With Code Complexity
  • 14. Let’s build an API and multiple Front-ends
  • 15. Choose a communication layer and a serialization format
  • 17. We choose HTTP and JSON
  • 19. Tip: don’t load the rails libs you don’t need
  • 21. # Pick the frameworks you want: require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" # require "active_resource/railtie" require "rails/test_unit/railtie"
  • 22. [ ActionDispatch::Flash, ActionDispatch::Session::CookieStore, ActionDispatch::Cookies, ActionDispatch::Static ].each do |klass| config.middleware.delete klass end
  • 23. Tip: Build the API response
  • 25. class User < ActiveRecord::Base acts_as_api api_accessible(ApiAccessible.init(:user)) def name "#{user.firstname} #{user.lastname}" end end
  • 26. :user: :default: - :id - :name :full: - :id - :name - :birthday - :created_at - :updated_at
  • 27. def show user = User.find(params[:id]) render_for_api :full, :json => user end
  • 31. class Casting < LetitCastClient resource_for :castings, :except => [:delete], :association => [:parts, :productions], :member => { :add_production => :post, :remove_production => :delete }, :collection => {:search => :get} end Casting.find(:all) # GET /castings.json casting = Casting.find(42) # GET /castings/42.json parts = casting.parts # GET /castings/42/parts.json Casting.delete(1) # DEL /castings/1 Casting.search(:q => "Mike") # GET /castings/search?q=Mike
  • 32. class Casting < LetitCastClient resource_for :castings, :except => [:delete], :association => [:parts, :productions], :member => { :add_production => :post, :remove_production => :delete }, :collection => {:search => :get} end Casting.find(:all) # GET /castings.json casting = Casting.find(42) # GET /castings/42.json parts = casting.parts # GET /castings/42/parts.json Casting.delete(1) # DEL /castings/1 Casting.search(:q => "Mike") # GET /castings/search?q=Mike
  • 33. MySQL Rails API Client Library Rails Frontend 1
  • 34. MySQL Rails API Client Library Rails Rails Frontend 1 Frontend 2
  • 36. Rails 3 Rails 3.1 gem install enginex rails plugin new auth --full enginex auth
  • 37. Rails 3 Rails 3.1 gem install enginex rails plugin new auth --full enginex auth
  • 38. MySQL Rails API Client Library Rails Rails Frontend 1 Frontend 2 Configs Auth Engine Engine
  • 42. Redis Cache Invalidate HTTP calls Cache Frontends Rails API
  • 43. def show @casting = Rails.cache.fetch("controller/castings/#{params[:id]}") do Casting.find(params[:id]) end end
  • 44. class CastingSweeper < ActionController::Caching::Sweeper observe Casting def after_save(casting) Rails.cache.delete_matched("controller/castings/index*") Rails.cache.delete_matched("controller/castings/ #{casting.id}*") end end
  • 45. Redis MySQL Rails API Client Library Rails Rails Frontend 1 Frontend 2 Configs Auth Engine Engine
  • 46. Redis MySQL API for FTP Rails API users and dir. (sinatra) Configs Engine video uploaded Client Library on FTP notifier (sinatra) Rails Rails Frontend 1 Frontend 2 Rails Frontend 3 Configs Auth Engine Engine

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n