• Hungry Minds
  • Posts
  • 🍔🧠 4.77B Users on SQL: Google's Ad Architecture Deep Dive

🍔🧠 4.77B Users on SQL: Google's Ad Architecture Deep Dive

PLUS: Why I Don’t Like NumPy ❌, GitHub AI Engineering Repo 📚, Load Balancing Algorithms ⚖️

In partnership with

Happy Monday! ☀️

Welcome to the 445 new hungry minds who have joined us since last Monday!

If you aren't subscribed yet, join smart, curious, and hungry folks by subscribing here.

📚 Software Engineering Articles

🗞️ Tech and AI Trends

👨🏻‍💻 Coding Tip

  • Use Rust's const generics for zero-cost array operations at compile-time

Time-to-digest: 5 minutes

Big thanks to our partners for keeping this newsletter free.

If you have a second, clicking the ad below helps us a ton—and who knows, you might find something you love.

💚

Get the tools, gain a teammate

  • Impress clients with online proposals, contracts, and payments.

  • Simplify your workload, workflow, and workweek with AI.

  • Get the behind-the-scenes business partner you deserve.

Google Spanner represents a breakthrough in distributed databases by combining NoSQL scalability with SQL ACID guarantees. It powers Google's multi-billion-dollar ads business by processing global transactions with strong consistency while maintaining 99.999% availability.

The challenge: Building a globally distributed database that provides both strong consistency and high availability while scaling to handle millions of transactions per second.

Implementation highlights:

  1. Two-Phase Commit (2PC): Ensures atomic transactions across partitions through prepare and commit phases

  2. TrueTime API: Uses GPS and atomic clocks to maintain synchronized time across global data centers

  3. Paxos Leadership: Coordinates writes through leader election, while followers handle reads

  4. Two-Phase Locking: Prevents transaction conflicts through growing and shrinking lock phases

  5. Multi-Version Concurrency Control: Enables lock-free reads through snapshot isolation

Results and learnings:

  • Achieved 99.999% availability across global deployments

  • Powers Google's $237B advertising business (2023)

  • Demonstrates that global strong consistency is possible at scale

Spanner shows that you can have your ACID properties and scale them too. It proves that with the right architecture, you can build globally distributed systems that don't compromise on consistency or availability.

Remember: Building a global database is like herding cats across time zones - you'd better have a really good clock! 🐱⏰

ESSENTIAL (strong like bull)
What Makes Strong Engineers Strong?

ESSENTIAL (robot overlords reviewing code)
How Do AI Code Reviews Impact Engineering Teams?

GITHUB REPO (java-ai-go-brrr)
Agentic AI Framework for Java Developers

ARTICLE (frontend pain is real)
Frontends are hard

ARTICLE (billing without the backend blues)
How we made billing backendless

ARTICLE (numpy-nope)
I don't like NumPy

Want to reach 180,000+ engineers?

Let’s work together! Whether it’s your product, service, or event, we’d love to help you connect with this awesome community.

Brief: Google DeepMind's AlphaEvolve combines Gemini LLMs with automated evaluators to optimize algorithms, boosting efficiency in data centers, chip design, and AI training while solving complex mathematical problems.

Brief: OpenAI and Microsoft are reportedly renegotiating their partnership terms to potentially clear the path for an IPO from the AI startup while maintaining their close collaboration.

Brief: Apple is reportedly researching brain-computer interface (BCI) technology that could enable hands-free control of devices using neural signals.

Brief: A CRISPR-based gene therapy successfully treats a life-threatening genetic disorder in a Philadelphia infant, marking a major milestone in precision medicine.

Brief: Meta has postponed the launch of its flagship AI model, citing internal challenges, though the exact reason remains unclear.

This week’s coding challenge:

This week’s tip:

Use Rust's const generics to create compile-time array operations with custom sizes, enabling zero-cost abstractions for numerical computations. This feature allows for generic array sizes to be checked at compile-time rather than runtime.

Wen?

  • High-performance linear algebra: Implement fixed-size matrices with zero runtime overhead for scientific computing.

  • Embedded systems: Create fixed-size data structures where heap allocation is prohibited or memory constraints are strict.

  • Game development: Build efficient vector/matrix operations for graphics and physics calculations with compile-time size validation.

“Live in each season as it passes; breathe the air, drink the drink, taste the fruit, and resign yourself to the influence of the earth.”
Henry David Thoreau

That’s it for today! ☀️

Enjoyed this issue? Send it to your friends here to sign up, or share it on Twitter!

If you want to submit a section to the newsletter or tell us what you think about today’s issue, reply to this email or DM me on Twitter! 🐦

Thanks for spending part of your Monday morning with Hungry Minds.
See you in a week — Alex.

Icons by Icons8.

*I may earn a commission if you get a subscription through the links marked with “aff.” (at no extra cost to you).