mobile @ facebook - qconsf 2013

103
Mobile @ Facebook Christian Legnitto ([email protected] ) Mobile release engineering

Upload: christian-legnitto

Post on 18-Nov-2014

1.678 views

Category:

Technology


2 download

DESCRIPTION

Mobile @ Facebook - QConSF 2013

TRANSCRIPT

Page 1: Mobile @ Facebook - QConSF 2013

Mobile @ Facebook

Christian Legnitto ([email protected])Mobile release engineering

Page 2: Mobile @ Facebook - QConSF 2013

Who is this guy?

Page 3: Mobile @ Facebook - QConSF 2013

Who is this guy?

Facebook• Manage Mobile Release Engineering

• I’m hiring

• Run the iOS and Android releases

• Ran Facebook.com web pushes for ~3 months

Page 4: Mobile @ Facebook - QConSF 2013

Who is this guy?

Facebook

Mozilla

• Manage Mobile Release Engineering

• I’m hiring

• Run the iOS and Android releases

• Ran Facebook.com web pushes for ~3 months

• Firefox release manager

• Helped design & implement 6 week releases

• Desktop ( 3 platforms ) & mobile ( Android )

• Still a community member

Page 5: Mobile @ Facebook - QConSF 2013

Who is this guy?

Facebook

• Jaguar → Lion updates

• OS X pre-release updates

• Safari, Xcode, Java, iApps

• Build system, scrubber, PM tools

Mozilla

Apple

• Manage Mobile Release Engineering

• I’m hiring

• Run the iOS and Android releases

• Ran Facebook.com web pushes for ~3 months

• Firefox release manager

• Helped design & implement 6 week releases

• Desktop ( 3 platforms ) & mobile ( Android )

• Still a community member

Page 6: Mobile @ Facebook - QConSF 2013
Page 7: Mobile @ Facebook - QConSF 2013

874,000,000 MAUs

507,000,000 DAUs

Page 8: Mobile @ Facebook - QConSF 2013
Page 9: Mobile @ Facebook - QConSF 2013

native & web

supports iOS6+

iPads & iPhones

Page 10: Mobile @ Facebook - QConSF 2013
Page 11: Mobile @ Facebook - QConSF 2013

+1M beta testers

+20K alpha

testers

native & web

supports Froyo+

15 apks

Page 12: Mobile @ Facebook - QConSF 2013
Page 13: Mobile @ Facebook - QConSF 2013
Page 14: Mobile @ Facebook - QConSF 2013

How we USED to develop

Page 15: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

. . . . . .

Messages team

Events team

Photos team

Android core team

iOS core team

Page 16: Mobile @ Facebook - QConSF 2013

Doesn’t SCALE

Page 17: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

Messages team

Events team

Photos team

Android core team

iOS core team

Page 18: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

20

10

30

20

20

Messages team

Events team

Photos team

Android core team

iOS core team

Page 19: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

20

10

30

20

20

Messages team

Events team

Photos team

Android core team

iOS core team

(numbers made up)

Page 20: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

20

10

30

20

20

Messages team

Events team

Photos team

Android core team

iOS core team

Page 21: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

20

10

30

20

20

Messages team

Events team

Photos team

Android core team

iOS core team

Page 22: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

2010

30

20

20

Messages team

Events team

Photos team

Android core team

iOS core team

Page 23: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

201030

20

20

Messages team

Events team

Photos team

Android core team

iOS core team

60

Page 24: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

201030 20

20

Messages team

Events team

Photos team

Android core team

iOS core team

60

Page 25: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

201030 20 20

Messages team

Events team

Photos team

Android core team

iOS core team

60

Page 26: Mobile @ Facebook - QConSF 2013

Doesn’t produce the BEST product

Page 27: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

Messages team

Events team

Photos team

Android core team

iOS core team

Page 28: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

Messages team

Events team

Photos team

Android core team

iOS core team

product experts

Page 29: Mobile @ Facebook - QConSF 2013

Mobile core team owned mobile

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

Messages team

Events team

Photos team

Android core team

iOS core team

product experts platform experts

Page 30: Mobile @ Facebook - QConSF 2013

How we USED to ship

Page 31: Mobile @ Facebook - QConSF 2013

Feature-based releases

Page 32: Mobile @ Facebook - QConSF 2013

Feature-based releases

Decide on features

Page 33: Mobile @ Facebook - QConSF 2013

Feature-based releases

Decide on features

Furiously work on them

Page 34: Mobile @ Facebook - QConSF 2013

Feature-based releases

Decide on features

Furiously work on them

Test

Page 35: Mobile @ Facebook - QConSF 2013

Feature-based releases

Decide on features

Furiously work on them

Test

Ship when all features are done

Page 36: Mobile @ Facebook - QConSF 2013

All features are PRIORITY #1

Page 37: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Decide on features

Page 38: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Decide on features

1. Emoji 2. Green dot 3. Naming convos

Page 39: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Decide on features

1. Emoji 2. Green dot 3. Naming convos

1. Reply inline 2. Birthday reminder 3. Gifts integration

Page 40: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Decide on features

1. Emoji 2. Green dot 3. Naming convos

1. Reply inline 2. Birthday reminder 3. Gifts integration

1. Automatic upload 2. Tag suggestions 3. Change cover photo

Page 41: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji 2. Green dot 3. Naming convos

1. Reply inline 2. Birthday reminder 3. Gifts integration

1. Automatic upload 2. Tag suggestions 3. Change cover photo

Page 42: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji 2. Green dot 3. Naming convos

1. Reply inline 2. Birthday reminder 3. Gifts integration

1. Automatic upload 2. Tag suggestions 3. Change cover photo

1. Emoji1. Reply inline1. Automatic upload

Page 43: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji 2. Green dot 3. Naming convos

1. Reply inline 2. Birthday reminder 3. Gifts integration

1. Automatic upload 2. Tag suggestions 3. Change cover photo

1. Emoji1. Reply inline1. Automatic upload

2. Green dot2. Birthday reminder2. Tag suggestions

Page 44: Mobile @ Facebook - QConSF 2013

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji 2. Green dot 3. Naming convos

1. Reply inline 2. Birthday reminder 3. Gifts integration

1. Automatic upload 2. Tag suggestions 3. Change cover photo

1. Emoji1. Reply inline1. Automatic upload

2. Green dot2. Birthday reminder2. Tag suggestions

3. Naming convos 3. Gifts integration3. Change cover photo

Page 45: Mobile @ Facebook - QConSF 2013

The market and company CHANGES RAPIDLY

Page 46: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 47: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 48: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 49: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 50: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 51: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 52: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 53: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 54: Mobile @ Facebook - QConSF 2013

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

. . .

Decide on features

1. Emoji2. Reply inline3. Automatic upload

4. Green dot5. Birthday reminder6. Tag suggestions

7. Naming convos 8. Gifts integration9. Change cover photo

Page 55: Mobile @ Facebook - QConSF 2013

Don’t know when code SHIPS

Page 56: Mobile @ Facebook - QConSF 2013

Can’t judge risk vs rewardFeature-based releases

Page 57: Mobile @ Facebook - QConSF 2013

Can’t judge risk vs rewardFeature-based releases

80% done?

Page 58: Mobile @ Facebook - QConSF 2013

Can’t judge risk vs rewardFeature-based releases

Good enough80% done?

Page 59: Mobile @ Facebook - QConSF 2013

Confuses DEV and RELEASE

Page 60: Mobile @ Facebook - QConSF 2013

Development processCreate the best product possible

→ Focus on improving

Page 61: Mobile @ Facebook - QConSF 2013

Development processCreate the best product possible

→ Focus on improving

Release processShip finished work in a timely manner

→ Focus on not regressing

Page 62: Mobile @ Facebook - QConSF 2013

Took lessons learned from DESKTOP WEB and applied

them to MOBILE

Page 63: Mobile @ Facebook - QConSF 2013

How we develop NOW

Page 64: Mobile @ Facebook - QConSF 2013

Old and busted

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Android

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

iOS

. . . . . .

Messages team

Events team

Photos team

Android core team

iOS core team

Page 65: Mobile @ Facebook - QConSF 2013

New hotness

. . .

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Desktop Web Android iOS

. . . . . .

Messages team

Events team

Photos team

Android core team

iOS core team

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Photo picker

Photo albums

Chat

Group messages

Upcoming events

Birthdays

Page 66: Mobile @ Facebook - QConSF 2013

iOS and AndroidEngineers committing mobile code

Page 67: Mobile @ Facebook - QConSF 2013

How we ship NOW

Page 68: Mobile @ Facebook - QConSF 2013

featuresqualityschedule

Page 69: Mobile @ Facebook - QConSF 2013

pick 2featuresqualityschedule

Page 70: Mobile @ Facebook - QConSF 2013

pick 2featuresqualityschedule

Page 71: Mobile @ Facebook - QConSF 2013

Rule #1Date-based releases

We ship on time

Page 72: Mobile @ Facebook - QConSF 2013

Rule #2Date-based releases

Make usersno worse off

Page 73: Mobile @ Facebook - QConSF 2013

Rule #3Date-based releases

There’s alwaysthe next one

Page 74: Mobile @ Facebook - QConSF 2013

Rule #4Date-based releases

Retreat to safety

Page 75: Mobile @ Facebook - QConSF 2013

4 weeks of development

master

3.5 weeks of stabilization

4 weeks of development

native mobile

release branch

Automated cut every 4 weeks

RC

Page 76: Mobile @ Facebook - QConSF 2013

1 week of development

trunk

Stabilize

1 week of development

desktop web

Weekly Twice Daily

release branch

Automated cut every 1 week

Release branch

Page 77: Mobile @ Facebook - QConSF 2013

4 weeks of development

master

3.5 weeks of stabilization

4 weeks of development

native mobile

release branch

Automated cut every 4 weeks

RC

Page 78: Mobile @ Facebook - QConSF 2013

master

native mobile

release branch

Dogfooding

Page 79: Mobile @ Facebook - QConSF 2013

How we write CODE

Page 80: Mobile @ Facebook - QConSF 2013

GitSource control

>300 engineers

>150,000 files

>100,000 commits

Page 81: Mobile @ Facebook - QConSF 2013

PhabricatorCode review

Page 82: Mobile @ Facebook - QConSF 2013
Page 83: Mobile @ Facebook - QConSF 2013

BuildbotContinuous integration

Facebooki386Builds Facebook

armMessenger

armMessenger

i386 ...

Lint / static analysis regex clang android findbugs ...

Tests OCUnit JUnitsnapshot robolectric ...

https://github.com/facebook/ios-snapshot-test-case

Page 84: Mobile @ Facebook - QConSF 2013

BuildbotContinuous integration

Before diff(optional)

Create diff(mandatory)

Diff updated(mandatory)

Landing queue(optional)

Git commit(mandatory)

Page 85: Mobile @ Facebook - QConSF 2013

Mac minisContinuous integration

Page 86: Mobile @ Facebook - QConSF 2013

Android

Page 87: Mobile @ Facebook - QConSF 2013

Buck - build toolBuilding & running tests

• Fast

• Scalable and extensible

• “buck clean is a bug”

• Android and generic Java support

• Distributed Cassandra build cache

• buckd for background builds

Page 88: Mobile @ Facebook - QConSF 2013

Buck - build toolBuilding & running tests

• Fast

• Scalable and extensible

• “buck clean is a bug”

• Android and generic Java support

• Distributed Cassandra build cache

• buckd for background builds

Page 89: Mobile @ Facebook - QConSF 2013

Buck - build toolBuilding & running tests

“Gerrit Code Review recently switched its build process from

Maven to Buck, reducing build time by 67-98% while improving build reproducibility, maintainability and developer happiness.

The Gerrit project migrated itself out of the Maven tarpit into a

better build.” - Shawn Pearce (Google)

Page 90: Mobile @ Facebook - QConSF 2013

Buck - join us!Building & running tests

Start using Buck:

http://facebook.github.io/buck/

Get help in the discussion group:

https://groups.google.com/forum/#!forum/buck-build

File bugs and submit patches on GitHub:

https://github.com/facebook/buck

Page 91: Mobile @ Facebook - QConSF 2013

iOS

Page 92: Mobile @ Facebook - QConSF 2013

xctool - build toolBuilding & running tests

Makes iOS & Mac continuous integration easier.

• CLI tool, runs tests just as Xcode.app would

• Can parallelize test runs

• Can emit JSON objects for every build/test event

• Reporters for Phabricator, JUnit XML

• Attractive, concise output

Page 93: Mobile @ Facebook - QConSF 2013

xctool - “pretty” reporterBuilding & running tests

Page 94: Mobile @ Facebook - QConSF 2013

xctool - “json-stream” reporterBuilding & running tests

Page 95: Mobile @ Facebook - QConSF 2013

xctool - how it worksBuilding & running tests

xcodebuild-shim.dylibxcodebuild

xctool

test-shim.dylibotest

test-shim.dylibxctest

(SenTestingKit)

(XCTest)

Injected

Injected

Injected

Page 96: Mobile @ Facebook - QConSF 2013

xctool - join us!Building & running tests

On GitHub:github.com/facebook/xctool

On Homebrew:brew install xctool

Also available on Travis-CI

Page 97: Mobile @ Facebook - QConSF 2013

atosCrash reports

Page 98: Mobile @ Facebook - QConSF 2013

atoslCrash reports

Page 99: Mobile @ Facebook - QConSF 2013

atoslCrash reports

github.com/facebook/atosl

Page 100: Mobile @ Facebook - QConSF 2013

Changed how we DEVELOPChanged how we SHIPChanged how we WRITE CODE

Kept our CULTURE

Page 101: Mobile @ Facebook - QConSF 2013

Learn from our experience and use our toolsFacebook is mobile

Page 102: Mobile @ Facebook - QConSF 2013

Links to mentioned awesomeness

Contact me [email protected], https://fb.me/legnitto, @LegNeato

Buck http://github.com/facebook/buck

XCTool http://github.com/facebook/xctool

atosl http://github.com/facebook/atosl

Snapshot Test http://github.com/facebook/ios-snapshot-test-case

Page 103: Mobile @ Facebook - QConSF 2013

Mobile @ Facebook

Christian Legnitto ([email protected])Mobile release engineering