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

    View Slide

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

    ● How to build an infra team

    ● Best practices

    View Slide

  3. What is an Android Infra Team?
    ● Focuses on Arch, CI and Tooling

    ● Customers are devs.

    View Slide

  4. Motivations
    Team

    Size
    Complexity

    View Slide

  5. Greenfield Phase
    ● Small team size

    ● Iterate quickly

    ● Minimal processes

    View Slide

  6. Motivations
    Team

    Size
    Complexity

    View Slide

  7. Scaling Up
    ● Larger team

    ● Developer Experience

    ● Tooling

    View Slide

  8. Scaling Problems
    ● Gradle build setup & build times

    View Slide

  9. Scaling Problems
    Teams
    Monorepo

    View Slide

  10. Scaling Problems
    Monorepo Gradle

    View Slide

  11. Gradle Setup
    ● 100+ Gradle Modules

    ● Gradle Plugins (KAPT)

    ● Library Dependencies

    View Slide

  12. Scenario
    ● Upgrade Gradle Plugin

    View Slide

  13. Scenario
    ● Upgrade Gradle Plugin

    ● Causes Out of Memory Exception

    View Slide

  14. Scenario
    ● Upgrade Gradle Plugin

    ● Causes Out of Memory Exception

    ● Effects whole team (Slows down development)

    View Slide

  15. Motivations for Infra
    ● Need to maintain Gradle setup

    ● Detect build regression

    View Slide

  16. Scaling Problems
    ● Gradle build setup & build times

    ● Architecture Fragmentation

    View Slide

  17. Scaling Problems
    Codebase

    View Slide

  18. Scaling Problems
    Codebase
    Legacy code

    View Slide

  19. Arch Fragmentation
    ● Legacy Architecture

    ● Example - MVC/MVP

    ● Older design patterns

    View Slide

  20. Arch Fragmentation
    Codebase
    Legacy code
    Feature A

    View Slide

  21. Arch Fragmentation
    Codebase
    Legacy code
    Feature A
    Feature B

    View Slide

  22. Motivations for Infra
    ● Uniform app arch

    ● Specify how to migrate legacy arch

    View Slide

  23. Building Infra Team

    View Slide

  24. Team Charter
    ● Ownership areas

    View Slide

  25. Ownership Areas
    ● Architecture

    ● Shared Libraries

    ● Build tools (Gradle, Buck, Basel)

    ● CI

    View Slide

  26. Ownership Areas
    Team

    Size
    Complexity
    100+

    View Slide

  27. Ownership Areas
    Infra Org

    View Slide

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

    View Slide

  29. Ownership Areas
    Team

    Size
    Complexity
    30+

    View Slide

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

    View Slide

  31. Challenges
    ● Diverse skill set

    View Slide

  32. CI
    ● How to build pipelines

    ● Jenkins or CircleCI

    ● Setting up automation

    View Slide

  33. Challenges
    ● Diverse skill set

    ● Prioritizing

    View Slide

  34. Ownership Areas
    ● Architecture

    ● Shared Libraries

    ● Build tools (Gradle, Buck, Basel)

    ● CI

    View Slide

  35. Team Charter
    ● Ownership areas

    ● Key Performance Indicators (KPIs)

    View Slide

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

    View Slide

  37. Service Level Objectives
    ● Build times

    ● Infra for performance metrics

    ● Infra for network metrics

    View Slide

  38. Service Level Objectives
    Codebase
    Feature A
    Feature B
    Feature C

    View Slide

  39. Scenario
    9:41
    ● Scroll performance

    ● Network Latency

    View Slide

  40. Service Level Objectives
    Platform
    Monitoring

    View Slide

  41. Team Charter
    ● Ownership areas

    ● Key Performance Indicators (KPIs)

    ● Objectives and key results

    View Slide

  42. Objectives & Key Results (OKRs)
    ● Top down approach

    ● Bottom up approach

    View Slide

  43. Objectives & Key Results (OKRs)
    ● Determine important problems to solve

    ● Prioritize

    View Slide

  44. Team Surveys
    ● Challenges

    ● Build times

    ● Architecture

    ● Testing

    View Slide

  45. Building Roadmap
    Team survey
    OKRs & Priotrize projects
    Execute

    View Slide

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

    ● Reduce onboarding to 10th commit

    ● Refactor navigation

    View Slide

  47. Team Charter
    ● Ownership areas

    ● Key Performance Indicators (KPIs)

    ● Objectives and key results

    View Slide

  48. Best Practices

    View Slide

  49. Best practices
    ● Feedback

    View Slide

  50. Acquisitions
    Feature
    Teams
    Infra Team
    Continous

    Feedback

    View Slide

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

    View Slide

  52. Planning
    Review acquisitions
    Priortrize/Plan
    Setup Roadmap

    View Slide

  53. Bi-Weekly Updates
    Feature
    Teams
    Infra Team
    Digests

    View Slide

  54. Bi-Weekly Digests
    ● Project Status

    ● Improvements

    ● Infra Asistance

    View Slide

  55. Example
    ● Improved Gradle build times by 10%

    ● Created tools to improve dev workflow

    ● Assisted in project

    View Slide

  56. Best practices
    ● Feedback

    ● Expectations

    View Slide

  57. OKRs
    ● Not every OKR can have a metric

    View Slide

  58. OKRs
    ● Not every OKR can have a metric

    ● Continuous team survey feedback

    View Slide

  59. Best practices
    ● Feedback

    ● Expectations

    ● Setup processes for using new tech

    View Slide

  60. Introducing New Libraries
    Request for Comments Proposal

    View Slide

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

    View Slide

  62. Introducing New Libraries
    Request for Comments Proposal
    Reviewed by Infra
    Approval & Follow up

    View Slide

  63. Best practices
    ● Feedback

    ● Expectations

    ● Setup processes for infra

    ● Automate best practices

    View Slide

  64. Automate Best Practices
    ● Static Code Analysis

    ● Custom lint rules

    View Slide

  65. Best practices
    ● Feedback

    ● Expectations

    ● Setup processes

    ● Automate best practices

    ● Open source libraries

    View Slide

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

    View Slide

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

    View Slide

  68. Open Source libraries (Infra ownership)
    ● Gradle tools

    ● Custom Lint repo

    ● Arch frameworks

    View Slide

  69. Open Source libraries
    ● Prioritize OSS issues in planning

    ● Setup milestones for releases

    View Slide

  70. Best practices
    ● Feedback

    ● Expectations

    ● Setup processes for new tech

    ● Automate best practices

    ● Open source libraries

    View Slide

  71. Building Android Infra Teams at Scale
    ● Purpose & Motivations

    ● How to build an infra team

    ● Best practices

    View Slide

  72. Thank You!
    www.codingwithmohit.com
    @heyitsmohit

    View Slide