SlideShare a Scribd company logo
Wednesday, March 6, 13
Applying Evolutionary
                           Architecture on a
                             Popular API
                                   phil calçado
                                    @pcalcado
                             http://philcalcado.com

                   QCon London Session Code: 1603
Wednesday, March 6, 13
Wednesday, March 6, 13
Wednesday, March 6, 13
> 50K registered
                            client apps
       ~ 180 million users / month
                           ~5 years old

Wednesday, March 6, 13
Wednesday, March 6, 13
API controllers        UI controllers




                                      domain logic




Wednesday, March 6, 13
http://bit.ly/building-the-next-soundcloud

Wednesday, March 6, 13
API controllers        UI controllers




                                      domain logic




Wednesday, March 6, 13
UI controllers




                                           internet




                         API controllers




                                      domain logic



Wednesday, March 6, 13
a new platform while
                          keeping the old one
                               running?



Wednesday, March 6, 13
WARNING:
                              THIS IS
                         WORK IN PROGRESS
                         and you can help us ;)
                           http://bit.ly/work-at-soundcloud



Wednesday, March 6, 13
DO NOT BREAK
                          CLIENT APPS




Wednesday, March 6, 13
separate
                          application
                         from domain



Wednesday, March 6, 13
Classic        Next
               SoundCloud    SoundCloud

          A set is a         A set is a
         collection of      collection of
          your own           your own
           sounds             sounds




Wednesday, March 6, 13
Classic                        Next
               SoundCloud                    SoundCloud

          A set is a                         A set is a
         collection of                      collection of
          your own                           your own
           sounds                             sounds
                             SoundCloud
                                API
                             A set is a
                            collection of
                              sounds
Wednesday, March 6, 13
UI controllers




                                           internet




                         API controllers




                                      domain logic



Wednesday, March 6, 13
UI controllers




                                           internet




                                        API controllers




                         domain logic    domain logic     domain logic


Wednesday, March 6, 13
applications enforce their
               own business rules

             domain enforces “global”
                      rules



Wednesday, March 6, 13
applications enforce their
               own business rules

             domain enforces “global”
                      rules

                         (accidents happen...)
Wednesday, March 6, 13
how to add/change
                         features on the fly?



Wednesday, March 6, 13
attempt #1:
                    identify “official” apps


            - too easy to spoof
            - abused by spammers
            - Android and iOS can’t easily
            rotate secrets

Wednesday, March 6, 13
attempt #2:
                         namespace endpoints

            - “experimental” endpoints
            would link to regular ones but
            never be linked back
            - toyed with “lifted”
            hyperlinks, not enough time
            for launch
Wednesday, March 6, 13
attempt #3:
                         just use feature flags
            - works ok for logged in users

            - system is a little monster
            now, and ruby is not very
            good with numbers. rewriting
            in scala


Wednesday, March 6, 13
SPLITTING THE
                          MOTHERSHIP




Wednesday, March 6, 13
define internal protocols



Wednesday, March 6, 13
micro-services
            - couple thousands lines of code

            - mostly JVM-based, JRuby, Clojure
            and Scala

            - more about this at the SoundCoud
            pub night tomorrow: http://
            lanyrd.com/2013/soundcloudpub/
            (Walrus Pub Waterloo)
Wednesday, March 6, 13
HTTP+JSON & AMQP
                            for most stuff
            - moving AMQP usage for
            event broadcasting, as
            opposed to messaging

            - no internal HTTP caching
            (yet?)

Wednesday, March 6, 13
make it easy to get stuff in
                   prod

            - heroku-like deployment
            system

            - tending towards twitter
            stack (Finagle) for I/O

Wednesday, March 6, 13
URNs, not IDs

                    soundcloud:sounds:123




Wednesday, March 6, 13
URNs, not IDs
            - everything addressable has
            a URN, some have URLs

            - Mapping depends on
            context, e.g. given object may
            have a public URL and an
            internal URL
Wednesday, March 6, 13
<3 hypermedia

            - can easily remove things
            from the main app without
            breaking clients, just some
            HTTP 303s


Wednesday, March 6, 13
OPTIMISE ALL
                         THE THINGS!!11!




Wednesday, March 6, 13
twitter moving back to
                     server rendering...?



Wednesday, March 6, 13
not too bad, actually


            - besides load balancers vs.
            increase in number of
            requests per page


            http://backstage.soundcloud.com/2012/08/evolution-of-soundclouds-
                                       architecture/
Wednesday, March 6, 13
the actual problems
            - number of requests from
            Next keeps increasing, page
            load affected
            - very different behaviour
            depending on the client app


Wednesday, March 6, 13
UI controllers




                                           internet




                                        API controllers




                         domain logic    domain logic     domain logic


Wednesday, March 6, 13
UI controllers




                            internet




                         API controllers




Wednesday, March 6, 13
attempt #1:
                   optmising proxy for clients
                                        UI controllers




                                           internet




                                             Proxy




                                        API controllers




                         domain logic    domain logic     domain logic


Wednesday, March 6, 13
attempt #1:
                   optmising proxy for clients

            - still leverage public API
            - API has to know about how
            things behave in different
            clients


Wednesday, March 6, 13
attempt #2:
        specialised back-end for official
                     clients
                                        UI controllers




                                           internet




                                         Specialised
                                                         API controllers
                                          Back-end




                         domain logic    domain logic    domain logic




Wednesday, March 6, 13
attempt #2:
        specialised back-end for official
                     clients
            - each official app has its own back-
            end facade
            - no rendering, just data
            - public API becomes just one of
            them
            - front-end heavy teams can just
            script a common core using JRuby
Wednesday, March 6, 13
NEXT STEPS




Wednesday, March 6, 13
what we are looking at

            - dataflow programming for the
            specialised back-ends

            - ProtocolBuffers for Android

            - make the mothership just a back-
            end service, not exposed to the
            Internet

Wednesday, March 6, 13
phil calçado


                         http://philcalcado.com
                               @pcalcado



                              www.soundcloud.com




Wednesday, March 6, 13

More Related Content

Viewers also liked

Structuring apps in Scala
Structuring apps in ScalaStructuring apps in Scala
Structuring apps in ScalaPhil Calçado
 
Rhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a FunctionRhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a Function
Phil Calçado
 
An example of Future composition in a real app
An example of Future composition in a real appAn example of Future composition in a real app
An example of Future composition in a real appPhil Calçado
 
Evolutionary Architecture at Work
Evolutionary  Architecture at WorkEvolutionary  Architecture at Work
Evolutionary Architecture at WorkPhil Calçado
 
APIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog FoodAPIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog Food
Phil Calçado
 
ScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a FunctionScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a Function
Phil Calçado
 
Finagle @ SoundCloud
Finagle @ SoundCloudFinagle @ SoundCloud
Finagle @ SoundCloud
Phil Calçado
 
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Phil Calçado
 
A Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing OrganisationsA Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing Organisations
Phil Calçado
 
Concepts of Code Quality
Concepts of Code QualityConcepts of Code Quality
Concepts of Code Quality
Maximilian Berghoff
 
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Phil Calçado
 
Tech Talk: Wozu Clean Code?
Tech Talk: Wozu Clean Code?Tech Talk: Wozu Clean Code?
Tech Talk: Wozu Clean Code?
leanovate GmbH
 

Viewers also liked (12)

Structuring apps in Scala
Structuring apps in ScalaStructuring apps in Scala
Structuring apps in Scala
 
Rhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a FunctionRhein-Main Scala Enthusiasts — Your microservice as a Function
Rhein-Main Scala Enthusiasts — Your microservice as a Function
 
An example of Future composition in a real app
An example of Future composition in a real appAn example of Future composition in a real app
An example of Future composition in a real app
 
Evolutionary Architecture at Work
Evolutionary  Architecture at WorkEvolutionary  Architecture at Work
Evolutionary Architecture at Work
 
APIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog FoodAPIs: The Problems with Eating your Own Dog Food
APIs: The Problems with Eating your Own Dog Food
 
ScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a FunctionScalaItaly 2015 - Your Microservice as a Function
ScalaItaly 2015 - Your Microservice as a Function
 
Finagle @ SoundCloud
Finagle @ SoundCloudFinagle @ SoundCloud
Finagle @ SoundCloud
 
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
Three Years of Microservices at SoundCloud - Distributed Matters Berlin 2015
 
A Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing OrganisationsA Brief Talk On High-Performing Organisations
A Brief Talk On High-Performing Organisations
 
Concepts of Code Quality
Concepts of Code QualityConcepts of Code Quality
Concepts of Code Quality
 
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
Microservices vs. The First Law of Distributed Objects - GOTO Nights Chicago ...
 
Tech Talk: Wozu Clean Code?
Tech Talk: Wozu Clean Code?Tech Talk: Wozu Clean Code?
Tech Talk: Wozu Clean Code?
 

Similar to Applying Evolutionary Architecture on a Popular API

FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...
FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...
FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...
New Relic
 
Ruby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacionRuby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacionEmmanuel Delgado
 
Practical Semantic Web and Why You Should Care - DrupalCon DC 2009
Practical Semantic Web and Why You Should Care - DrupalCon DC 2009Practical Semantic Web and Why You Should Care - DrupalCon DC 2009
Practical Semantic Web and Why You Should Care - DrupalCon DC 2009
Boris Mann
 
Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013   Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013
Pablo Godel
 
The Testable Web
The Testable WebThe Testable Web
The Testable Web
Dave Haeffner
 
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
Jason Rhodes
 
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
Jason Rhodes
 
How to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David BonillaHow to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David Bonilla
Codemotion
 
Microservices and functional programming
Microservices and functional programmingMicroservices and functional programming
Microservices and functional programming
Michael Neale
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009John Woodell
 
Vital.AI Creating Intelligent Apps
Vital.AI Creating Intelligent AppsVital.AI Creating Intelligent Apps
Vital.AI Creating Intelligent Apps
Vital.AI
 
Rails Intro & Tutorial
Rails Intro & TutorialRails Intro & Tutorial
Rails Intro & Tutorial
Ming-hsuan Chang
 
The InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleThe InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo Schlossnagle
Chef Software, Inc.
 
Riak intro to..
Riak intro to..Riak intro to..
Riak intro to..Adron Hall
 
Green Shoots in the Brownest Field: Being a Startup in Government
Green Shoots in the Brownest Field: Being a Startup in GovernmentGreen Shoots in the Brownest Field: Being a Startup in Government
Green Shoots in the Brownest Field: Being a Startup in Government
C4Media
 
Storyplayer
StoryplayerStoryplayer
Storyplayer
Stuart Herbert
 
Matt training-html-halfday
Matt training-html-halfdayMatt training-html-halfday
Matt training-html-halfdayMatthew Dobson
 
Strata lightening-talk
Strata lightening-talkStrata lightening-talk
Strata lightening-talk
Danny Yuan
 

Similar to Applying Evolutionary Architecture on a Popular API (20)

FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...
FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...
FUTURESTACK13: Mobile Apps, A DevOps Way from Jonathan Karon, Engineering Man...
 
Ruby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacionRuby como-lenguaje-de-programacion
Ruby como-lenguaje-de-programacion
 
Practical Semantic Web and Why You Should Care - DrupalCon DC 2009
Practical Semantic Web and Why You Should Care - DrupalCon DC 2009Practical Semantic Web and Why You Should Care - DrupalCon DC 2009
Practical Semantic Web and Why You Should Care - DrupalCon DC 2009
 
Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013   Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013
 
The Testable Web
The Testable WebThe Testable Web
The Testable Web
 
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
 
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
 
Wphackergalaxy
WphackergalaxyWphackergalaxy
Wphackergalaxy
 
How to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David BonillaHow to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David Bonilla
 
Microservices and functional programming
Microservices and functional programmingMicroservices and functional programming
Microservices and functional programming
 
Aloha on-rails-2009
Aloha on-rails-2009Aloha on-rails-2009
Aloha on-rails-2009
 
Infrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / PuppetInfrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / Puppet
 
Vital.AI Creating Intelligent Apps
Vital.AI Creating Intelligent AppsVital.AI Creating Intelligent Apps
Vital.AI Creating Intelligent Apps
 
Rails Intro & Tutorial
Rails Intro & TutorialRails Intro & Tutorial
Rails Intro & Tutorial
 
The InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleThe InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo Schlossnagle
 
Riak intro to..
Riak intro to..Riak intro to..
Riak intro to..
 
Green Shoots in the Brownest Field: Being a Startup in Government
Green Shoots in the Brownest Field: Being a Startup in GovernmentGreen Shoots in the Brownest Field: Being a Startup in Government
Green Shoots in the Brownest Field: Being a Startup in Government
 
Storyplayer
StoryplayerStoryplayer
Storyplayer
 
Matt training-html-halfday
Matt training-html-halfdayMatt training-html-halfday
Matt training-html-halfday
 
Strata lightening-talk
Strata lightening-talkStrata lightening-talk
Strata lightening-talk
 

More from Phil Calçado

the afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowththe afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowth
Phil Calçado
 
don't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leaderdon't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leader
Phil Calçado
 
The Economics of Microservices (redux)
The Economics of Microservices (redux)The Economics of Microservices (redux)
The Economics of Microservices (redux)
Phil Calçado
 
From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019
Phil Calçado
 
The Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to ServerlessThe Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to Serverless
Phil Calçado
 
Ten Years of Failing Microservices
Ten Years of Failing MicroservicesTen Years of Failing Microservices
Ten Years of Failing Microservices
Phil Calçado
 
The Next Generation of Microservices
The Next Generation of MicroservicesThe Next Generation of Microservices
The Next Generation of Microservices
Phil Calçado
 
The Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 BrisbaneThe Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 Brisbane
Phil Calçado
 
The Economics of Microservices (2017 CraftConf)
The Economics of Microservices  (2017 CraftConf)The Economics of Microservices  (2017 CraftConf)
The Economics of Microservices (2017 CraftConf)
Phil Calçado
 
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil UsersPhil Calçado
 
(v2.0) Better Functional Design Through Test-Driven Development
(v2.0) Better Functional Design Through Test-Driven Development(v2.0) Better Functional Design Through Test-Driven Development
(v2.0) Better Functional Design Through Test-Driven Development
Phil Calçado
 
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...Phil Calçado
 
mistaeks i’ve made developing software products
mistaeks i’ve made developing software productsmistaeks i’ve made developing software products
mistaeks i’ve made developing software productsPhil Calçado
 
Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...
Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...
Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...
Phil Calçado
 
A Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's Work
A Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's WorkA Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's Work
A Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's WorkPhil Calçado
 

More from Phil Calçado (15)

the afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowththe afterparty: refactoring after 100x hypergrowth
the afterparty: refactoring after 100x hypergrowth
 
don't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leaderdon't try this at home: self-improvement as a senior leader
don't try this at home: self-improvement as a senior leader
 
The Economics of Microservices (redux)
The Economics of Microservices (redux)The Economics of Microservices (redux)
The Economics of Microservices (redux)
 
From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019From microservices to serverless - Chicago CTO Summit 2019
From microservices to serverless - Chicago CTO Summit 2019
 
The Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to ServerlessThe Not-So-Straightforward Road From Microservices to Serverless
The Not-So-Straightforward Road From Microservices to Serverless
 
Ten Years of Failing Microservices
Ten Years of Failing MicroservicesTen Years of Failing Microservices
Ten Years of Failing Microservices
 
The Next Generation of Microservices
The Next Generation of MicroservicesThe Next Generation of Microservices
The Next Generation of Microservices
 
The Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 BrisbaneThe Next Generation of Microservices — YOW 2017 Brisbane
The Next Generation of Microservices — YOW 2017 Brisbane
 
The Economics of Microservices (2017 CraftConf)
The Economics of Microservices  (2017 CraftConf)The Economics of Microservices  (2017 CraftConf)
The Economics of Microservices (2017 CraftConf)
 
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
[GOTO Copenhagen 2012] The Startup Hangover: Supporting 15 mil Users
 
(v2.0) Better Functional Design Through Test-Driven Development
(v2.0) Better Functional Design Through Test-Driven Development(v2.0) Better Functional Design Through Test-Driven Development
(v2.0) Better Functional Design Through Test-Driven Development
 
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...
 
mistaeks i’ve made developing software products
mistaeks i’ve made developing software productsmistaeks i’ve made developing software products
mistaeks i’ve made developing software products
 
Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...
Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...
Berlin-Brandenburg Scala User Group: objects can still teach us one or two th...
 
A Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's Work
A Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's WorkA Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's Work
A Brief, Incomplete, and Mostly Wrong Introduction to Alan Turing's Work
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 

Applying Evolutionary Architecture on a Popular API

  • 2. Applying Evolutionary Architecture on a Popular API phil calçado @pcalcado http://philcalcado.com QCon London Session Code: 1603 Wednesday, March 6, 13
  • 5. > 50K registered client apps ~ 180 million users / month ~5 years old Wednesday, March 6, 13
  • 7. API controllers UI controllers domain logic Wednesday, March 6, 13
  • 9. API controllers UI controllers domain logic Wednesday, March 6, 13
  • 10. UI controllers internet API controllers domain logic Wednesday, March 6, 13
  • 11. a new platform while keeping the old one running? Wednesday, March 6, 13
  • 12. WARNING: THIS IS WORK IN PROGRESS and you can help us ;) http://bit.ly/work-at-soundcloud Wednesday, March 6, 13
  • 13. DO NOT BREAK CLIENT APPS Wednesday, March 6, 13
  • 14. separate application from domain Wednesday, March 6, 13
  • 15. Classic Next SoundCloud SoundCloud A set is a A set is a collection of collection of your own your own sounds sounds Wednesday, March 6, 13
  • 16. Classic Next SoundCloud SoundCloud A set is a A set is a collection of collection of your own your own sounds sounds SoundCloud API A set is a collection of sounds Wednesday, March 6, 13
  • 17. UI controllers internet API controllers domain logic Wednesday, March 6, 13
  • 18. UI controllers internet API controllers domain logic domain logic domain logic Wednesday, March 6, 13
  • 19. applications enforce their own business rules domain enforces “global” rules Wednesday, March 6, 13
  • 20. applications enforce their own business rules domain enforces “global” rules (accidents happen...) Wednesday, March 6, 13
  • 21. how to add/change features on the fly? Wednesday, March 6, 13
  • 22. attempt #1: identify “official” apps - too easy to spoof - abused by spammers - Android and iOS can’t easily rotate secrets Wednesday, March 6, 13
  • 23. attempt #2: namespace endpoints - “experimental” endpoints would link to regular ones but never be linked back - toyed with “lifted” hyperlinks, not enough time for launch Wednesday, March 6, 13
  • 24. attempt #3: just use feature flags - works ok for logged in users - system is a little monster now, and ruby is not very good with numbers. rewriting in scala Wednesday, March 6, 13
  • 25. SPLITTING THE MOTHERSHIP Wednesday, March 6, 13
  • 27. micro-services - couple thousands lines of code - mostly JVM-based, JRuby, Clojure and Scala - more about this at the SoundCoud pub night tomorrow: http:// lanyrd.com/2013/soundcloudpub/ (Walrus Pub Waterloo) Wednesday, March 6, 13
  • 28. HTTP+JSON & AMQP for most stuff - moving AMQP usage for event broadcasting, as opposed to messaging - no internal HTTP caching (yet?) Wednesday, March 6, 13
  • 29. make it easy to get stuff in prod - heroku-like deployment system - tending towards twitter stack (Finagle) for I/O Wednesday, March 6, 13
  • 30. URNs, not IDs soundcloud:sounds:123 Wednesday, March 6, 13
  • 31. URNs, not IDs - everything addressable has a URN, some have URLs - Mapping depends on context, e.g. given object may have a public URL and an internal URL Wednesday, March 6, 13
  • 32. <3 hypermedia - can easily remove things from the main app without breaking clients, just some HTTP 303s Wednesday, March 6, 13
  • 33. OPTIMISE ALL THE THINGS!!11! Wednesday, March 6, 13
  • 34. twitter moving back to server rendering...? Wednesday, March 6, 13
  • 35. not too bad, actually - besides load balancers vs. increase in number of requests per page http://backstage.soundcloud.com/2012/08/evolution-of-soundclouds- architecture/ Wednesday, March 6, 13
  • 36. the actual problems - number of requests from Next keeps increasing, page load affected - very different behaviour depending on the client app Wednesday, March 6, 13
  • 37. UI controllers internet API controllers domain logic domain logic domain logic Wednesday, March 6, 13
  • 38. UI controllers internet API controllers Wednesday, March 6, 13
  • 39. attempt #1: optmising proxy for clients UI controllers internet Proxy API controllers domain logic domain logic domain logic Wednesday, March 6, 13
  • 40. attempt #1: optmising proxy for clients - still leverage public API - API has to know about how things behave in different clients Wednesday, March 6, 13
  • 41. attempt #2: specialised back-end for official clients UI controllers internet Specialised API controllers Back-end domain logic domain logic domain logic Wednesday, March 6, 13
  • 42. attempt #2: specialised back-end for official clients - each official app has its own back- end facade - no rendering, just data - public API becomes just one of them - front-end heavy teams can just script a common core using JRuby Wednesday, March 6, 13
  • 44. what we are looking at - dataflow programming for the specialised back-ends - ProtocolBuffers for Android - make the mothership just a back- end service, not exposed to the Internet Wednesday, March 6, 13
  • 45. phil calçado http://philcalcado.com @pcalcado www.soundcloud.com Wednesday, March 6, 13