More The Pragmatic Engineer episodes

Distributed databases with Peter Mattis thumbnail

Distributed databases with Peter Mattis

Published 30 Sept 2026

Duration: 01:41:49

"Software engineer and Cockroach Labs co-founder Peter Mattis discussed his career in database design, distributed systems, AI's impact on development, and the evolution of his leadership role, stressing rigorous testing, security, and the transformative potential of AI in coding."

Episode Description

Brought to You By:* turbopuffer - a vector and full-text search engine built on object storage. It's fast, cheap, and extremely scalable* Linear - the...

Overview

The speaker, a seasoned software engineer and co-founder of Cockroach Labs, reflects on his extensive career in building large-scale systems, including contributions to the GIMP image editor, Google's early storage infrastructure, and the original backend of Gmail. He discusses technical topics such as distributed databases, B-trees, consensus protocols like Raft, and the evolution of Google's file systems from GFS to Colossus. Key insights include the use of erasure coding for efficient data storage, challenges in metadata management at scale, and the importance of strong consistency, atomicity, and resilience in distributed systems like CockroachDB.

He also explores how AI is transforming software development, noting a personal shift from writing 100,000 lines of code annually pre-AI to temporarily stepping back from coding before returning with AI assistance. AI now enables rapid generation of production-ready code, acts as a collaborative design partner, and accelerates learning through interactive explanation. While AI improves productivity and democratizes development, challenges remain in testing rigor, security, and maintaining quality amid faster output. The speaker emphasizes that deep technical expertise remains essential to guide AI effectively, and envisions a future where AI amplifies human creativity and domain knowledge rather than replacing it.

What If

  • What if you leveraged AI to rebuild a core module in your solo project with production-grade quality?

    • Move: Identify one critical but outdated component (e.g., data structure, API layer) in your software and use an AI assistant to generate a fully tested, optimized replacement - applying constraints like performance, memory use, and edge cases.
    • Why Now?: AI coding models have matured enough to produce reliable, production-ready code; waiting means missing out on 10x faster iteration cycles that early adopters are already exploiting.
    • Expected Upside: Deliver enterprise-grade robustness in a weekend instead of months, accelerating trust from users and reducing technical debt long-term.
  • What if you treated AI as a design collaborator to validate and evolve your product's architecture before scaling?

    • Move: Feed your system specs into an AI agent to simulate architectural trade-offs (e.g., B-tree vs. LSM-tree, sharding strategy), then stress-test the recommendations using napkin math for latency, throughput, and failure modes.
    • Why Now?: With AI now capable of contextual reasoning about distributed systems, you can de-risk major technical decisions without building full prototypes - critical when operating solo and unable to afford costly rewrites later.
    • Expected Upside: Avoid architectural dead ends, reduce future rework by up to 70%, and ship a more scalable system from day one.
  • What if you used AI to automate your testing depth beyond what's typical - even surpassing human diligence?

    • Move: Instruct AI to generate not just unit tests, but property-based, metamorphic, and simulation-based test suites for your most critical functions, especially around transactions, concurrency, or data encoding.
    • Why Now?: AI doesn't get lazy about testing - if guided properly - and can enforce rigorous quality standards that even elite engineers often skip due to time pressure.
    • Expected Upside: Ship with higher confidence, catch subtle bugs pre-deployment, and establish a reputation for reliability that differentiates your solo product in crowded markets.

Takeaway

  • Leverage AI to generate production-ready code rapidly, but enforce rigorous testing practices like property-based or metamorphic testing to compensate for AI's tendency to skip thorough validation.
  • Focus on execution rather than fearing competition; proceed with your software ideas even if others claim similar projects, as most such announcements never result in shipped products.
  • Use B-trees or cache-friendly data structures (e.g., over red-black trees) in performance-critical applications to improve memory locality and reduce overhead.
  • Adopt consistent hashing or range-based partitioning early when designing scalable systems to minimize data movement during sharding and avoid the high cost of manual resharding later.
  • Contribute to open-source projects by identifying inefficiencies in widely used libraries (e.g., memory usage in hash tables), prototyping optimized alternatives (like Swiss Tables), and collaborating through public issue trackers and benchmarks.

Recent Episodes of The Pragmatic Engineer

29 Oct 2026 Software engineering at Google & CS education with Titus Winters

"Critiques CS education, advocating for AI-informed, practical curricula focused on problem-solving, teamwork, and real-world development, while examining Google's engineering practices, productivity challenges, and the need for deterministic tools in AI-driven software engineering."

21 Oct 2026 The revised rules of engineering management with Will Larson

"Engineering management is evolving, with outdated 2010s practices giving way to business-focused problem-solving, AI-driven role shifts, and adaptable leadership that prioritizes high-ownership teams and reskilling for long-term success."

7 Oct 2026 Building resilient systems with Sam Newman

Recommended: Good Engineering Decisions

"Microservices are a last-resort architecture requiring careful state management, while resilient systems depend on robustness, rebound, extensibility, and adaptability, with AI augmenting but not replacing human oversight in development."

23 Sept 2026 Design Engineering with Maggie Appleton

"Explores the evolving role of design engineers, blending engineering and design principles, analog tools, AI, and interdisciplinary collaboration to shape intuitive, culturally aware digital experiences."

17 Sept 2026 AI Skills with Matt Pocock

"Former voice coach turned developer shares insights on AI integration in software engineering, emphasizing fundamentals, adaptability, and structured workflows for productivity."

More The Pragmatic Engineer episodes