Capability
The service exists because the system needs one specific behavior to remain coherent.
A Universal Microservice is the building block of portable microservices architecture: a small unit of business behavior that remains recognizable across runtime contexts. It is not just a service that has been packaged differently. It is a capability with an explicit contract, portable core logic, and a runtime boundary that makes validation, placement, trust, and execution visible.
A Universal Microservice is the primary object in UMA. It owns a specific behavior, exposes a clear contract, and can be executed through more than one runtime path without changing what the behavior means.
The portable summary is: write once, run where it makes sense. That matters because the runtime may change while the service meaning should not. In practice, this means a team can validate the same business rule (a discount calculation, a permission check, a feature flag decision) in a local test, an edge deployment, and a cloud backend, and confirm that all three produce identical outputs from the same input without any environment-specific rewrite.
A Universal Microservice has a narrow responsibility, deterministic inputs and outputs where possible, explicit capability expectations, and a boundary that does not depend on one host framework. It can be wrapped by different adapters, but the adapters do not become the service.
The core question is simple: can the behavior be understood, tested, and governed without assuming one permanent deployment surface?
A traditional microservice is usually defined by deployment, ownership, and network boundaries. A Universal Microservice is defined first by portable behavior and then by the runtime decisions that surround it.
This does not make conventional services obsolete. It makes the durable behavioral unit more explicit when the same capability needs to appear in browser, edge, cloud, workflow, or AI-assisted execution paths.
Portability comes from separating core behavior from host concerns. Contracts describe what the service accepts and returns. The runtime handles validation, transport, policy, and placement. That separation lets the same behavior move without dragging a whole application stack behind it.
WebAssembly can provide a strong execution boundary, but UMA is the architectural model that keeps the boundary meaningful.
The lifecycle begins with a capability, then a contract, then a portable implementation, then runtime exposure, validation, observation, and versioned evolution. The service is not complete just because it compiles. It is complete when the runtime can govern how and where it is used.
The service exists because the system needs one specific behavior to remain coherent.
Inputs, outputs, events, and expectations are explicit enough for humans and tools to inspect.
The behavior is not hidden inside framework glue or a single host process.
Placement, policy, trust, and validation stay visible as the service moves.
The word "universal" does not mean the service runs on every device. It means the service is not coupled to any specific device or runtime. The distinction matters because ubiquity and runtime independence are different properties. A service could run everywhere while still being tightly coupled to a specific host framework. That is not a Universal Microservice in the UMA sense.
Runtime independence means the service makes no assumptions about which execution environment it is running in. The business logic does not know whether it is executing inside a browser's WASM sandbox, a wasmtime process on a server, a Cloudflare Worker at the edge, or an AI agent's tool executor. The service receives inputs, applies its logic, and returns outputs. The runtime layer handles everything else: how the inputs arrived, where the outputs go, what trust level applies, which adapter is bound. The service is indifferent to those decisions because it has no dependency on them.
This is a stronger constraint than "it runs in multiple environments." A service that has been ported to multiple environments (rewritten or reconfigured per deployment) is not universal. Universal means the same artifact runs in each environment without modification. The universality is in the artifact, not in the team's willingness to maintain multiple versions.
A Universal Microservice has three properties that must all be present. A service with two of the three is a portable service, or a well-documented service, but not a Universal Microservice in the UMA sense.
Explicit contract. The service declares its interface in a machine-readable descriptor: not just in code, not just in documentation, but in a structured artifact the runtime can evaluate. The contract specifies input schema, output schema, emitted events, required capabilities, version constraints, and placement rules. A service without an explicit contract is undiscoverable by the runtime and ungovernable at scale.
Portable binary. The service is compiled to a format that runs across host environments without recompilation. WebAssembly is the reference implementation: one compiled artifact that runs in a browser, a server process, an edge runtime, and an AI agent's tool executor. The binary carries the durable behavior. The adapter layer handles host-specific concerns. A service that requires a separate build per deployment target does not have a portable binary.
Parity proof. A CI-enforced test confirms that the same artifact produces equivalent outputs in at least two runtimes. The parity proof is what makes the portability claim verifiable rather than asserted. Without it, there is no guarantee that what runs at the edge is the same behavior as what runs on the server. In distributed systems, unverified claims about behavioral equivalence become production incidents. The proof must run in CI on every change. A proof that runs locally is not a proof.
All three together define the Universal Microservice. Remove the explicit contract and the service is portable but ungoverned. Remove the portable binary and the contract describes behavior that cannot move. Remove the parity proof and the portability is a claim, not a property of the system.
This page defines the object at a conceptual level. Chapters 2 through 4 of the book build the complete design model, and the first runnable proof lives in the feature flag evaluator example.