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

Rebooting Open Source at Facebook

Rebooting Open Source at Facebook

Open source has always been a huge part of Facebook's culture. But in 2013, we rebooted our portfolio and launched a unique suite of internal tools & instrumentation to support hundreds of repos, thousands of engineers, and tens of thousands of contributors. The result? Better-than-ever community adoption - and an open & responsible stewardship, attuned to our ethos of hacking & moving fast.

Video now available; https://www.youtube.com/watch?v=fzL6Zoy_ndk&list=PLb0IAmt7-GS1hdDcokpVp1MBk-IaeaSgP

James Pearce

July 23, 2014
Tweet

More Decks by James Pearce

Other Decks in Technology

Transcript

  1. Rebooting Open Source

    at Facebook
    JAMES PEARCE

    @jamespearce

    View Slide

  2. View Slide

  3. View Slide

  4. View Slide

  5. USE
    SCALE
    IMPROVE REPLACE
    RELEASE

    View Slide

  6. View Slide

  7. #0

    Articulate the value that

    open source brings your company

    View Slide

  8. Open source is like 

    the breeze from 

    an open window

    View Slide

  9. But…

    View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. View Slide

  14. View Slide

  15. USE
    SCALE
    IMPROVE
    RELEASE
    REPLACE

    View Slide

  16. #1

    Use your own open source

    View Slide

  17. View Slide

  18. #2

    Decentralize project ownership

    View Slide

  19. What projects did we own?
    Who was contributing to them?
    How healthy were they?

    View Slide

  20. https://api.github.com/orgs/facebook/

    View Slide

  21. Every repo
    Every commit
    Every pull request
    Every issue

    View Slide

  22. [opensource]>  select  

                               name,  followers,  forks,  commits,  issues,  pull_requests  

                               from  github_repos  order  by  created_at  limit  10;

    +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+  
    |  name                        |  followers  |  forks  |  commits  |  issues  |  pull_requests  |  
    +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+  
    |  memcached              |              323  |        53  |          209  |            1  |                          0  |  
    |  three20                  |            7429  |    1521  |        1680  |        200  |                          0  |  
    |  platform                |              146  |        31  |          310  |            2  |                          0  |  
    |  bunny1                    |                43  |        15  |            10  |            0  |                          0  |  
    |  phpembed                |              132  |        26  |            31  |            1  |                          0  |  
    |  codemod                  |              309  |        49  |            13  |            9  |                          3  |  
    |  animation              |                  0  |          0  |              0  |            1  |                          0  |  
    |  scribe                    |            2572  |      469  |          117  |          59  |                        11  |  
    |  firefox-­‐toolbar  |                93  |        50  |          532  |          10  |                          0  |  
    |  cassandra              |              205  |        27  |          189  |            0  |                          0  |  
    +-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐+

    View Slide

  23. Every repo
    Every commit
    Every pull request
    Every issue
    Every minute

    View Slide

  24. #3

    Invest in instrumentation

    View Slide

  25. View Slide

  26. • commits made per day
    • commits made per day by repo
    • issue average age
    • issue average age by repo
    • issue total age
    • issue total age by repo
    • issues closed per day
    • issues closed per day by repo
    • issues open
    • issues open by repo
    • issues opened per day
    • issues opened per day by repo
    • pull request average age
    • pull request average age by repo
    • pull request total age
    • pull request total age by repo
    • pull requests closed per day
    • pull requests closed per day by repo
    • pull requests open
    • pull requests open by repo
    • pull requests opened per day
    • pull requests opened per day by repo
    • total commits
    • total commits by owner
    • total commits by repo
    • total forks
    • total forks by owner
    • total forks by repo
    • total repos
    • total repos by owner
    • total repos by tag
    • total watchers
    • total watchers by owner
    • total watchers by repo

    View Slide

  27. Average followers per repo

    Average forks per repo
    Average pull-request age

    Average issue age
    External commits

    View Slide

  28. #4

    Invest in tools

    View Slide

  29. View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. #5

    Establish ownership

    View Slide

  34. View Slide

  35. View Slide

  36. #6

    Gamification of good behavior

    View Slide

  37. View Slide

  38. 1. How core to Facebook's business is this technology?
    2. Who will use it? Who is this technology useful to? How valuable is it?
    3. What else already exists that is similar to this technology?
    4. Is there anything novel in this project?
    5. Does it include any third-party code, including any third-party open source?
    6. Who will maintain the project, accept contributions, and liaise with the community?
    7. Where & how should this project be distributed?
    8. What is your expected public release date?

    View Slide

  39. 1. How core to Facebook's business is this technology?
    2. Who will use it? Who is this technology useful to? How valuable is it?
    3. What else already exists that is similar to this technology?
    4. Is there anything novel in this project?
    5. Does it include any third-party code, including any third-party open source?
    6. Who will maintain the project, accept contributions, and liaise with the community?
    7. Where & how should this project be distributed?
    8. What is your expected public release date?

    View Slide

  40. View Slide

  41. View Slide

  42. View Slide

  43. #7

    Launch is step zero

    View Slide

  44. kvocontroller
    0"
    1000"
    2000"
    3000"
    4000"
    5000"
    6000"
    7000"
    8000"
    0" 10" 20" 30" 40" 50" 60"

    View Slide

  45. 0"
    1000"
    2000"
    3000"
    4000"
    5000"
    6000"
    7000"
    8000"
    0" 10" 20" 30" 40" 50" 60"
    fb-flo
    origami

    View Slide

  46. 0"
    1000"
    2000"
    3000"
    4000"
    5000"
    6000"
    7000"
    8000"
    0" 10" 20" 30" 40" 50" 60"
    chisel
    tweaks
    shimmer
    kvocontroller

    View Slide

  47. 0"
    1000"
    2000"
    3000"
    4000"
    5000"
    6000"
    7000"
    8000"
    0" 10" 20" 30" 40" 50" 60"
    pop

    View Slide

  48. “ If Facebook keep this level of quality open source
    release up much longer then soon I'll need to forgive
    them for Three20 ”
    - iOS Dev Weekly

    View Slide

  49. View Slide

  50. • IRC channel
    • Facebook Page/Group
    • Mailing lists
    • Regular blog posts
    • Meetups
    • Hackathons

    View Slide

  51. View Slide

  52. #8

    Leave breadcrumbs

    View Slide

  53. Snapshot Upstream Fly the nest Deprecate Reboot
    OPEN
    SOURCE
    PROJECTS

    View Slide

  54. #9

    Understand projects’ lifecycles

    View Slide

  55. View Slide

  56. Metrics
    • Total repos
    • Followers
    • Forks
    • Pull-requests
    • Issues
    • Commits
    June 2013
    129
    50.1k
    11.8k
    1,400 (502 days)
    404 (323 days)
    30.7k
    July 2014
    202
    97.6k
    20.7k
    1,973 (208 days)
    427 (186 days)
    42.4k

    View Slide

  57. View Slide

  58. #10

    Be open and connected

    View Slide

  59. JAMES PEARCE

    @jamespearce

    View Slide