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

Avito Mobile: State of the Union

Egor Tolstoy
November 17, 2018
81

Avito Mobile: State of the Union

Размер имеет значение. Это верно и для приложения Авито, которое разрабатывается сразу несколькими десятками независимых кроссфункциональных команд, в каждой из которых есть по несколько iOS разработчиков. За последние пару лет мы столкнулись с различными проблемами масштаба, часть из которых получилось успешно решить. В докладе я поделюсь техниками и советами, которые позволяют нам удерживать качество продукта на высоком уровне и стабильно релизиться раз в 2 недели, одновременно с этим предоставляя максимальную свободу разработчикам в выборе архитектуры и пути решения их проблем.

Egor Tolstoy

November 17, 2018
Tweet

Transcript

  1. Avito Mobile

    State of the Union
    INSERT COIN TO CONTINUE

    View full-size slide

  2. PAGE 03/51
    Backend
    Mobile
    Frontend
    Product
    Designer
    QA

    View full-size slide

  3. PAGE 04/51
    Unit Seller Unit Mnz

    View full-size slide

  4. PAGE 05/51
    Unit Seller
    Make sellers happy
    +15% items
    -34s create item

    View full-size slide

  5. PAGE 06/51
    Unit Mnz
    Make more money
    +40% $ from vas

    +35% $ from ads

    View full-size slide

  6. PAGE 07/51
    Mnz
    Seller
    Buyer
    Billing
    Growth

    View full-size slide

  7. PAGE 08/51
    > Stop the release, I'm
    finishing a feature
    > I don't want to use VIPER
    > App start up time is not my
    problem

    View full-size slide

  8. PAGE 09/51
    Product units
    > Work for end
    users
    Platform units
    > Work for
    product teams

    View full-size slide

  9. > Releases
    > Architecture
    > Performance
    PAGE 10/51

    View full-size slide

  10. PAGE 11/51
    > Releases
    > Architecture
    > Performance

    View full-size slide

  11. PAGE 12/51
    ft.A
    Unit 1
    Unit 2
    Unit 3
    Release 1
    ft.C
    ft.D ft.E

    View full-size slide

  12. PAGE 13/51
    ft.A
    ft.C
    ft.D
    ft.E
    Unit 1
    Unit 2
    Unit 3
    Unit 3
    Unit 1
    Unit 2
    Unit 3 Release 1
    ft.B
    ft.F
    ft.G
    ft.H
    Release 2
    ftI

    View full-size slide

  13. PAGE 15/51
    feature
    freeze
    1st
    regress
    end
    2nd
    regress
    end
    staging
    release
    > Release cycle

    View full-size slide

  14. PAGE 16/51
    Criteria:
    1. Closed in Jira
    2. Tested
    3. Has feature toggle
    > ... - feature freeze

    View full-size slide

  15. PAGE 17/51
    Automation:
    1. Git+Jira
    2. Feature Toggle config
    3. Slack mentions
    4. Branch cut
    > ... - feature freeze

    View full-size slide

  16. PAGE 18/51
    > feature freeze - 1st regress end
    Unit tests
    Component tests
    E2E tests
    Manual tests
    1. Regression test suite
    is run
    2. Each unit performs
    impact analysis
    3. Each unit manually
    tests its features
    4. P0/P1 bugs are fixed
    or features are
    disabled

    View full-size slide

  17. PAGE 19/51
    > 1st regress end - 2nd regress end
    Unit tests
    Component tests
    E2E tests
    Manual tests
    1. Regression test suite
    is run
    2. Impact analysis for
    fixed bugs
    3. Broken features are
    disabled

    View full-size slide

  18. PAGE 20/51
    > 2nd regress end - staging
    1.Roll out for 1% users
    2.Automatically watch for
    crashes & metrics
    3.Hotfix if necessary

    View full-size slide

  19. PAGE 21/51
    > staging - release
    1.Manual roll out
    2.Anomaly detection
    3.Hotfix if P0 bug

    View full-size slide

  20. PAGE 22/51
    > Release cycle
    1. Release
    automation
    2. CI/CD hacks
    3. Tooling

    View full-size slide

  21. PAGE 23/51
    30
    200
    700
    860
    Q1 Q2 Q3 now
    > E2E Testing
    Began automatisation in Q4'2017
    Currently 860 UI test methods
    3 devices
    2610 tests in regress suite

    View full-size slide

  22. PAGE 24/51
    Our tooling
    - XCUITest
    - Wrapper (MixBox)
    - Test runner (Emcee)
    > E2E Testing

    View full-size slide

  23. PAGE 25/51
    Who write tests
    - Manual QA
    - Engineers
    > E2E Testing
    65%

    QA
    35%

    engs

    View full-size slide

  24. PAGE 26/51
    1. Why XCUITest
    2. Millions of
    hacks
    3. MixBox
    > E2E Testing

    View full-size slide

  25. PAGE 27/51
    1. Infrastructure
    2. Running tests
    in parallel
    3. Simulators
    > E2E Testing

    View full-size slide

  26. PAGE 28/51
    > Releases
    > Architecture
    > Performance

    View full-size slide

  27. PAGE 29/51
    > Tragedy of Commons

    View full-size slide

  28. PAGE 30/51
    > Monolithic Architecture
    Problems
    - Build time
    - Responsibility scopes
    - Impact analysis

    View full-size slide

  29. PAGE 31/51
    > Modular Architecture

    View full-size slide

  30. PAGE 32/51
    > Modular Architecture
    Core layer
    - Networking
    - Routing
    - Deeplinking
    - Persistance
    - Logging
    - etc

    View full-size slide

  31. PAGE 33/51
    > Modular Architecture
    module 1
    module 2
    module 3
    module 4

    View full-size slide

  32. PAGE 34/51
    > Modular Architecture
    Feature consists of
    - Code modules
    - UI
    - Network requests
    - Persistance requests
    - Models
    - Navigation

    View full-size slide

  33. PAGE 35/51
    > Modular Architecture

    View full-size slide

  34. PAGE 36/51
    > Modular Architecture
    Mediator layer
    - Module interfaces
    - Service interfaces
    - Models

    View full-size slide

  35. PAGE 37/51
    > Modular Architecture
    Metrics
    - 150 modules
    - 9 months for transition
    - Clean build: 635 -> 438s
    - Incremental build: 65 -> 15s

    View full-size slide

  36. PAGE 38/51
    > Modular Architecture
    How we use it
    - Each module has its owner
    - Demo apps out of the box
    - Module lazy load
    - Module quality checks: usage, contributors,
    build time, etc

    View full-size slide

  37. PAGE 39/51
    1. Architecture
    details
    2. Transition
    process
    3. Experiments
    4. Usage
    > Modular Architecture
    evgeniy
    suvorov

    View full-size slide

  38. PAGE 40/51
    > Releases
    > Architecture
    > Performance

    View full-size slide

  39. PAGE 41/51
    App performance affects business
    metrics.
    > Hypothesis

    View full-size slide

  40. PAGE 42/51
    5% of daily audience, each group - 1%
    - A,B - control groups
    - C - +2s delay
    - D - +4s delay
    - E - +6s delay
    > Experiments

    View full-size slide

  41. PAGE 43/51
    1. Performance affects bounce rate
    2. Hygienic minimum - 4s
    3. Most problems in regions
    4. [Web] 1s of speed up -> 0,2-4% business
    metrics
    > Results

    View full-size slide

  42. PAGE 44/51
    > Avito - daily use service
    Our target:
    - Cold start - 1,5s
    - Screen first paint - 0,1s
    - Screen first interactive - 0,5s
    - Scrolling - 60fps

    View full-size slide

  43. PAGE 45/51
    > Performance
    Monitoring Culture
    Optimisations

    View full-size slide

  44. PAGE 46/51
    > Optimisations
    1. Modules lazy loading
    2. Network optimisations
    3. Lazy DI
    4. Lazy tabs creation
    5. DI without reflection

    View full-size slide

  45. PAGE 47/51
    > Monitoring

    View full-size slide

  46. PAGE 48/51
    > Monitoring
    init
    load
    parse
    draw

    View full-size slide

  47. PAGE 49/51
    > Culture
    1. Internal meetups
    2. Competitors dashboards
    3. All screens dashboards
    4. Success stories
    5. Trending

    View full-size slide

  48. > Releases
    > Architecture
    > Performance
    PAGE 50/51

    View full-size slide

  49. Egor Tolstoy
    > Avito Mobile
    many features
    many developers
    many challenges
    Avito
    t.me/etolstoy

    View full-size slide