📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How does service-oriented architecture (SOA) differ from microservices? Explain enterprise service buses, contracts, service granularity and data sharing, and what changed between the SOA era and today.

Compares SOA and microservices: ESBs versus smart endpoints and dumb pipes, WSDL/SOAP versus lightweight contracts, granularity, shared versus owned data, governance, and what the industry learned.

Intermediate Theory Intermediate architecture esb integration microservices soa wcf

🎯 Key points

  • SOA (2000s): enterprise-wide integration of reusable services, often via an enterprise service bus (ESB)
  • ESB = central middleware doing routing, transformation, orchestration — a 'smart pipe' owned by a central team
  • Microservices: smart endpoints, dumb pipes — logic in services, brokers only transport (Azure Service Bus, Kafka)
  • Contracts: SOAP/WSDL and WS-* in SOA (WCF and BizTalk in .NET; CoreWCF hosts legacy WCF on modern .NET) vs REST/OpenAPI with ASP.NET Core, gRPC/Protobuf, AsyncAPI/CloudEvents
  • Granularity: SOA services often large and shared enterprise-wide; microservices aligned to one bounded context and team
  • Data: SOA often shared canonical data models and databases; microservices own their data
  • What changed: cloud, containers, CI/CD and IaC made independent deployment cheap — but moved complexity into operations (observability, resilience, latency between services)
  • Culture shift: central governance replaced by team ownership — you build it, you run it

⏱ 30-second answer

Both build systems from services behind contracts, but they differ in where logic lives and who owns what.

  • SOA (2000s) aimed at enterprise-wide reuse and integration, typically through an enterprise service bus (ESB) that did routing, transformation and orchestration — a smart pipe run by a central team — with SOAP/WSDL contracts (WCF in .NET) and shared canonical data models.
  • Microservices use smart endpoints and dumb pipes: logic stays in services, brokers just transport messages; contracts are REST/JSON, gRPC or events; each service is owned by one team and owns its data.

What changed is cheap independent deployment: cloud, containers and CI/CD. The trade-off: microservices remove the ESB bottleneck but push integration and consistency work into every team.

🗣 Full answer (senior)

How I would answer this in an interview

"SOA and microservices share the core idea — build a system from services that hide their implementation behind a contract — but they come from different eras and put responsibility in different places. Classic SOA, in the 2000s, was an enterprise integration strategy: expose the capabilities of big systems like the ERP or CRM as reusable services, and connect them through an enterprise service bus. The ESB did routing, message transformation, orchestration and sometimes business rules. Contracts were SOAP and WSDL with the WS-* standards; in .NET that was WCF. A central integration team owned the bus and often a canonical data model everyone had to map to.

Microservices flipped that: smart endpoints, dumb pipes. The broker — Azure Service Bus, Kafka, RabbitMQ — just moves messages; routing decisions and business logic live in the services. Services are smaller, aligned to one bounded context and one team, and each owns its database instead of sharing an enterprise schema. Contracts are lighter: REST with OpenAPI, gRPC with Protobuf, events described with CloudEvents or AsyncAPI. What really changed was the economics of deployment — cloud, containers, CI/CD and infrastructure as code made it cheap for a team to run its own service.

The mistake I see is treating SOA as obsolete. Lots of Australian enterprises and government agencies still run ESBs or integration platforms like Azure Integration Services, and that's often right for connecting packaged systems. The lesson from SOA is that a central smart pipe becomes a bottleneck and a single point of failure; the lesson from microservices is that removing it pushes integration work into every team."


SOA vs microservices

Classic SOA Microservices
Goal Enterprise reuse and integration Independent delivery by autonomous teams
Communication ESB: routing, transformation, orchestration Direct HTTP/gRPC, or a broker that only transports
Contracts SOAP, WSDL, WS-Security, WS-ReliableMessaging REST + OpenAPI, gRPC + Protobuf, CloudEvents / AsyncAPI
.NET tech WCF, BizTalk ASP.NET Core, gRPC, Azure Service Bus SDK
Granularity Coarse, shared enterprise services One bounded context per service
Data Canonical model, often shared databases Database per service
Governance Central architecture and integration team Team-level ownership with light standards
Deployment Often coordinated, infrequent Independent, frequent

What each got right and wrong

Got right Got wrong
SOA Services behind explicit contracts; integration as a discipline Central smart pipe became bottleneck; heavyweight standards; shared canonical models coupled everyone
Microservices Team ownership, owned data, cheap deploys Often over-applied; integration and consistency work duplicated in every team

When each fits today

Situation Fit
Integrating packaged products (SAP, Dynamics, a legacy mainframe) Integration platform (Azure Logic Apps, API Management, Service Bus) — SOA-style
Building a new product with many teams Microservices or a modular monolith
Exposing legacy capabilities to new apps API facade / gateway in front of legacy services

Production example

A state government department replaced a BizTalk ESB that orchestrated 60 integrations with Azure Integration Services (API Management, Service Bus, Logic Apps). Moving transformation logic out of the central bus and into the owning systems' adapters cut the integration team's change backlog from 11 weeks to 3 and removed the ESB as a single point of failure behind 40% of past P1 incidents.

🔍 What the interviewer is checking

Checks that the candidate understands how microservices relate to SOA and can explain the shift in where logic, data and ownership live.

Green flags

  • Explains the ESB as a smart pipe and microservices as smart endpoints, dumb pipes
  • Contrasts SOAP/WSDL with REST/gRPC/events, mentioning WCF and CoreWCF
  • Mentions shared canonical models vs data ownership and bounded contexts
  • Names cloud, containers and CI/CD as what changed

Red flags

  • Thinks they are unrelated or identical
  • Puts business rules in the message broker or gateway
  • Dismisses integration platforms entirely

📚 Learn in depth

1. The ESB topology

   [CRM]      [ERP]      [Billing]     [Portal]
     \          |           |            /
   +--------------------------------------------+
   |        Enterprise Service Bus              |
   |  routing | transformation | orchestration  |
   |  canonical data model | business rules     |
   +--------------------------------------------+

Every integration passes through the bus. That centralises control and visibility, but also change: every new integration waits for the integration team, and an ESB outage stops everything.

2. Smart endpoints, dumb pipes

  [Orders] --OrderPlaced--> ( Service Bus topic ) --> [Billing]
                                                 \--> [Shipping]

The topic only delivers. Billing decides what an OrderPlaced means for it. Adding Shipping as a subscriber doesn't change Orders or the broker's logic.

3. Contracts then and now

  • SOAP/WSDL: XML envelopes, a machine-readable contract, WS-Security for message-level security, WS-AtomicTransaction for distributed transactions (rarely used well).
  • REST + OpenAPI: JSON over HTTP, contract via OpenAPI (ASP.NET Core 9+ generates documents with Microsoft.AspNetCore.OpenApi).
  • gRPC: Protobuf contracts over HTTP/2, efficient and strongly typed; ideal service-to-service.
  • Events: CloudEvents envelope, AsyncAPI documentation, schema registries.

WCF server isn't part of modern .NET; CoreWCF is the community-supported port for running existing WCF services on .NET.

4. Canonical data model

SOA often defined one enterprise-wide Customer schema. In practice, Billing's customer and Support's customer mean different things, so the canonical model became huge and every change rippled everywhere. DDD's bounded contexts are the modern answer: each context has its own model, and translations happen at the boundaries.

5. What changed technically

  • Cloud made infrastructure on demand.
  • Containers and orchestrators made deployment uniform.
  • CI/CD and IaC made per-team pipelines cheap.
  • Observability (distributed tracing) made many services diagnosable.

Without these, running 30 independently deployed services was impractical; hence SOA's coarse services and central governance.

Try it yourself

  1. Create a small gRPC service in .NET 10 and a client; compare its .proto contract with an OpenAPI document of an equivalent REST endpoint.
  2. Host an existing WCF contract on CoreWCF and call it from a .NET 10 client using System.ServiceModel.Http.
  3. Sketch your organisation's integration landscape: which parts are SOA-style and which are service-owned?
  4. Take one "canonical" entity from a legacy system and list how two departments interpret it differently.

💻 Code

The same capability exposed SOA-style (a WCF contract, hostable on modern .NET with CoreWCF) and microservice-style (a gRPC contract and an event).

// SOA era: WCF service contract (runs on modern .NET via CoreWCF)
namespace Legacy.Customers;

using System.Runtime.Serialization;
using System.ServiceModel;

[ServiceContract(Namespace = "urn:agency:customers:v1")]
public interface ICustomerService
{
    [OperationContract]
    CustomerRecord GetCustomer(string customerNumber); // coarse, enterprise-wide, canonical model
}

[DataContract]
public sealed class CustomerRecord
{
    [DataMember] public string CustomerNumber { get; set; } = "";
    [DataMember] public string Name { get; set; } = "";
    [DataMember] public string BillingStatus { get; set; } = ""; // other departments' concerns leak in
}
// Microservice era: a gRPC contract owned by the Customer Profile service
syntax = "proto3";
option csharp_namespace = "Profiles.Grpc";

service CustomerProfiles {
  rpc GetProfile (GetProfileRequest) returns (ProfileReply);
}
message GetProfileRequest { string customer_id = 1; }
message ProfileReply { string customer_id = 1; string display_name = 2; }
// ...and an integration event published to a topic; subscribers decide what it means for them
namespace Profiles.Contracts;

public sealed record CustomerProfileUpdated(
    string CustomerId,
    string DisplayName,
    DateTimeOffset OccurredAt,
    int SchemaVersion = 1);

⚠ Common mistakes

  • Mistake: Saying microservices and SOA are unrelated. Why it is wrong: both are service-based with explicit contracts; microservices evolved from SOA's lessons. Instead: explain the shared idea, then the differences in pipes, data and ownership.
  • Mistake: Putting business logic or orchestration in the broker or API gateway. Why it is wrong: it recreates the ESB bottleneck and hides logic from owning teams. Instead: keep pipes dumb and logic in services.
  • Mistake: Defining one canonical enterprise model for all services. Why it is wrong: different contexts mean different things by the same word; every change ripples everywhere. Instead: bounded contexts with translation at the edges.
  • Mistake: Treating SOA tools as always wrong. Why it is wrong: integrating packaged products is still well served by integration platforms. Instead: use integration platforms for integration, services for product development.
  • Mistake: Assuming WCF can't run on modern .NET. Why it is wrong: CoreWCF supports many WCF server scenarios on .NET. Instead: plan WCF migrations case by case: CoreWCF, gRPC or REST.
  • Mistake: Making microservices as coarse and shared as SOA services. Why it is wrong: several teams then share one service and lose independence. Instead: one service per bounded context, one owning team.

🏛 Senior insight: trade-offs

The useful senior framing is: SOA centralised integration; microservices decentralised it. Both moves have costs. A central ESB gives visibility and governance but becomes a queue for every change; decentralised services remove the queue but every team now needs integration skills, resilience patterns and contract discipline. In enterprise and government settings I often see both in one landscape, and that's fine when each is used for its purpose.

The shift is as much cultural as technical. Cheaper deployment didn't make distributed systems simpler; it moved the complexity from a central integration team into every product team: each team owns its contracts, its on-call, its dashboards and its resilience, and inter-service latency and partial failure become everyday design concerns. An organisation that adopts microservices but keeps central change control and a shared operations team gets the costs of both models. Before recommending the move, I check whether teams are ready to own their services end to end and whether a platform team exists to give them self-service pipelines, observability and secure defaults.

Option When it fits Cost When not to
Integration platform (ESB-style) Connecting packaged and legacy systems Central bottleneck, specialist skills New product development by several teams
Microservices with dumb pipes Product teams building and owning services Integration and ops work in every team Few teams or immature DevOps culture
API facade over legacy Exposing old capabilities to new apps Another hop and contract When the legacy will be retired soon

I'd measure the integration approach by lead time for a new integration and by how many incidents trace back to the central component.

🔗 Follow-ups the interviewer may ask

  1. When: Candidate mentions microservices as a modern evolution of SOA. Why: Checks whether they can weigh microservices' benefits and costs.
    How to answer

    Microservices are small, independently deployable services, each owning one business capability and its own data, talking over the network via APIs or messages.

    • Benefits: independent deployment and scaling, team autonomy, fault isolation, technology choice per service.
    • The distributed systems tax: network latency and partial failure, eventual consistency and sagas instead of transactions, versioned contracts, distributed tracing, and many pipelines and on-call rotations.
    • They mainly solve an organisational problem: many teams needing to release without coordinating (Conway's law).

    They fit when you have several teams, stable boundaries and mature DevOps. Otherwise a modular monolith gives most of the benefits for a fraction of the cost. The worst outcome is a distributed monolith: all the cost, none of the independence.

🛠 Real-world problems: how you handle them

Central ESB becomes the delivery bottleneck
Situation
A [state agency] ran [60] integrations through a BizTalk ESB owned by a [4-person] integration team. New digital services needed integrations weekly.
Signals
Integration backlog of [11 weeks]; [40%] of P1 incidents in a year involved the ESB; teams building portals waited on mapping changes; orchestrations contained business rules nobody else could see.
Investigation
Catalogued orchestrations and maps; classified each as transport, transformation or business logic; reviewed incident post-mortems; measured lead time from request to production for integrations.
Resolution
Short term: added capacity and froze new business rules in the ESB. Long term: migrated to Azure API Management and Service Bus with transformations moved into owning systems' adapters, retiring BizTalk orchestrations in waves.
Prevention
Integration standards (CloudEvents envelope, AsyncAPI docs), a rule that no business logic lives in the integration layer, per-integration dashboards in Azure Monitor, and an ADR on the target integration architecture.

How to tell it (STAR)

**S:** At [agency], every new integration waited [11 weeks] on a central ESB team, and the ESB featured in [40%] of P1s. **T:** I was asked to propose a way out without a risky big-bang migration. **A:** I classified all [60] orchestrations, showed that [a third] contained business rules that belonged in the owning systems, and wrote an ADR for Azure API Management plus Service Bus with dumb pipes. We piloted it on [two] integrations, then migrated in waves. **R:** Lead time dropped to [3 weeks], and ESB-related P1s fell to [zero] once BizTalk was retired.

More in Application Architectures

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me