"Scaling an app to 175 million users" by Matej Balantič

"Scaling an app to 175 million users" by Matej Balantič

SoundCloud's mobile apps fast became their primary listening platform. This talk will highlight the biggest challenges SoundCloud iOS team faced scaling their app and the team to where they are today and the biggest things they’ve gotten right and wrong in the process.
Matej will discuss what were the high level ideas that allowed the team to scale, but will also dive deep and share some practical examples that any growing team can adapt.

This talk was made for CocoaHeads Kyiv #11 which took place March 04 2017.

Db84cf61fdada06b63f43f310b68b462?s=128

CocoaHeads Ukraine

March 09, 2017
Tweet

Transcript

  1. None
  2. @skavt matej@soundcloud.com Scaling an app 
 to 175 million users

    Kyiv, March 2017
  3. Matej Balantič Engineering Manager, Core Clients Coding professionally for 10

    years Started with backend / PHP 5 years ago —> mobile/iOS Experimenting with management for the last 6 months Core Clients = build tools & libraries to make client engineers more productive
  4. None
  5. SoundCloud iOS app history Show project name and launch date

    2008 2009 2010 2011 2012 2013 2014 2016 2015 2016 2017 Milestone iPhone app released Agency Team of 6 Team of 15 1 MIO 175 
 MIO 10 MIO Release of rewrite
  6. IOS TEAM TODAY

  7. Team 4 Team 3 Core Team 2 Team 1 Team

    1 Team 2 Core Team 3 Team 4 iOS collective 5 independent teams 15 iOS engineers 2 locations Plans for 2017: double the team
  8. How busy is it?

  9. IOS PROJECT TODAY

  10. None
  11. None
  12. Test & Build Clean build time =~ 15 minutes 13k

    unit tests that run ~5 minutes 400 acceptance tests that run ~15 minutes CI pipeline = 40 macOS nodes on 20 Mac Minis
  13. None
  14. SUSTAINABLE GROWTH

  15. Sustainable growth

  16. Sustainable growth

  17. Sustainable growth Iteration [ GOOD ] Productivity [ CHEAP ]

    Onboarding [ FAST ]
  18. PRODUCTIVITY 1

  19. TEAM STRUCTURE

  20. Team structure The challenge

  21. Team structure The idea

  22. Team structure The reality

  23. Team structure The reality

  24. Code authors Temporal relationship between authors

  25. BUILD TIMES

  26. None
  27. - myself Shaving off 1 minute build time saves some

    time and tons of frustration
  28. None
  29. Track Search Player Project structure

  30. Application Project structure Track Search Player

  31. None
  32. Framework Framework Project structure Framework Track Search Player Application

  33. Framework Framework Project structure Framework Track Search Player Application

  34. Framework Framework Project structure Framework Track Search Player Application

  35. Framework Framework Project structure Framework Track Search Player Application

  36. Project structure Framework Framework Framework Track Search Player Application

  37. Project structure DEFINITIONS FRAMEWORK Framework Framework Framework Track Search Player

    Application
  38. Project structure DEFINITIONS FRAMEWORK Framework Framework Framework Track Search Player

    Application
  39. Project structure DEFINITIONS FRAMEWORK Framework Framework Framework Track Search Player

    Application
  40. Project structure DEFINITIONS FRAMEWORK Framework Framework Framework Track Search Player

    Application
  41. Project structure DEFINITIONS FRAMEWORK Framework Framework Framework Track Search Player

    Application
  42. ONBOARDING 2

  43. July interview September joined the team December becomes productive Case

    study: 3 months to productivity
  44. Self-onboarding

  45. Playgrounds

  46. Playgrounds

  47. ITERATION 3

  48. TRUNK BASED DEVELOPMENT

  49. alwaysagileconsulting.com A version control strategy in which developers commit their

    changes to the shared trunk of a source code repository with minimal branching Trunk based development
  50. Trunk based development

  51. Trunk based development

  52. FEATURE FLAGS

  53. { "development": { "dev_important_task": { "enabled": true, "description": "Super new

    experimental feature" }, "dev_some_other_task": { "enabled": true, "description": "Some other not so experimental feature" } }, "production": { "dev_important_task": { "enabled": false
 } } } 1. Add feature to JSON
  54. 2. Run script

  55. 2. Run script

  56. public class ImportantService { public func importantTask() { guard FeatureFlagService.isDevImportantTaskEnabled()

    else { return } doImportantTask() } // MARK: Private private func doImportantTask() { // ... } } 3. Use in code
  57. public class ImportantService { public func importantTask() { guard FeatureFlagService.isDevImportantTaskEnabled()

    else { return } doImportantTask() } // MARK: Private private func doImportantTask() { // ... } } 3. Use in code
  58. 4. Profit

  59. None
  60. None
  61. None
  62. . Slides
 bit.ly/kyiv-cocoa @skavt
 matej@soundcloud.com THANK YOU! Questions?

  63. . Framework Oriented Programming
 http://frameworkoriented.io CodeScene
 https://codescene.io REFERENCES