TL;DR
Get monitors, keyboards and dev gear delivered free — and shop member deals
- Fast, free delivery on millions of items
- Access to Prime Big Deal Days deals on October 6–7
- Prime Video, Amazon Music and more included
The Pragmatic Engineer published an interview with Peter Mattis, co-founder and CTO of Cockroach Labs and co-creator of GIMP. Mattis discussed Gmail’s early storage design, Colossus erasure coding, B-trees as a recurring building block, and why AI tools have made him more productive writing code.
Peter Mattis, co-founder and CTO of Cockroach Labs and an original creator of the open-source image editor GIMP, sat down with The Pragmatic Engineer for a wide-ranging interview covering his career at Google, the engineering behind Gmail and the Colossus file system, and how AI coding tools have changed his productivity. The episode, available on YouTube, Apple, and Spotify, is notable for the detail Mattis provides on distributed database internals and on why he believes AI assistance can raise code quality rather than degrade it.
Mattis’s career spans several well-known systems. He and his college roommate Spencer Kimball created GIMP, which was used to make the very first version of the Google logo. He later worked on Gmail and distributed storage at Google before co-founding Cockroach Labs, the company behind the distributed SQL database CockroachDB.
Several technical recollections from the interview stand out. Mattis said B-trees were used in the first version of Gmail, which launched on 1 April 2004 with 1GB of free storage — an offer so generous that many people assumed it was an April Fool’s joke. Incoming messages were matched to threads via the search index, and threads and their unread counts were tracked by B-trees.
Mattis also described work on Colossus, Google’s successor to the Google File System. By pioneering Reed–Solomon erasure coding in a distributed file system, he and the team stored data twice instead of three full copies as GFS had done, cutting storage overhead by 33% according to the interview while increasing redundancy. He also recounted twice outperforming standard library data structures at Google: replacing std::map‘s red-black tree with a faster, smaller B-tree, and building a Swiss Table hash map for Go that was faster than the existing implementation and later merged into the Go standard library with help from the Go team.
Why Mattis’s Engineering Lessons Matter
The interview is a rare first-person account from an engineer who has worked on storage systems at three scales: hobby open source (GIMP), planet-scale infrastructure (Gmail, Colossus), and a commercial distributed database (CockroachDB). His observations on erasure coding and latency — including his point that a network round trip within a zone has dropped from milliseconds to roughly 100 microseconds since Colossus was built — illustrate how quickly the hardware and network assumptions underlying database design are shifting.
His comments on AI are also drawing attention. Mattis, who according to the interview regularly shipped roughly 100K lines of database-grade code per year before AI tools existed, said he feels even more productive today with no drop in quality, and that AI has brought him back to writing code after years focused on management. His view that AI can multiply the impact of domain experts runs counter to fears that AI-generated code lowers quality — though it remains a personal assessment, not a measured study.
Top picks for "distribut databas peter"
As an affiliate, we earn on qualifying purchases.
From GIMP to Google to CockroachDB
Mattis’s path to distributed databases began in open source. He initially turned down an offer from Google co-founder Sergey Brin in 2001 because he did not want the hour-long commute from San Francisco to Mountain View, joining another startup instead. When Google reached out a second time, he accepted. At Google he worked on Gmail’s storage layer and on distributed storage, including Colossus.
He also shared an early lesson from GIMP: weeks before launch, he and Kimball saw an announcement for a competing photo editor that promised to do everything GIMP did and more. They shipped anyway, and the competing project was never heard from again. “There’s always going to be someone else working on your idea,” Mattis said, advising founders to assume dozens of people share their idea but that most will never ship.
A recurring technical thread in the conversation is the B-tree, which appears across Mattis’s work — in Gmail’s backend, his std::map replacement, and CockroachDB’s range index — echoing the classic observation in the paper The Ubiquitous B-Tree.
“There’s always going to be someone else working on your idea. You can’t get dissuaded if they pre-announce it. To founders: assume that dozens of people have the same idea you have, but most won’t ship it!”
— Peter Mattis, co-founder and CTO of Cockroach Labs
Claims Worth Checking
The 33% storage overhead reduction from Colossus and the claim that within-zone round trips have fallen roughly 10x to about 100 microseconds are Mattis’s recollections from the interview and are not accompanied by published benchmarks. His statements about AI improving productivity and quality are personal experience and opinion; no systematic data was presented. Details of his internal Google work, such as the std::map replacement and Swiss Table contributions, are described from his perspective, and the episode transcript is the primary source for all figures cited here.
Where to Hear More
The full episode, including a transcript and timestamps, is available on The Pragmatic Engineer newsletter and on YouTube, Apple, and Spotify. Mattis also discussed the future of code review and offered advice on leveling up engineering skills in the conversation — topics likely to interest teams weighing how AI changes review practices. Readers interested in his latency reasoning can follow the referenced paper ‘Delay is not an option: low latency routing in space’, which underpins his argument that routing packets through satellites and laser links can beat fiber on global routes.
Key Questions
Who is Peter Mattis?
He is co-founder and CTO of Cockroach Labs, the company behind the distributed SQL database CockroachDB. Earlier, he co-created the open-source image editor GIMP with Spencer Kimball and worked on Gmail and distributed storage at Google, including Colossus.
What did Peter Mattis say about AI and coding productivity?
He said AI has brought him back to writing code after his role shifted toward management, and that he feels more productive than before with no drop in quality. He believes AI can improve quality and multiply the impact of domain experts. These are his personal views from the interview, not findings from a study.
How did B-trees figure in early Gmail?
According to Mattis, each incoming message was matched to a thread using the search index, and threads and their unread counts were tracked using B-trees in Gmail’s storage layer.
What did Colossus change about Google’s storage?
Mattis said Colossus replaced GFS’s approach of storing three full copies of data with Reed–Solomon erasure coding, storing data twice, which he said cut storage overhead by 33% while increasing redundancy.
Where can I listen to the interview?
The episode is available on YouTube, Apple, and Spotify, with a transcript and timestamps published on The Pragmatic Engineer newsletter at newsletter.pragmaticengineer.com.
Source: rss
Halloween Picks
halloween
As an affiliate, we earn on qualifying purchases.
