HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Why Google Stores Billions of Lines of Code in a Single Repository

@Scale2 HN recommenders · recommended in 3 months, 2016-2022
YouTube
317K views · 11 years ago · talk · evergreen

Rachel Potvin describes the scale of Google's codebase and its custom monolithic source repository. She explains the reasons for the monorepo model, the tooling that makes it workable, and its tradeoffs.

The go-to reference in monorepo and trunk-based development discussions, recommended as a firsthand account of how Google manages source control.

Testing, debugging & developer toolsSoftware architecture & design#monorepo#google#sourcecontrol#trunk-baseddevelopment#devtools

6 comments from Hacker News

@kyrra2022 · in “Google is 2B lines of code and it's all in one place (2015)”

Googler opinions are my own. I also highly recommend this ACM article talking about our source control from 2016. link There's also a YouTube video which is linked from the wired article that is good. ▶ this video

RecommendsView on HN
@svat2019 · in “Case Study: Monolithic Repository at Google (2018) [pdf]”

This paper from last year surveys Google “engineers who have experience with both monolithic repos and multiple, per-project repos” to see what exactly they like and dislike about monorepos. The results match my experience, and I find the paper well-written (especially like the “Threats to Validity” section that says what biases may have affected the results; more papers and arguments should have them IMO). Older reading on monorepos that I'm aware of: • Dan Luu, Advantages of monorepos (2015) link • Why Google Stores Billions of Lines of Code in a Single Repository (2015): link (HTML) / link (PDF) / ▶ this video (video) This paper is from the “Software Engineering in Practice” track of the ICSE 2018 conference: • link

CitesView on HN
@weinzierl2019 · in “Software Engineering at Google (2017)”

What I don't understand is how they accomplish larger collaborative changes. The paper says: "Almost all development occurs at the 'head' of the repository, not on branches." Googler Rachel Potvin made an even stronger statement in her presentation about "The Motivation for a Monolithic Codebase" [1]: "Branching for development at Google is exceedingly rare [..]" In the related ACM paper she published with Josh Levenberg there is the statement that: "Development on branches is unusual and not well supported at Google, though branches are typically used for releases." I my world when we have to make a bigger change we create a branch and only merge it into the trunk when it is good enough to be integrated. The branch enables us to work on that change together. I don't understand how they do this at google. As far as I understand in their model they either have to - give up on collaboration and always have just a single developer work on a change. - share code by other means. - check in unfinished work to the trunk for collaboration and constantly break trunk. [1] ▶ this video [2] link

CitesView on HN
@kyrra2017 · in “Trunk-Based Development”

Google doesn't use perforce anymore. They have a custom in-house SCM that has various interfaces wrapped around it. I'd recommend this video that describes it. ▶ this video

RecommendsView on HN
@twotwotwo2016 · in “Go Packaging Proposal Process”

It's common practice for folks building Go binaries (but not libraries) to check in the code for their dependencies. So whenever you build Docker, you get the same thing unless Docker made a change (either by changing Docker itself or explicitly checking in an upgrade to a dep). There are a few nice things about it; vendoring means you won't have a dependency on other repos or archives being available, and if you're a binary maintainer you can see source changes in your own code and that of your dependencies side-by-side if you're, say, investigating a bug that came up between certain revisions. The not-so-nice things are pretty much what you'd think. There isn't a command to say "give me upgrades, but not ones that the author flagged as breaking changes". If you're writing a _library_ that is depended on by other _libraries_ there is no one conventional way to safely do breaking changes, so there's a lot of effort to avoid those changes plus sometimes hacks like different repo paths for different versions. Part of the history is that, internally, Google's got one version of third-party code in the latest rev of their source control tree, by company policy. You upgrade something for one, you upgrade it for the whole codebase. Sounds daunting, but they have lots of testing, canary servers, and so on to catch problems. There is a great talk about some of this by Rachel Potvin (can't recall if it covers the third_party/ stuff specifically): ▶ this video So Go's initial model didn't c

RecommendsView on HN
@valarauca12016 · in “Why Google Stores Billions of Lines of Code in a Single Repository”

Google gave a talk at the @scale conference in 2015 about this very topic. You can watch it here (30 minutes): ▶ this video

CitesView on HN
Building Software at Google Scale Tech Talk1:10:02

Building Software at Google Scale Tech Talk

Google TechTalks
58K views • 14 years ago
CppCon 2018:H. Wright “Large-Scale Changes at Google: Lessons Learned From 5 Yrs of Mass Migrations”1:00:16

CppCon 2018:H. Wright “Large-Scale Changes at Google: Lessons Learned From 5 Yrs of Mass Migrations”

CppCon
16K views • 7 years ago
F8 2015 - Big Code: Developer Infrastructure at Facebook's Scale46:22

F8 2015 - Big Code: Developer Infrastructure at Facebook's Scale

Meta Developers
99K views • 11 years ago
Building Software Systems At Google and Lessons Learned1:22:45

Building Software Systems At Google and Lessons Learned

Stanford
257K views • 15 years ago
NYC Tech Talk Series: How Google Backs Up the Internet1:14:19

NYC Tech Talk Series: How Google Backs Up the Internet

Google TechTalks
41K views • 12 years ago
Tech Talk: Linus Torvalds on git1:10:15

Tech Talk: Linus Torvalds on git

Google
4.1M views • 19 years ago
introducing copyparty, the FOSS file server15:39

introducing copyparty, the FOSS file server

tripflag
613K views • 1 year ago
Rich Hickey rants about HttpServletRequest in 1080p: Death By Specificity from Clojure Made Simple4:57

Rich Hickey rants about HttpServletRequest in 1080p: Death By Specificity from Clojure Made Simple

Fred Overflow
43K views • 6 years ago
Dan Abramov   The wet codebase25:01

Dan Abramov The wet codebase

eswarnichtsmehrfrei
27K views • 5 years ago
Jujutsu: A Git-Compatible VCS - Git Merge 202233:26

Jujutsu: A Git-Compatible VCS - Git Merge 2022

GitHub
17K views • 4 years ago
Anthony Marcar - Clojure At Scale @WalmartLabs39:41

Anthony Marcar - Clojure At Scale @WalmartLabs

ClojureTV
24K views • 11 years ago
"Write a single library to handle all input devices, it'll be easy" they said...46:54

"Write a single library to handle all input devices, it'll be easy" they said...

linux.conf.au
21K views • 6 years ago
Stanford Seminar - Google's Steve Yegge on GROK1:20:29

Stanford Seminar - Google's Steve Yegge on GROK

Stanford Online
30K views • 14 years ago
CppCon 2017: Titus Winters “C++ as a "Live at Head" Language”1:31:14

CppCon 2017: Titus Winters “C++ as a "Live at Head" Language”

CppCon
53K views • 9 years ago
Lecture 6: Version Control (git) (2020)1:25:00

Lecture 6: Version Control (git) (2020)

Missing Semester
751K views • 6 years ago
Richard Hipp - Git: Just Say No1:01:15

Richard Hipp - Git: Just Say No

southeastlinuxfest
16K views • 11 years ago
Mastering Chaos - A Netflix Guide to Microservices53:14

Mastering Chaos - A Netflix Guide to Microservices

InfoQ
2.3M views • 9 years ago
Spec-ulation Keynote - Rich Hickey1:16:14

Spec-ulation Keynote - Rich Hickey

ClojureTV
135K views • 9 years ago
Seattle Conference on Scalability: YouTube Scalability52:41

Seattle Conference on Scalability: YouTube Scalability

Google TechTalks
30K views • 19 years ago
Inside a Google data center5:28

Inside a Google data center

Google Workspace
22.6M views • 11 years ago