SShortSingh.
Back to feed

Modular Monolith Often Beats Microservices for Early-Stage Projects, Experts Argue

0
·2 views

A widely circulated developer essay argues that most early-stage projects fail not because of monolithic architecture but because engineers adopt microservices before their product complexity justifies it. The piece outlines four architectural patterns — monolith, modular monolith, microservices, and the problematic 'distributed monolith' — noting that the last is the most common outcome of premature service splits. The author highlights that microservices introduce real costs including network latency, distributed transaction complexity, and multiplied CI/CD pipelines that small teams are ill-equipped to manage. As a counterexample, Shopify is cited as running a 2.8-million-line Rails monolith with enforced internal boundaries using a tool called Packwerk. The essay concludes that a modular monolith offers most of the structural benefits of microservices without the operational overhead, and that splitting too early is costlier than splitting too late.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How an Automated Checker Spent Months Enforcing a Wrong Number Across 13 Pages

A software team discovered that their automated fact-checker had been actively propagating an incorrect server tool count across 13 public pages, marketing emails, and internal documents for months. The checker's reference file stored a frozen value of 126, while the actual generated source reported 122, causing the tool to flag correct pages as errors and push writers to adopt the wrong figure. The root cause was that the claims file had copied a value from a generated source rather than linking to it directly, creating two conflicting sources of truth with no way to determine which was current. A secondary issue compounded the problem: two tools enforcing the same rule drew from different pattern lists — one with six entries, one with only four — so the two missing patterns were precisely those that would have caught the discrepancy. The team ultimately fixed 23 incorrect statements across 13 pages with just 35 lines of code, but noted that the real cost was the months during which an authoritative tool had quietly argued for the wrong answer.

0
ProgrammingDEV Community ·

Developer builds five-agent AI course generator with quality gate on Google Cloud Run

A developer has built a multi-agent AI system that automatically generates structured course modules on any given topic in approximately two minutes. The system runs as five separate Cloud Run services in Google's europe-north1 region, comprising a web app, an orchestrator, and three independent leaf agents communicating over authenticated HTTP. A key design feature is a quality gate: a dedicated judge agent evaluates the researcher's findings and returns a structured pass/fail verdict before any course content is written, preventing unreviewed material from reaching the content builder. The orchestrator uses a loop agent that only exits when the judge explicitly returns a passing verdict or an iteration cap is reached, with ambiguous or missing verdicts defaulting to another review cycle. The project was submitted as part of DEV's Education Track challenge focused on building multi-agent systems with Google's Agent Development Kit.

0
ProgrammingDEV Community ·

How to Build a Free Test Harness for Benchmarking Coding AI Agents

Developers can evaluate coding agents more reliably by running a structured audit that tracks five key signals: exit code, elapsed time, modified files, agent output, and test suite results after a task. Rather than relying on model cards or demos, the approach uses a disposable Git directory and a realistic, under-specified task to measure whether an agent makes contained changes without causing collateral damage. A Python script seeds a fixture, injects the task via an environment variable, runs the agent, and returns results as JSON. The same fixture should be run both locally and on a remote server to isolate how much the environment — not the model — influences outcomes. The guide was produced in partnership with MonkeyCode, a platform offering free model access and server-side execution to support this kind of cross-runtime comparison.

0
ProgrammingDEV Community ·

Using a Single State Object Can Eliminate Race Conditions in React Email Fields

A common problem in React forms is managing email validation through multiple separate boolean flags, which can lead to contradictory UI states and stale data bugs. When different parts of the validation process — syntax checks, async availability lookups, and domain policy rules — each write to their own variable, the component can display outdated or conflicting information. A proposed fix involves consolidating all field status into a single discriminated union state object, so the UI always has one authoritative answer about what is happening with the input. This approach also addresses race conditions caused by slow or out-of-order network requests, which can be handled using a lightweight hook paired with the browser's AbortController API. The pattern simplifies both rendering logic and unit testing, since developers assert a single state transition rather than checking multiple boolean combinations after each interaction.