Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Evolving from a monolithic to a distributed public API

Chris
December 04, 2012

Evolving from a monolithic to a distributed public API

API Days 2012

Chris

December 04, 2012
Tweet

More Decks by Chris

Other Decks in Programming

Transcript

  1. Evolving from a monolithic to a distributed public API
    - API Days 2012

    View Slide

  2. Chris O'Dell
    Current API Team Lead Developer
    @ChrisAnnODell
    Hibri Marzook
    Senior Developer/ Former API Team Lead
    @Hibri

    View Slide


  3. Providers of open access to the broadest catalogue of fully licensed,
    high quality digital music

    Over 22 million legal, high quality tracks

    Open to consumers, partners and developers
    Who are 7digital?

    View Slide


  4. Started as a side project providing access to our catalogue

    Features driven by client demand

    A single monolithic API application

    Written in C# .Net WebForms

    Lots of shared libraries with other applications

    Single team working on the API
    Where we came from

    View Slide

  5. View Slide

  6. How do we scale ?

    View Slide


  7. Architectural shift to SOA-ish

    Make monolithic API route to smaller focussed internal APIs.
    Changing for scale

    View Slide


  8. Move code from main API codebase to new internal APIs.

    Rewrite where possible

    External consumers did not see any change in behaviour

    Slow evolution, not a big rewrite.
    Making the change

    View Slide


  9. Smaller, focused teams

    Assigned Product Managers for each product and team

    Reduced size of work items

    Introduced Kanban

    Change technology stack behind the public facing API
    Changing how we work

    View Slide


  10. Shared libraries gradually being replaced by internal APIs

    A skeleton of the monolith remains as the public façade for routing
    requests

    Able to deploy each API individually

    Each API can employ specific caching and scaling strategies

    Independent and multiple technology stacks – Windows & Linux

    More chaos.
    Where we are now

    View Slide

  11. View Slide

  12. How do we deal with
    the chaos ?

    View Slide


  13. Increase testability.

    Small projects with little code are easier to build and maintain.

    Invested in time and tools to automate build and deployment.

    We now have single click deployment.

    We average 50 production releases in a week

    Changes can be tested and deployed in under an hour

    Metrics. Measure things. We use NewRelic and Statsd
    Limit the impact of chaos

    View Slide

  14. We build our own applications using the API
    • 7digital.com, built by internal teams
    • Mobile apps built by 3rd parties working for us
    • Dev teams focus on building the platform
    Dogfooding

    View Slide

  15. We don't build internal
    tools
    - we build APIs

    View Slide

  16. • Tools are built on top of APIs
    • Every business process can now be monetized
    • Don't implement an API until it is needed
    Build the platform

    View Slide


  17. Language and platform agnostic

    Gave us more breadth and exposure across the market.

    Open protocols, HTTP, OAuth 1.0 (yes we hate it too)

    https://github.com/7digital
    Open Platform, Open Source

    View Slide

  18. We are not a startup
    any more

    View Slide

  19. Samsung, Microsoft, Blackberry and many more...
    Who is building on our open platform

    View Slide

  20. Interested in working with us ?
    - or learning more ? Come talk to us
    Sign up for a free public API Key
    - http://developer.7digital.net/
    We are hiring
    - http://about.7digital.com/jobs/
    @ChrisAnnODell @Hibri

    View Slide