Arc Notes Weekly #76: 6 Strokes
This week, we explore Stripe's best practices for API design, offering insights to streamline your processes. Next, discover Meta's innovations in training large language models
This week, we explore Stripe's best practices for API design, offering insights to streamline your processes. Next, discover Meta's innovations in training large language models, tackling the challenges of generative AI. Finally, learn why Postgres is ideal for modern data needs, even for vectors, with the powerful pgvector extension.
Enjoy this week's round-up!
— Mahdi Yusuf (@myusuf3) or LinkedIn
👋🏾 You are reading Architecture Notes - Your Sunday newsletter, which curates best system design and architecture news from around the web. We would appreciate you sharing it with like-minded people.
Articles
Common Design Patterns at Stripe
Explore common design patterns at Stripe that can be applied to API design. This article emphasizes the importance of clear naming conventions, avoiding jargon, and using enums over booleans for better future-proofing. It also touches on security best practices, like using unguessable IDs and implementing permission systems. Ideal for developers looking to streamline their API design process.
How Meta Trains Large Language Models at Scale
Meta's article on training large language models (LLMs) at scale details the significant computational challenges and innovations required to support generative AI (GenAI). The shift from numerous smaller GPU jobs to fewer, larger ones necessitates rethinking software, hardware, and network infrastructure. The article covers key challenges like hardware reliability, fast recovery from failures, efficient preservation of training state, and optimal GPU connectivity. The piece also explores Meta's dual-cluster strategy using RoCE and InfiniBand fabrics to handle large-scale GenAI training, including their use in training Llama 3. Future advancements will involve even more GPUs, larger data volumes, and new hardware technologies.
Good code is rarely read
In the blog post 'Good code is rarely read,' Alex Molas recounts an insightful interview with a junior developer who defined good code as 'code that’s easy to read.' This simple answer sparked a week-long reflection for Molas, leading him to explore the essence of best practices, the importance of code readability, and the counterintuitive notion that excellent code should be read as little as possible. Molas concludes that truly good code is so intuitive and well-structured that its purpose and functionality are immediately clear, allowing developers to use it without extensive reading.
Postgres is all you need, even for vectors
The article 'Postgres is all you need, even for vectors' explores the versatility of PostgreSQL for vector storage and querying, especially with the pgvector extension. The author argues that sticking to Postgres for all types of data, including embeddings, simplifies querying, ensures data consistency, and is both cost-effective and high-performing. The piece delves into various use cases such as hybrid search and knowledge graphs, and provides practical advice on implementing pgvector, making it a compelling read for anyone interested in leveraging Postgres for modern data needs.
The Story of Reformatting 100k Files at Google in 2012
This post narrates the ambitious project undertaken by engineers Rob Pike and Russ Cox to standardize the formatting of Bazel BUILD files across Google's vast codebase. Despite initial skepticism, the rollout of the Buildifier tool, which was able to reformat all files in minutes, proved to be a success. The initiative not only improved code uniformity but also facilitated easier code maintenance and large-scale changes, ultimately enhancing productivity. The post highlights the importance of automated tools and uniform coding standards.
The Architecture Behind A One-Person Tech Startup
Anthony Simon's article provides an in-depth look at the tech stack and operational strategies behind his one-person SaaS business, Panelbear. The post covers various aspects such as using Kubernetes on AWS for load balancing and automated rollouts, caching with CDN and Redis, rate-limiting, and comprehensive monitoring and security measures. It's a detailed guide for efficiently managing a solo tech startup.
Understanding Postgres GIN Indexes: The Good and the Bad
This article dives into the intricacies of Postgres GIN indexes, highlighting both their advantages and potential pitfalls. Written by Lukas Fittl, it covers the essential uses of GIN indexes for complex data types like JSONB and full-text search that a B-tree index can't handle. It provides a historical overview, practical examples, and a detailed case study from the GitLab database team. Learn about the structure of GIN indexes, their real-world applications, and strategies to mitigate the expensive updates they can incur. A must-read for anyone looking to optimize their PostgreSQL database performance.
Projects
Bend
Bend is a high-level, massively parallel programming language designed to run seamlessly on parallel hardware like GPUs. Imagine the expressiveness of Python and Haskell, combined with the scalability of CUDA, all without the need for explicit parallelism annotations. Bend leverages the HVM2 runtime to achieve near-linear acceleration based on core count, supporting over 10,000 concurrent threads.
A Note on Essential Complexity
This insightful piece by Facundo Olano delves into the concept of essential complexity in software engineering. By referencing foundational texts like Fred Brooks's "No Silver Bullet" and John Ousterhout's "A Philosophy of Software Design," Olano challenges the notion that essential complexity is irreducible. The post argues that redefining problem specifications and questioning assumptions can minimize complexity, making it a thought-provoking read for anyone involved in software development.