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

6 lessons learned scaling mobile at SoundCloud

6 lessons learned scaling mobile at SoundCloud

SoundCloud’s Android and iOS apps fast became our primary listening platforms. This talk will highlight the biggest things we’ve gotten right and wrong in the process. We’ll discuss how and when we’ve been able to share code, APIs and values. We also face many platform-specific challenges. We’ll compare and contrast some of the problems faced, patterns adopted and tools developed for one platform or the other.

Matej Balantič

March 17, 2016
Tweet

More Decks by Matej Balantič

Other Decks in Technology

Transcript

  1. Successive, well intentioned, changes to architecture throughout the lifetime of

    a project can lead to a fragmented and hard-to-maintain code base Lava layers
  2. • Legacy project by an external agency • Decision to

    start from scratch • Big bang release* * except iPad which got delayed iOS
  3. • Fresh start with code architecture • Away with legacy

    code once and for all • Innovation on hold for a while • Might need to sacrifice existing features → angry users Rewrite aftermath
  4. Empower teams • Everyone can ship to master* • Put

    the code behind a feature flag • Enable the feature once ready to ship * Pairing required. When working alone you need 2x on your pull request.
  5. Release train Feature development & QA Review / Public Beta

    Feature freeze Feature freeze Feature freeze
  6. Build time configuration "release": { "inherits_from": "adhoc", "dev_always_skippy": { "enabled":

    false } } "release": { "inherits_from": "adhoc", "dev_always_skippy": { "enabled": true } }
  7. “You break it, you buy fix it” • Continuous integration

    allows us to trust that we’re not breaking features • Good unit and acceptance tests as an insurance policy
  8. Mobile BFF: https://www.thoughtworks.com/insights/blog/bff-soundcloud Lava layer anti-pattern: http://mikehadlow.blogspot.de/2014/12/the-lava-layer-anti-pattern.html Branch by abstraction:

    http://martinfowler.com/bliki/BranchByAbstraction.html Command pattern: https://sourcemaking.com/design_patterns/command Android architecture: https://realm.io/news/gotocph-mattias-kappler-reactive-architecture-android Mobile CI @ SoundCloud: https://www.youtube.com/watch?v=Rq721qtKKNk Dependency Inversion Principle: http://martinfowler.com/articles/dipInTheWild.html References