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

Building Android Infrastructure Teams at Scale

Building Android Infrastructure Teams at Scale

Mohit S

May 05, 2022
Tweet

More Decks by Mohit S

Other Decks in Programming

Transcript

  1. Mohit Sarveiya Building Android Infra Teams at Scale @heyitsmohit

  2. Building Android Infra Teams at Scale • Purpose & Motivations

    • How to build an infra team • Best practices
  3. What is an Android Infra Team? • Focuses on Arch,

    CI and Tooling • Customers are devs.
  4. Motivations Team 
 Size Complexity

  5. Greenfield Phase • Small team size • Iterate quickly •

    Minimal processes
  6. Motivations Team 
 Size Complexity

  7. Scaling Up • Larger team • Developer Experience • Tooling

  8. Scaling Problems • Gradle build setup & build times

  9. Scaling Problems Teams Monorepo

  10. Scaling Problems Monorepo Gradle

  11. Gradle Setup • 100+ Gradle Modules • Gradle Plugins (KAPT)

    • Library Dependencies
  12. Scenario • Upgrade Gradle Plugin

  13. Scenario • Upgrade Gradle Plugin • Causes Out of Memory

    Exception
  14. Scenario • Upgrade Gradle Plugin • Causes Out of Memory

    Exception • Effects whole team (Slows down development)
  15. Motivations for Infra • Need to maintain Gradle setup •

    Detect build regression
  16. Scaling Problems • Gradle build setup & build times •

    Architecture Fragmentation
  17. Scaling Problems Codebase

  18. Scaling Problems Codebase Legacy code

  19. Arch Fragmentation • Legacy Architecture • Example - MVC/MVP •

    Older design patterns
  20. Arch Fragmentation Codebase Legacy code Feature A

  21. Arch Fragmentation Codebase Legacy code Feature A Feature B

  22. Motivations for Infra • Uniform app arch • Specify how

    to migrate legacy arch
  23. Building Infra Team

  24. Team Charter • Ownership areas

  25. Ownership Areas • Architecture • Shared Libraries • Build tools

    (Gradle, Buck, Basel) • CI
  26. Ownership Areas Team 
 Size Complexity 100+

  27. Ownership Areas Infra Org

  28. Ownership Areas Infra Org CI Arch Dev Ex Build Tools

    Teams
  29. Ownership Areas Team 
 Size Complexity 30+

  30. Ownership Areas Infra Org Single Team (CI, Arch, Build Tools)

    Teams
  31. Challenges • Diverse skill set

  32. CI • How to build pipelines • Jenkins or CircleCI

    • Setting up automation
  33. Challenges • Diverse skill set • Prioritizing

  34. Ownership Areas • Architecture • Shared Libraries • Build tools

    (Gradle, Buck, Basel) • CI
  35. Team Charter • Ownership areas • Key Performance Indicators (KPIs)

  36. Key Performance Indicators (KPIs) • Service Level Objectives

  37. Service Level Objectives • Build times • Infra for performance

    metrics • Infra for network metrics
  38. Service Level Objectives Codebase Feature A Feature B Feature C

  39. Scenario 9:41 • Scroll performance • Network Latency

  40. Service Level Objectives Platform Monitoring

  41. Team Charter • Ownership areas • Key Performance Indicators (KPIs)

    • Objectives and key results
  42. Objectives & Key Results (OKRs) • Top down approach •

    Bottom up approach
  43. Objectives & Key Results (OKRs) • Determine important problems to

    solve • Prioritize
  44. Team Surveys • Challenges • Build times • Architecture •

    Testing
  45. Building Roadmap Team survey OKRs & Priotrize projects Execute

  46. Examples OKRs • Improve local build times by 10% •

    Reduce onboarding to 10th commit • Refactor navigation
  47. Team Charter • Ownership areas • Key Performance Indicators (KPIs)

    • Objectives and key results
  48. Best Practices

  49. Best practices • Feedback

  50. Acquisitions Feature Teams Infra Team Continous 
 Feedback

  51. Acquisitions Improvement POC Details Serialization Performance Feature Team A Feature

    Team B
  52. Planning Review acquisitions Priortrize/Plan Setup Roadmap

  53. Bi-Weekly Updates Feature Teams Infra Team Digests

  54. Bi-Weekly Digests • Project Status • Improvements • Infra Asistance

  55. Example • Improved Gradle build times by 10% • Created

    tools to improve dev workflow • Assisted in project
  56. Best practices • Feedback • Expectations

  57. OKRs • Not every OKR can have a metric

  58. OKRs • Not every OKR can have a metric •

    Continuous team survey feedback
  59. Best practices • Feedback • Expectations • Setup processes for

    using new tech
  60. Introducing New Libraries Request for Comments Proposal

  61. Introducing New Libraries Request for Comments Proposal Reviewed by Infra

  62. Introducing New Libraries Request for Comments Proposal Reviewed by Infra

    Approval & Follow up
  63. Best practices • Feedback • Expectations • Setup processes for

    infra • Automate best practices
  64. Automate Best Practices • Static Code Analysis • Custom lint

    rules
  65. Best practices • Feedback • Expectations • Setup processes •

    Automate best practices • Open source libraries
  66. Open source libraries Team B Team A Team C Distribute

    ownership
  67. Open source libraries Team B Team A Team C Distribute

    ownership SDK
  68. Open Source libraries (Infra ownership) • Gradle tools • Custom

    Lint repo • Arch frameworks
  69. Open Source libraries • Prioritize OSS issues in planning •

    Setup milestones for releases
  70. Best practices • Feedback • Expectations • Setup processes for

    new tech • Automate best practices • Open source libraries
  71. Building Android Infra Teams at Scale • Purpose & Motivations

    • How to build an infra team • Best practices
  72. Thank You! www.codingwithmohit.com @heyitsmohit