Building the right structure

Software architecture is one of the most consequential aspects of software engineering. Architectural decisions influence development costs, operational reliability, system performance, maintainability, and an organization's ability to respond to changing business requirements.

However, software architecture is also a discipline particularly susceptible to overengineering, technological dogmatism, and the pursuit of theoretical perfection at the expense of practical business outcomes.

An architect can design an exceptionally sophisticated system that satisfies every conceivable engineering principle while simultaneously failing to satisfy the needs of the organization that commissioned it.

Good architecture requires more than technical knowledge. It requires restraint, commercial awareness, pragmatism, and the ability to distinguish between complexity that solves a problem and complexity that creates one.

1. A Genius Admires Simplicity; an Idiot Admires Complexity

There is a fundamental distinction between the ability to design a complex system and the ability to solve a complex problem simply.

The former demonstrates technical knowledge. The latter demonstrates engineering judgment.

Software architects are frequently exposed to sophisticated architectural patterns, distributed computing paradigms, messaging technologies, abstraction strategies, and infrastructure capabilities. Each of these provides legitimate solutions to particular categories of problems.

However, knowing that a solution exists does not establish that it is necessary.

Consider an application responsible for managing purchase orders within a relatively small organization.

An architect could design a system consisting of:

  • Independently deployed microservices.

  • An API gateway.

  • Distributed message brokers.

  • Event sourcing.

  • Command Query Responsibility Segregation (CQRS).

  • Separate read and write databases.

  • Distributed caching.

  • Container orchestration.

  • Custom workflow orchestration.

  • Eventually consistent data replication.

Such an architecture could provide substantial scalability, extensibility, and operational flexibility.

Alternatively, a modular monolith with a relational database and a small number of background workers might satisfy every established business requirement at a fraction of the development and operational cost.

The more sophisticated architecture is not necessarily the better architecture.

Complexity Is a Liability Until It Proves Otherwise

Every additional architectural component introduces responsibilities that someone must assume.

A message broker must be monitored. A distributed transaction must account for partial failures. A replicated database must maintain acceptable consistency. A microservice must be deployed, secured, versioned, and observed independently.

These responsibilities accumulate throughout the lifetime of a system.

Architectural complexity introduces costs across numerous areas:

  • Initial development and implementation.

  • Infrastructure provisioning and hosting.

  • Testing and quality assurance.

  • Security and access management.

  • Monitoring and observability.

  • Production troubleshooting.

  • Developer onboarding.

  • Disaster recovery.

  • Long-term maintenance.

  • Future architectural modifications.

These costs are particularly problematic when the capabilities introduced by the architecture provide little or no measurable business value.

An architect should be able to justify every significant component of a proposed system. If removing a component does not materially compromise a business requirement, its inclusion deserves further scrutiny.

Complexity should be treated as an expenditure rather than an accomplishment.

Simplicity Is Not the Absence of Sophistication

Designing a simple system does not necessarily mean designing a primitive system.

A simple architecture can be highly scalable, secure, reliable, and maintainable. Achieving these characteristics without introducing unnecessary infrastructure or abstraction often requires considerable experience.

Inexperienced architects may introduce complexity because they recognize a familiar architectural pattern but do not sufficiently understand the problem to determine whether that pattern is appropriate.

Experienced architects are more capable of recognizing which problems do not need to be solved, which requirements can be satisfied through existing capabilities, and which architectural investments can safely be deferred.

The real craft of software architecture is finding ways to accomplish more with less:

  • Fewer moving parts.

  • Fewer dependencies.

  • Fewer deployment boundaries.

  • Fewer opportunities for failure.

  • Less duplicated functionality.

  • Less code to maintain.

  • Less operational overhead.

The objective is not minimalism for its own sake. It is to eliminate complexity that does not contribute proportionally to the intended outcome.

A sophisticated architect is not someone who knows how to introduce complexity. It is someone who knows how to avoid it without compromising the solution.

2. Do Not Be Dogmatic About Architectural Patterns

One of the most counterproductive tendencies within software engineering is treating architectural patterns as ideological positions.

Microservices versus monoliths. REST versus messaging. SQL versus NoSQL. Event-driven versus synchronous communication. Serverless versus traditional infrastructure.

These discussions frequently become debates about which technology or architectural pattern is universally superior.

The problem is that architecture is inherently contextual.

A solution that is exceptionally effective within one organization may be entirely inappropriate within another.

Differences in organizational structure, transaction volume, regulatory requirements, development resources, infrastructure budgets, and operational capabilities can fundamentally change which architecture is appropriate.

An architect should not enter a project with a predetermined architectural conclusion.

The architecture should emerge from the requirements.

When a Monolith Makes Sense

Monolithic architectures are frequently characterized as outdated or inherently difficult to maintain. This characterization overlooks the distinction between a poorly structured monolith and a deliberately designed modular monolith.

A modular monolith can provide clear domain boundaries, separation of concerns, encapsulated business logic, and well-defined internal interfaces while retaining the operational simplicity of a single deployable application.

A monolithic architecture may be particularly appropriate when:

  • The engineering team is relatively small.

  • The application represents a cohesive business domain.

  • Independent deployment of individual components is unnecessary.

  • Transactional consistency is important.

  • Infrastructure and operational budgets are limited.

  • Application requirements are still evolving.

  • The expected workload can be accommodated through conventional scaling mechanisms.

  • Rapid development and predictable delivery are priorities.

A monolith eliminates many of the challenges associated with distributed computing.

Communication between components can occur through ordinary method calls rather than network requests. Transactions can frequently be managed within a single database. Deployment, debugging, and integration testing can be considerably more straightforward.

These are not insignificant advantages.

Many business applications can operate successfully for years without requiring a distributed microservice architecture.

When Microservices Make Sense

Microservices provide legitimate architectural advantages when the requirements justify independent service boundaries.

A microservice architecture may be appropriate when:

  • Multiple engineering teams require independent ownership and deployment capabilities.

  • Different components have substantially different scaling requirements.

  • Individual business capabilities require independent release cycles.

  • Fault isolation is an important operational requirement.

  • Different domains have distinct security or regulatory requirements.

  • Geographic distribution introduces legitimate architectural constraints.

  • Independent service boundaries provide measurable organizational or operational benefits.

Consider an enterprise platform responsible for payment processing, customer identity, order fulfillment, inventory management, and financial reconciliation.

These capabilities may have different operational requirements, security boundaries, workloads, and development teams.

Under those circumstances, independent services may provide meaningful advantages.

However, distributing an application across multiple services introduces an entirely different category of engineering problems.

Network communication can fail. Messages can arrive more than once. Events can be processed out of order. Data can become temporarily inconsistent. Independent deployments can introduce compatibility issues.

Microservices do not eliminate complexity. They redistribute it across service boundaries, infrastructure, and operational processes.

An architect must determine whether the benefits of that redistribution justify its costs.

Learn From Successful Industry Implementations

Architectural decisions should not be based exclusively on theoretical engineering principles.

When designing a system, investigate how comparable problems have been solved successfully within the same industry.

An architect designing a healthcare platform should examine established healthcare architectures. Someone designing a financial transaction processing system should investigate proven approaches within financial services. An architect developing industrial automation software should understand the operational characteristics of existing industrial systems.

Successful industry implementations can provide insight into:

  • Common architectural patterns.

  • Established integration mechanisms.

  • Regulatory and compliance considerations.

  • Expected consistency guarantees.

  • Operational reliability requirements.

  • Industry-specific failure scenarios.

  • Typical scalability requirements.

  • Proven approaches to disaster recovery.

This does not mean blindly replicating another organization's architecture.

A multinational corporation with hundreds of engineers and millions of daily transactions may have legitimate requirements that do not exist within a regional business with a small engineering team.

The important consideration is whether the implementation is comparable in workload, business requirements, organizational capabilities, and operational constraints.

There is little justification for introducing an experimental architectural approach when a simpler, established approach has repeatedly solved substantially similar problems.

Innovation has its place, but architecture should not become an experiment conducted at the stakeholder's expense without their understanding and agreement.

Choose an architecture because it satisfies the requirements, not because it satisfies your architectural preferences.

3. Decoupling Is Valuable Until It Compromises the Business

Decoupling is one of the most widely accepted principles in software engineering.

Reducing dependencies between systems can improve maintainability, fault isolation, deployment independence, and architectural flexibility.

However, decoupling is not an unconditional objective.

There are circumstances in which eliminating a dependency introduces more significant problems than maintaining it.

This becomes particularly apparent when integrating with existing enterprise systems that serve as authoritative sources of business data.

Understand What a Source of Truth Actually Represents

Enterprise environments frequently contain established systems responsible for maintaining authoritative business information.

Examples include:

  • An ERP system responsible for inventory and financial transactions.

  • A CRM system responsible for customer records.

  • An identity provider responsible for user identities and access permissions.

  • A payment processing platform responsible for transaction status.

  • A warehouse management system responsible for physical inventory movements.

  • A pricing platform responsible for current product prices and promotional rules.

These systems are not merely databases containing information. They represent ownership of specific business domains.

When an existing system is established as the authoritative source of truth, that authority has architectural consequences.

A separate application may require access to its data, but requiring access does not necessarily justify maintaining an independent copy of that data.

Consider an architect developing a new application that needs access to current inventory availability.

To reduce dependence on the organization's existing ERP system, the architect proposes replicating inventory information into a separate database.

The application will no longer need to communicate directly with the ERP system whenever inventory information is requested. Instead, it will retrieve information from its own local database.

From an architectural perspective, this appears attractive.

The application becomes less dependent on ERP availability, potentially improves response times, and gains greater control over its own database structure.

However, a new problem has been introduced: the replicated inventory information may not reflect the actual state of inventory.

Eventual Consistency Is a Business Decision

Data replication introduces the possibility of synchronization delays.

Even when replication is implemented through event-driven communication, change data capture, or near-real-time integration, there will generally be some period during which the replicated data differs from its authoritative source.

Depending on the architecture and operating conditions, this discrepancy may last milliseconds, seconds, minutes, or considerably longer during an integration failure.

From a technical perspective, this is often described as eventual consistency.

From a business perspective, it may mean that the application is displaying incorrect information.

Consider several examples:

  • A customer purchases a product that is no longer available because the replicated inventory has not been updated.

  • A sales representative provides a quotation using an outdated pricing record.

  • An employee retains access to sensitive information after their permissions have been revoked.

  • A financial application displays a transaction as unpaid even though payment has already been received.

  • An order is processed using customer information that has since been corrected in the authoritative system.

The architect may understand that these discrepancies are temporary and represent expected behavior within a distributed architecture.

The stakeholder may have an entirely different interpretation.

If the stakeholder expects information to reflect the current state of the authoritative system, explaining that the application is eventually consistent does not resolve the discrepancy.

The system is failing to meet an established business expectation.

This is why consistency requirements must be explicitly discussed with stakeholders rather than silently determined by architects.

Relevant questions include:

  • How old can the displayed information be before it becomes unacceptable?

  • What happens if synchronization is delayed for several minutes?

  • What happens if synchronization fails for several hours?

  • Can business transactions proceed using potentially outdated information?

  • What financial or operational consequences could result from incorrect data?

  • Should users be informed when information may be outdated?

  • Which operations require authoritative validation before proceeding?

The answers to these questions should determine the integration architecture.

Eventual consistency is not merely a technical implementation detail. It is a business constraint that stakeholders must understand and accept.

Sometimes the Correct Dependency Is a Direct Dependency

There is nothing inherently wrong with an application depending on another system when that system owns a capability the application requires.

If an ERP system is responsible for determining current inventory availability, querying that ERP system directly may be the most appropriate architectural decision.

If a pricing engine is responsible for determining the applicable price of a product, requesting the price directly from that engine may be preferable to maintaining an independent representation of its pricing logic.

If an identity provider is responsible for determining whether a user is authorized to access a protected resource, authoritative permission validation may be necessary before allowing certain operations.

These dependencies reflect legitimate business relationships.

Attempting to eliminate them entirely can result in duplicated business logic, duplicated data, inconsistent behavior, and additional synchronization infrastructure.

In some cases, an architecture intended to eliminate a dependency ultimately creates a more complicated dependency.

Instead of depending on a single authoritative API, the application now depends on:

  • A data extraction mechanism.

  • A message broker or synchronization service.

  • A transformation process.

  • A replicated database.

  • Retry and recovery mechanisms.

  • Data reconciliation processes.

  • Monitoring and alerting infrastructure.

  • Procedures for correcting synchronization failures.

The original dependency has not disappeared. It has been transformed into a distributed integration pipeline with additional failure modes.

That transformation may be justified, but it should not be assumed to represent an architectural improvement.

Decouple the Implementation, Not Necessarily the Data

There is an important distinction between coupling application logic to a particular external implementation and depending on an authoritative business capability.

An application can depend on an external system without tightly coupling its entire codebase to that system's implementation details.

For example, an application that requires current inventory availability could define an abstraction representing that capability.

public interface IInventoryAvailabilityProvider
{
    Task<int> GetAvailableQuantityAsync(
        string productId,
        CancellationToken cancellationToken = default);
}

An implementation of this interface could communicate directly with the organization's ERP system.

The application does not need to understand the ERP's authentication mechanisms, communication protocols, database structure, or proprietary interfaces.

If the organization eventually replaces its ERP system, a new implementation of the interface can be introduced without fundamentally restructuring the application.

This provides implementation-level decoupling while preserving the authoritative relationship between the application and its source of truth.

The application remains dependent on the inventory capability, but it is not unnecessarily coupled to the technology providing that capability.

This approach also provides a natural location for introducing appropriate integration safeguards:

  • Request timeouts.

  • Carefully scoped retry policies.

  • Circuit breakers.

  • Authentication and authorization.

  • Observability and diagnostic logging.

  • Explicit handling of unavailable external services.

  • Caching where acceptable consistency requirements permit it.

These safeguards can improve the resilience of an integration without automatically introducing a separate copy of authoritative business data.

Of course, querying an authoritative system does not by itself guarantee that a subsequent transaction will remain valid. Inventory may change between checking availability and submitting an order. Operations requiring strict consistency may need to be executed or validated atomically by the authoritative system itself.

The architecture must account for these business invariants rather than assuming that a synchronous API call resolves every consistency problem.

4. Know When Data Replication Is Actually Justified

Although unnecessary data replication can introduce significant problems, there are legitimate circumstances in which maintaining local copies of external data is appropriate.

Replication may be justified when:

  • The authoritative system cannot accommodate the required query volume.

  • Analytical workloads would negatively affect transactional performance.

  • Applications must operate during network interruptions.

  • Geographic distribution introduces unacceptable communication latency.

  • External API usage restrictions prevent frequent authoritative queries.

  • Historical snapshots are required for auditing or reporting.

  • Search functionality requires a specialized indexing mechanism.

  • Stakeholders explicitly accept a defined level of data staleness.

The important consideration is that replication should address an identifiable requirement.

For example, an analytics platform may need to aggregate millions of historical transactions. Executing those queries directly against a production ERP system could significantly degrade its operational performance.

Under those circumstances, replicating transaction data into a dedicated analytical database may be entirely appropriate.

The analytical platform does not necessarily require every transaction to become available immediately. A synchronization delay of several minutes or even several hours may be acceptable.

Conversely, an application responsible for determining whether a financial transaction can be authorized may have substantially stricter consistency requirements.

The same organization may legitimately use both architectural approaches depending on the business capability involved.

Consider a Hybrid Approach

Architectural decisions do not always require choosing between complete replication and complete dependence on an external system.

A hybrid approach can frequently provide the advantages of both.

Consider an e-commerce platform.

The application might maintain local copies of:

  • Product descriptions.

  • Product images.

  • Search indexes.

  • Product categories.

  • Historical transaction records.

  • Approximate inventory availability for browsing.

However, when a customer attempts to complete a purchase, the application may communicate directly with the authoritative systems to validate:

  • Current pricing.

  • Applicable promotional rules.

  • Actual inventory availability.

  • Payment authorization.

  • Customer eligibility.

This approach allows the application to provide responsive browsing experiences while preserving authoritative validation for consequential business transactions.

The architect does not need to impose the same consistency model across every category of data.

Some information can tolerate synchronization delays. Other information cannot.

Recognizing this distinction allows architects to make considerably more precise decisions regarding integration, replication, caching, and system dependencies.

Replicate data because the business benefits from replication, not because architectural purity demands that every system maintain its own copy.

5. Architecture Should Reflect the Economics of the Business

Software architecture is ultimately an investment decision.

Every architectural capability requires resources to design, implement, operate, and maintain.

The business must receive sufficient value from that investment to justify its existence.

Consider an architect who proposes a highly distributed, multi-region infrastructure capable of supporting millions of concurrent users.

From a technical perspective, the architecture may be impressive.

However, if the application is expected to serve several hundred internal employees, the additional infrastructure and engineering costs may never produce a meaningful return.

Similarly, an architecture that introduces multiple layers of data replication to eliminate dependence on a highly reliable internal system may increase operational costs while simultaneously reducing data accuracy.

These are not merely technical shortcomings. They are failures to align architectural decisions with business economics.

Before introducing a significant architectural component, evaluate:

  • What business problem does this component solve?

  • What would happen if the component were omitted?

  • What is the initial implementation cost?

  • What are the ongoing operational and maintenance costs?

  • What additional failure modes does it introduce?

  • Can the same requirement be satisfied through existing infrastructure?

  • How difficult would it be to introduce the capability later?

  • Is the anticipated benefit measurable?

An architect should be capable of explaining architectural decisions to stakeholders without relying exclusively on technical terminology.

Rather than explaining that a distributed architecture provides independent horizontal scalability, explain which business workload requires independent scaling and how that capability will improve operational performance or reduce costs.

Rather than explaining that data replication improves system decoupling, explain what operational dependency is being reduced and what consistency trade-offs the business must accept.

If an architectural decision cannot be justified in terms of business requirements, risk reduction, operational efficiency, or reasonable future needs, its necessity should be questioned.

6. Design for Evolution Rather Than Hypothetical Perfection

One of the greatest challenges in software architecture is accepting that the requirements of a system will change.

Architects frequently attempt to address this uncertainty by designing systems capable of accommodating every conceivable future requirement.

The result is often an architecture containing capabilities that the organization may never use.

A more pragmatic approach is to design systems that can evolve as requirements become better understood.

This may involve:

  • Establishing clear domain boundaries within a modular monolith.

  • Isolating external system integrations behind well-defined interfaces.

  • Maintaining appropriate ownership of business logic and data.

  • Introducing asynchronous processing where actual workload characteristics justify it.

  • Extracting independently deployable services when operational requirements emerge.

  • Adding caching and replication when measurable performance constraints warrant them.

  • Revisiting architectural decisions as the organization grows.

This approach does not require ignoring future requirements. It requires distinguishing between reasonably anticipated requirements and purely hypothetical possibilities.

Some architectural decisions are expensive to reverse and deserve substantial consideration early in a project. Security boundaries, regulatory obligations, data ownership, and critical business invariants are examples.

Other decisions can be deferred until sufficient evidence exists to justify them.

The ability to distinguish between these categories is an essential architectural skill.

A system does not need to begin its existence with the architecture it will require ten years later.

It needs an architecture that satisfies today's requirements while providing a reasonable path toward tomorrow's.

Conclusion: Architecture Is an Exercise in Restraint

The purpose of software architecture is not to demonstrate technical sophistication, enforce ideological purity, or eliminate every conceivable dependency.

It is to establish a technical foundation that allows an organization to accomplish its objectives reliably, efficiently, and sustainably.

Good architects understand that simplicity is an achievement rather than a limitation.

They choose between monoliths and microservices based on stakeholder requirements and proven industry implementations rather than personal preferences. They recognize that decoupling is valuable but not when it compromises the accuracy or reliability of business information. They understand that authoritative systems sometimes need to be embraced rather than architecturally circumvented.

Most importantly, they recognize that every additional component, abstraction, service, and integration introduces a cost that must ultimately be justified.

The most impressive architecture is not necessarily the one containing the greatest number of technologies, the most sophisticated design patterns, or the highest theoretical scalability.

It is the architecture that satisfies the greatest number of legitimate business requirements with the least unnecessary complexity.

Previous
Previous

How to get signed

Next
Next

Keeping up with the Joneses