Best of ArchitectureJune 2025

  1. 1
    Article
    Avatar of awegoAwesome Go·46w

    MVC vs DDD: Go Language Architecture Deep Dive

    Compares MVC and DDD architectural patterns for Go applications, examining their structural differences, code organization approaches, and use cases. MVC organizes code by technical layers (Controller/Service/Repository) and suits smaller systems with stable requirements, while DDD structures code around business domains with four layers (Interface/Application/Domain/Infrastructure) and better handles complex business logic. The guide provides detailed directory structures, code examples, and implementation best practices for both patterns in Go, highlighting that MVC offers simplicity and rapid development while DDD provides better scalability and maintainability for complex systems.

  2. 2
    Article
    Avatar of threedotslabsThree Dots Labs·48w

    Event Driven Architecture: The Hard Parts

    Event-driven architecture offers powerful benefits like scaling and decoupling but comes with significant challenges. Key issues include debugging async systems without proper observability, handling eventual consistency, preventing message loss through the outbox pattern, and designing events that avoid tight coupling. The architecture requires idempotent handlers to manage duplicate message delivery, proper dead letter queue handling, and careful consideration of message ordering. While EDA can solve real problems, it adds complexity that isn't always justified - sometimes synchronous systems or monoliths are better choices.

  3. 3
    Article
    Avatar of communityCommunity Picks·47w

    Database Multi tenancy

    Multi-tenancy is an architecture where multiple independent application instances operate in a shared environment with logical isolation. The article explores four database multi-tenancy approaches: single database with shared schema (lowest cost, highest tenant density but minimal isolation), single database with separate schemas (better isolation, more complex maintenance), database per tenant (highest isolation, most resource intensive), and multiple databases with shared schemas (balanced approach). Each pattern has distinct trade-offs between cost, isolation, maintenance complexity, and scalability that should guide architectural decisions based on application requirements.

  4. 4
    Article
    Avatar of awegoAwesome Go·47w

    Modern (Go) application design

    Explores modern Go application design principles emphasizing structure and composability. Discusses two key approaches: use case-driven structure (like CLI tools) and data model-first principles using repository patterns with generics. Demonstrates how to separate concerns through layered architecture with storage, business, and view layers. Shows practical examples of implementing CRUD operations, aggregates, and the MVC pattern while maintaining clean boundaries between components for better testability and maintainability.

  5. 5
    Article
    Avatar of medium_jsMedium·47w

    How Kafka Saved Our Payment System And Helped Us Scale to 10 Million Users

    A payment system was failing due to synchronous processing of multiple tasks (email, notifications, logging) in a single thread, causing delays and duplicate charges. The team implemented Kafka as a message broker to decouple services through event-driven architecture. After a payment succeeds, the system publishes a single event to Kafka, allowing independent services to consume and process it asynchronously. This approach eliminated blocking operations, improved response times, reduced support tickets, and enabled the system to scale to 10 million users while maintaining reliability and making it easier to add new features.

  6. 6
    Article
    Avatar of medium_jsMedium·45w

    Why We Replaced Kafka with gRPC for Service Communication

    A development team replaced Kafka with gRPC for synchronous service communication in their loan servicing platform after experiencing issues with debugging, latency, and operational complexity. While keeping Kafka for appropriate use cases like audit logs and fan-out patterns, they found gRPC provided better performance (70-80% latency reduction), easier debugging, and simpler infrastructure management for request-response interactions. The key lesson was using each tool for its intended purpose rather than forcing one solution everywhere.

  7. 7
    Video
    Avatar of communityCommunity Picks·46w

    Learn Microservices and Kafka with an E-commerce Example | Kafka Tutorial for beginners

    A comprehensive tutorial demonstrating how to transform a monolithic e-commerce application into a microservices architecture using Apache Kafka for inter-service communication. The guide covers breaking down payment, order, email, and analytics services into independent components, implementing Kafka producers and consumers, setting up Docker containers, and creating fault-tolerant Kafka clusters with multiple brokers and partitions. The tutorial includes practical code examples showing how to handle asynchronous messaging, reduce response times from 12 seconds to 3 seconds, and ensure system resilience through distributed architecture.

  8. 8
    Article
    Avatar of yegor256Yegor's Blog·46w

    remove(42) vs. find(42).remove()

    Compares two approaches for removing objects from collections: direct removal methods versus retrieving the object first then calling remove. The retrieve-then-remove approach offers better object-oriented design through improved extensibility via decorators, more flexible error handling with null objects, and stronger encapsulation by keeping data wrapped within objects rather than exposing it as parameters.

  9. 9
    Article
    Avatar of swizecswizec.com·46w

    Why utils are bad, an example

    Utils-based code organization creates circular import problems that break applications unexpectedly. When payment utils depend on email utils and vice versa, Python cannot resolve the circular dependencies. The solution is vertical module organization based on domain context rather than technical function - group everything about payments (including emails) in a payment module, while keeping low-level operations like email sending in separate atomic libraries.

  10. 10
    Article
    Avatar of bytebytegoByteByteGo·48w

    EP166: What is Event Sourcing?

    Event sourcing is a design paradigm that stores events leading to state changes rather than current state data, providing determinism and recoverability. The approach uses an append-only event store with sequenced events to rebuild application state. The newsletter also covers software deployment pipelines, data lake architecture, Netflix's distributed counter implementation, and TCP handshake mechanics.

  11. 11
    Article
    Avatar of antonzAnton Zhiyanov·46w

    JSON evolution in Go: from v1 to v2

    Go 1.25 introduces json/v2 package with significant changes from v1. Key improvements include new MarshalWrite/UnmarshalRead functions for direct I/O operations, streaming encode/decode via jsontext package, configurable options for formatting and behavior, enhanced field tags (inline, format, unknown), flexible custom marshalers with MarshalFunc/UnmarshalFunc, and changed default behaviors (nil slices/maps marshal to []/{}). Performance shows similar marshaling speed but 2.7x-10.2x faster unmarshaling. The package remains experimental requiring GOEXPERIMENT=jsonv2 flag.

  12. 12
    Article
    Avatar of nordicapisNordic APIs·47w

    Top 10 API Gateways in 2025

    A comprehensive comparison of 10 leading API gateways in 2025, including Kong Gateway, Zuplo, Tyk, Gravitee, MuleSoft, Axway, Sensedia, Azure APIM, WSO2, and IBM API Connect. Each solution is evaluated based on core features, use cases, and target audiences, with considerations for deployment models, protocol requirements, ecosystem integration, and compliance needs. The guide emphasizes that API gateways have evolved beyond simple routing to become control planes for security, observability, and developer experience.

  13. 13
    Article
    Avatar of bytebytegoByteByteGo·48w

    Our New Book, Mobile System Design Interview, Is Now Available

    ByteByteGo has released a new book focused on mobile system design interviews, authored by Manuel Vicente Vivo. The book provides a 5-step framework for tackling mobile system design questions, includes 7 real interview questions with detailed solutions, covers 24 technical deep dives, and spans 175 topics. It features practical chapters on designing popular apps like news feeds, chat applications, stock trading platforms, and cloud storage services, along with mobile-specific building blocks and a quick reference cheat sheet.

  14. 14
    Article
    Avatar of itnextITNEXT·48w

    Abstractions Done Right: Discussing When It Is Worth Or Not

    Abstractions like interfaces and layered architectures are valuable when used correctly, not just for replacing implementations but for deferring decisions and isolating concerns. The author advocates for a 4-layer approach (UI, Application, Domain, Infrastructure) that enables vertical development and reduces cognitive load. Two real-world examples demonstrate when abstractions provide clear value (migrating from serverless to Kubernetes) versus when they create unnecessary overhead (simple Step Function tasks). The key is understanding that abstractions' main benefit is enabling focused development and clearer intent, with implementation flexibility as a bonus.

  15. 15
    Article
    Avatar of xkcdxkcd·46w

    xkcd: Interoperability

    An xkcd comic exploring the humorous challenges and complexities that arise when trying to make different software systems, platforms, or technologies work together seamlessly.

  16. 16
    Article
    Avatar of baeldungBaeldung·48w

    Event-Driven LISTEN/NOTIFY Support in Java using PostgreSQL

    PostgreSQL's LISTEN and NOTIFY commands enable asynchronous communication between database server and clients, creating a simple messaging system. The LISTEN command registers interest in receiving events on specific channels, while NOTIFY broadcasts messages to all listeners. Java applications can raise notifications using standard JDBC with either NOTIFY commands or pg_notify() function. Listening for notifications requires driver-specific functionality - the official PostgreSQL JDBC driver requires polling with getNotifications(), while PGJDBC-NG provides callback-based listeners for more efficient event handling. This mechanism supports real-time dashboards, cache invalidation, and data auditing use cases.

  17. 17
    Article
    Avatar of communityCommunity Picks·45w

    kelindar/event: Simple internal event bus for Go applications

    kelindar/event is a high-performance, in-process event dispatcher library for Go that enables decoupling of modules through event-driven patterns. It processes millions of events per second with 4x to 10x better performance than channels, supports both synchronous and asynchronous processing, and works with any type implementing the Event interface. The library provides both a default global dispatcher and specific dispatcher instances, making it ideal for lightweight pub/sub patterns within single Go processes while being unsuitable for inter-service communication or event persistence scenarios.

  18. 18
    Article
    Avatar of aiAI·48w

    High performance real-time knowledge graph open source stack with LLM, Kuzu and CocoIndex

    CocoIndex now supports Kuzu as a target graph database, creating a complete open-source stack for building high-performance knowledge graphs with real-time updates. The integration allows developers to use LLMs for extracting relationships from documents and storing them in Kuzu with just ~200 lines of Python code. The framework follows a dataflow programming model where developers focus on transformations while CocoIndex handles data operations automatically. The stack includes data ingestion, transformation, graph storage, and visualization tools, with seamless switching between different graph databases like Neo4j and Kuzu.

  19. 19
    Video
    Avatar of fireshipFireship·47w

    That time Google Cloud Platform bricked the Internet…

    Google Cloud Platform experienced a major outage that affected popular services like Snapchat, Spotify, Discord, and Cloudflare, causing nearly 100% error rates for over 2 hours. The incident was caused by a dormant bug in Google's API management service - a null pointer exception in code that lacked proper error handling. The bug was introduced on May 29th but remained undetected until a policy change on June 12th triggered the faulty code path, causing the API management binary to crash globally. Google took 40 minutes to begin rollback and 4 hours to fully stabilize, potentially costing millions in SLA credits and damaging their reputation in the competitive cloud market.

  20. 20
    Article
    Avatar of tinybirdTinybird·47w

    MCP vs APIs: When to Use Which for AI Agent Development

    Model Context Protocol (MCP) and traditional APIs serve different purposes in AI agent development. MCP excels at enabling dynamic tool selection, agent autonomy, and rapid prototyping by providing a standardized way for LLMs to discover and use tools conversationally. Traditional APIs are better for performance-critical applications, complex data operations, and deterministic workflows requiring strict security controls. The most effective approach often combines both: using MCP for flexible reasoning and natural language interactions, while leveraging direct API calls for bulk operations and enforcing constraints. MCP doesn't replace APIs but adds a conversational layer that makes them LLM-friendly.

  21. 21
    Article
    Avatar of css_tricksCSS-Tricks·46w

    A Better API for the Intersection and Mutation Observers

    Demonstrates how to refactor JavaScript's MutationObserver and IntersectionObserver APIs into more user-friendly wrapper functions. The refactored APIs support both callback and event listener patterns, simplify element observation, and provide cleaner methods for disconnecting observers. Includes practical examples and mentions a utility library that implements these improvements.

  22. 22
    Article
    Avatar of telerikTelerik·47w

    Domain-Driven Design Principles: Value Objects in ASP.NET Core

    Value objects are immutable entities in domain-driven design that lack identity and are recognized by their values rather than unique identifiers. The article demonstrates implementing value objects in ASP.NET Core through a practical Address example, covering the creation of a base ValueObject class with equality comparison methods, proper Entity Framework Core configuration for non-entity objects, and the benefits of using value objects for domain expressiveness, immutability, and separation of concerns in software architecture.

  23. 23
    Video
    Avatar of awesome-codingAwesome·47w

    A way better alternative to microservices... Self-contained systems explained

    Self-contained systems (SCS) offer a middle ground between monolithic and microservices architectures by creating independent vertical slices that include their own UI, backend logic, and database without runtime dependencies. Unlike microservices that often create distributed complexity for systems that don't need it, SCS maintains simplicity while providing modularity through business-aligned boundaries. Communication between systems is minimized and handled through UI links or asynchronous messaging. This approach eliminates common microservices problems like circuit breakers, distributed tracing, and complex DevOps while avoiding the monolithic frontend antipattern.

  24. 24
    Article
    Avatar of lightbendLightbend·47w

    Use cases for agentic AI

    Akka CEO Tyler Jewell presents four real-world use cases for agentic AI systems in production, featuring companies like Swiggy, Tubi, a global retailer, and Llaama. The presentation covers key insights on engineering practices, architectural evolution, trust design, and creating deterministic layers for successful agentic AI implementation.