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
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011Fabio Akita
 
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
 
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
 
.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011.NET Architects Day - DNAD 2011
.NET Architects Day - DNAD 2011
 
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
 
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

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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 Processorsdebabhi2
 
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 productivityPrincipled Technologies
 
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 educationjfdjdjcjdnsjd
 
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 Takeoffsammart93
 
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...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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.pdfsudhanshuwaghmare1
 
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 FresherRemote DBA Services
 
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 Scriptwesley chun
 
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 AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
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...Neo4j
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
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
 
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
 
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
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
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
 
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
 
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 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

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