Pragmatic.Discovery
1.0.0-alpha.6
dotnet add package Pragmatic.Discovery --version 1.0.0-alpha.6
NuGet\Install-Package Pragmatic.Discovery -Version 1.0.0-alpha.6
<PackageReference Include="Pragmatic.Discovery" Version="1.0.0-alpha.6" />
<PackageVersion Include="Pragmatic.Discovery" Version="1.0.0-alpha.6" />
<PackageReference Include="Pragmatic.Discovery" />
paket add Pragmatic.Discovery --version 1.0.0-alpha.6
#r "nuget: Pragmatic.Discovery, 1.0.0-alpha.6"
#:package Pragmatic.Discovery@1.0.0-alpha.6
#addin nuget:?package=Pragmatic.Discovery&version=1.0.0-alpha.6&prerelease
#tool nuget:?package=Pragmatic.Discovery&version=1.0.0-alpha.6&prerelease
Pragmatic.Discovery
Runtime topology registration and discovery for Pragmatic.Design hosts.
The Problem
A modular monolith splits logic into modules, each with its own database. In a single host, the
Composition generator validates the whole topology at compile time. But split modules across multiple
hosts and that validation disappears: you can't know at build time whether two hosts deploy the same
module, whether ReadAccess spans hosts (breaking SQL joins), or whether DB providers mismatch.
External registries (Consul, etcd) know "Host B is alive at :5002", not "Host B owns BillingModule on
BillingDb with PostgreSQL." So you maintain a separate config that drifts from the code.
The Solution
Pragmatic.Discovery reads the SG-emitted topology metadata that already lives in every compiled host assembly, stores it in a shared backend, and validates the deployment against the other hosts, automatically, at startup. No manual config, no drifting registry; the metadata travels with the assembly.
Host A (Booking + Catalog) ── register ──▶ discovery backend
Host B (Billing) ── register ──▶ discovery backend
Host A ── "which host owns Billing?" ──▶ backend ──▶ call Host B over HTTP
Installation
dotnet add package Pragmatic.Discovery
IDiscoveryService is the high-level API (register / query / validate); IDiscoveryBackend is the
pluggable store. Two exist: InMemoryDiscoveryBackend (the default, one process) and
AgentDiscoveryBackend, in Pragmatic.Agent.Discovery (services.UseAgentDiscovery()), which shares
the topology between hosts through the Pragmatic Agent. There is no Redis or Consul backend; a
store of your own implements IDiscoveryBackend. Validation runs at startup and flags duplicate
modules, cross-host ReadAccess, and provider mismatches.
Status
Functional within 1.0.0-alpha: topology registration, querying, validation, and the in-memory and Agent backends. See the roadmap.
Documentation
| Guide | What you'll learn |
|---|---|
| Concepts | Topology metadata, the backend model, register/query/validate |
| Getting Started | Register a host and query the topology |
| Topology Validation | Cross-host checks: duplicate modules, ReadAccess, provider mismatch |
| Common Mistakes | The most frequent discovery pitfalls |
| Troubleshooting | Problem/solution guide |
Requirements
- .NET 10.0+
License
Part of the Pragmatic.Design ecosystem. See Licensing. Pragmatic.Discovery is MIT-licensed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Pragmatic.Composition (>= 1.0.0-alpha.6)
-
net11.0
- Pragmatic.Composition (>= 1.0.0-alpha.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Pragmatic.Discovery:
| Package | Downloads |
|---|---|
|
Pragmatic.Agent.Discovery
Bridge that backs Pragmatic.Discovery's IDiscoveryBackend with the Pragmatic Agent KV, so cross-host topology (modules + boundaries) is stored and gossip-replicated. Referenced by the host, never by the AOT daemon. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.6 | 64 | 11/21/2026 |
| 1.0.0-alpha.5 | 58 | 11/21/2026 |
| 1.0.0-alpha.4 | 62 | 11/16/2026 |
| 1.0.0-alpha.3 | 85 | 10/17/2026 |
| 1.0.0-alpha.2 | 75 | 10/12/2026 |
| 1.0.0-alpha.1 | 86 | 10/3/2026 |