Questions and answers | Software architecture and integration

Software Architecture and Integration Questions

How to tell when architecture is the constraint, how to connect systems without coupling them permanently, and how to make a modernization decision that survives contact with the business.

Reviewed 25 November 2026 .NET 10 LTS · SQL Server 2022–2025 · OPC UA 1.05 Service page

Architecture questions often arrive disguised as delivery problems: a release takes three weeks, a change breaks an unrelated feature, two systems disagree about the same customer, or nobody can say which service owns a record. The architecture is the set of decisions that makes those problems likely or unlikely.

These answers focus on the decisions with long consequences: boundaries, interfaces, ownership, failure behavior, and the cost of changing your mind later.

How to read these answers. Answers describe general architecture and integration practice. The right pattern depends on the system's constraints, the team's operating model, and the cost of failure; there is no universal default beyond “make the boundary explicit.”

Diagnosing the constraint

Whether the problem is the architecture, the process, or the team.

Is an architecture assessment the same as a code review?

No. A code review examines a change for correctness and maintainability. An architecture assessment examines the system's structure, boundaries, dependencies, data ownership, and operational qualities, and recommends decisions that affect the next several years.

A code review asks whether this pull request is safe to merge. An architecture assessment asks whether the system can meet its current and near-future requirements without a structural change. It looks at deployment topology, integration contracts, data ownership, failure modes, observability, security boundaries, and the cost of change. It may read code, but the output is a set of decisions and risks, not a list of line comments.

A useful assessment produces a current-state map, a constraint list, and a sequenced set of recommendations with tradeoffs. It should distinguish “fix now,” “plan for,” and “accept.” An assessment that recommends a rewrite without a business case is an opinion, not an assessment.

General practice

How do you know when architecture is the constraint?

When small changes require coordinated releases, when incidents cluster around the same boundary, when data is duplicated with no owner, or when the team cannot deploy independently. These are structural symptoms, not individual bugs.

Look for repeatable patterns. A change that touches five services and three teams for one business rule indicates a boundary problem. A reporting outage caused by a transactional system's schema change indicates a coupling problem. Two systems that both edit the same customer record indicate an ownership problem. A deployment that requires a maintenance window for a minor change indicates a topology problem.

Measure change lead time, deployment frequency, incident recurrence, and the percentage of work spent on unplanned fixes. If the numbers are bad and the causes are structural, more testing or more meetings will not fix them. The assessment should identify the smallest structural change that removes the constraint, not the most fashionable target architecture.

General practice; DORA metrics are one reference

Connecting systems

The interface is the contract; the transport is replaceable.

How do you integrate two systems that share data?

Decide which system owns each field, choose an interface both sides support, define the message and its failure behavior, and make the integration idempotent. Do not let both systems write the same field.

Start with ownership. If both systems can edit a customer address, the integration has to reconcile, and reconciliation is a permanent cost. Pick one owner and make the other a subscriber. Then define the contract: the key, the payload, the direction, the frequency, and what happens on failure. A contract that is only in someone's head is not a contract.

The transport can be an API, a message, a file, or a database view. The choice depends on latency, volume, support, and the team's operating skills. Whatever the transport, the receiver should be idempotent, the sender should retry with a bounded policy, and both sides should log a correlation id. That is what makes the integration diagnosable when it breaks.

General practice

API vs database integration: which is better?

Use an API when the owning system must enforce business rules and the caller needs a response. Use a read-only view or replica for reporting. Avoid direct writes to another system's tables; they bypass validation and couple you to its schema.

An API is a contract with behavior: validation, authorization, errors, and versioning. A database view is a contract with a schema: columns, types, and joins. The API is usually the better boundary for transactions because the owning system stays in control. The database is often better for bulk reads and analytics, provided the view is supported and the load is acceptable.

Direct writes into another application's tables are the riskiest option. They bypass triggers, business rules, and audit trails, and they break when the schema changes. If there is no API and no supported staging table, treat the direct write as a temporary, monitored exception with an owner and an exit plan, not as the architecture.

General practice

How do you integrate a legacy system with no API?

Look for a supported database view, file export, message queue, or vendor connector first. If none exists, put an adapter in front of the legacy system and isolate the workaround. Screen scraping and direct writes are last resorts.

The adapter is the key idea: a small service that knows the legacy system's quirks and exposes a clean contract to the rest of the estate. The rest of the system talks to the adapter, not to the legacy database or UI. When the legacy system is replaced, the adapter is replaced and the contract stays.

  1. Inventory what the legacy system can produce: reports, exports, tables, files, queues, or a terminal interface.
  2. Choose the most stable output and wrap it in an adapter with validation and logging.
  3. Define the contract the rest of the system needs, independent of the legacy format.
  4. Monitor the adapter like any other integration: freshness, errors, and volume.
  5. Document the exit plan. A workaround without a retirement path becomes permanent.

General practice; anti-corruption layer pattern

Monolith vs microservices: which should we choose?

Start with a modular monolith unless you have a concrete reason for distributed services: independent scaling, independent deployment by separate teams, or a regulatory boundary. Microservices trade code complexity for operational complexity.

A modular monolith with clear internal boundaries is easier to develop, test, deploy, and debug. It is the right default for a small team and an uncertain domain. Microservices become valuable when the organization has multiple teams that need to deploy independently, when one component has a radically different scaling profile, or when a boundary must be isolated for security or compliance.

Distributed systems add network failures, partial failure, eventual consistency, service discovery, observability, and a much higher operational bar. If the team cannot operate one service well, it will not operate twenty. Choose the simplest architecture that meets the actual constraint, and keep the boundaries clean so a future split is possible.

General practice

When do you need an API gateway or an ESB?

An API gateway handles cross-cutting edge concerns: authentication, rate limiting, routing, and observability. An ESB adds transformation and orchestration across many systems and is often heavier than necessary. Use the smallest layer that solves the actual problem.

A gateway is useful when many clients call many services and you want one place for authentication, quotas, TLS termination, and routing. It should not become a hidden business-logic layer. An ESB is an older pattern for centralizing transformation, routing, and orchestration across heterogeneous systems; it can be valuable in a large enterprise with many protocols, but it can also become a single point of change and a bottleneck.

Modern alternatives include lightweight integration services, message brokers, and iPaaS for SaaS-to-SaaS flows. The decision depends on the number of interfaces, the transformation complexity, and who operates the layer. A gateway that only routes is easy to reason about; an ESB that contains business rules is a second application that nobody owns.

General practice

Failure, consistency, and change

The parts that decide whether the integration is trustworthy under stress.

How do you handle distributed transactions across services?

Avoid them where possible. Use a saga or process manager with explicit compensating actions, an outbox for reliable publishing, and idempotent receivers. Accept eventual consistency and design the business process around it.

A two-phase commit across services is fragile and often unsupported by the participants. The practical alternative is a saga: a sequence of local transactions, each with a compensating action if a later step fails. The saga state is persisted so it can resume after a crash, and each step is idempotent so a retry does not duplicate the effect.

The outbox pattern solves the “database commit succeeded but the message was not published” problem: write the business row and the outbox row in one transaction, then publish from the outbox. The receiver must handle duplicates. This is more code than a single transaction, but it is honest about the failure modes of a distributed system. If the business cannot tolerate eventual consistency, the boundary may be wrong.

General practice

How do you make an integration idempotent?

Give every request a stable key, store the key with the result, and return the stored result when the key repeats. Use a unique constraint or a deduplication table, and make the side effect conditional on the key being new.

Idempotency means the same request can be applied more than once without changing the outcome. The key must identify the business intent, not the HTTP request: an order id, a payment id, a work order plus operation plus serial. A random request id generated on each retry is useless because it changes every time.

The receiver records the key and the result in the same transaction as the side effect. If the key is already present, it returns the recorded result. For long-running operations, record a status so a retry can resume rather than restart. Test the duplicate path deliberately: send the same request twice and verify the database has one row, not two.

General practice

How do you manage vendor dependencies in an architecture?

Isolate the vendor behind an adapter, keep the contract in your own terms, test the integration, and have an exit plan. The goal is not to avoid vendors; it is to avoid letting a vendor's model become your model.

A vendor SDK or API will change on the vendor's schedule. If its types and assumptions spread through the codebase, every upgrade becomes a rewrite. Put the vendor behind an interface that your application owns, translate at the boundary, and keep the vendor-specific code in one place. That also makes it possible to test the application without the vendor's system.

Contract tests and a staging environment catch changes before production. An exit plan is not a fantasy about replacing the vendor; it is a set of facts: how the data is exported, how long the contract runs, what the migration cost would be, and who owns the relationship. A vendor dependency with no exit plan is a single point of failure with a renewal date.

General practice

How do you pay down technical debt without a rewrite?

Make it visible, tie it to business risk, and pay it down in small changes with tests around the behavior. Use seams to isolate the worst parts, and stop adding new debt in the same area.

Technical debt is not a moral failing; it is a set of decisions that made sense at the time and now cost more than they save. The first step is a register that names the debt, its business impact, and the cost to address it. “The code is messy” is not actionable. “The invoice calculation has no tests, and a change takes three days of manual regression” is.

Pay it down where change is already happening. Add characterization tests before refactoring, extract a seam around the legacy dependency, and improve the part you are touching. A dedicated “debt sprint” rarely survives contact with production. The sustainable approach is a small, continuous allocation tied to the areas with the highest change frequency and risk.

General practice

Engagement and first steps

How an independent review fits alongside an internal team or a vendor.

Can you review a design our vendor proposed?

Yes. An independent review can identify gaps, hidden dependencies, unrealistic assumptions, and questions worth asking before the contract is signed.

The output is a short written opinion with specific, actionable concerns rather than a general critique. It is most useful before the design is frozen and before the integration work is priced.

Do you replace our internal architecture team?

No. We supplement it. The most useful engagements combine an outside perspective with the institutional knowledge your team already has.

We document decisions and reasoning so that knowledge stays with the organization. The engagement should make the internal team more effective, not create a permanent external dependency.

Can you help with one integration rather than a full assessment?

Yes. A focused integration or architecture decision is a legitimate engagement.

If the narrow scope is likely to hide a larger dependency problem, we will say so before the work begins. The choice between a focused fix and a broader assessment should be made with the evidence, not with a preference for a larger project.

What is the best first step?

Book a free 40-minute session, or send the systems, the capability, and the decision in front of you.

A short description of the systems, the business capability, and the decision you are trying to make is enough. A diagram is helpful but not required.

Scope

These answers describe architecture and integration practice. They do not replace a security review, a formal risk assessment, or the organization's technology standards.

Back to the full Software Architecture & Systems Integration service page