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

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 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