Microservices¶
Target Architecture — Final-State Design
This page describes the final-state microservice decomposition of the Marketplace Platform. All services follow the ConnectSoft.Factory.Marketplace.{Service} namespace and the Clean Architecture layout in Naming Conventions. They are built on .NET 10, message over MassTransit on Azure Service Bus, and persist through NHibernate on Azure SQL / PostgreSQL.
The Marketplace Platform is decomposed into eleven microservices across the seven bounded contexts. Each service owns its aggregate roots and store, exposes a narrow API, and communicates with the rest of the factory through the canonical event envelope.
Service catalog¶
| Microservice | Responsibility | APIs | Events | Aggregate Roots | Store |
|---|---|---|---|---|---|
| MarketplaceCatalogService | Authoritative catalog of marketplace assets; serves browse and detail reads; maintains catalog metadata across the nine asset types. | GET /marketplace/assets, GET /marketplace/assets/{assetId} |
Consumes AssetPublished, AssetVersionReleased, AssetReviewed; emits AssetCatalogued |
MarketplaceAsset | Azure SQL / PostgreSQL; Redis cache |
| MarketplaceSearchService | Faceted, ranked, tenant-scoped discovery; indexes catalog and review signals for fast search. | GET /marketplace/assets (search/facet mode) |
Consumes AssetPublished, AssetInstalled, AssetReviewed; emits AssetIndexed |
(read model of MarketplaceAsset) | Search index (Azure AI Search / Elasticsearch); Redis |
| AssetPublishingService | Orchestrates governed asset submission: quality scan, signing, policy gate, and release; the publishing saga coordinator. | POST /marketplace/assets, POST /marketplace/assets/{assetId}/versions |
Emits AssetPublished, AssetVersionReleased; consumes AssetQualityScanned |
AssetVersion (shared with AssetVersionService) | Azure SQL / PostgreSQL; Azure Blob (submission staging) |
| AssetVersionService | System of record for immutable semantic versions and their distributable packages; promotes packages to distribution stores. | POST /marketplace/assets/{assetId}/versions (version detail) |
Emits AssetVersionReleased, AssetPackagePublished |
AssetVersion, AssetPackage | Azure SQL / PostgreSQL; Azure Blob; Azure Artifacts / ACR |
| AssetCompatibilityService | Evaluates whether an asset version fits a target project, runtime, and dependency set; produces compatibility verdicts. | POST /marketplace/assets/{assetId}/compatibility/evaluate |
Emits CompatibilityEvaluated |
AssetCompatibility | Azure SQL / PostgreSQL; Redis (verdict cache) |
| AssetInstallationService | Applies an asset and its resolved dependencies into a project/tenant with provenance and rollback; installation saga coordinator. | POST /marketplace/assets/{assetId}/install |
Emits AssetInstalled, AssetInstallationFailed; consumes CompatibilityEvaluated, LicenseGranted, DependenciesResolved |
AssetInstallation | Azure SQL / PostgreSQL |
| LicenseService | Issues and validates licenses/entitlements for assets; anti-corruption layer over ConnectSoft.Extensions.Saas.Billing. |
Internal: POST /marketplace/licenses (internal) |
Emits LicenseGranted, LicenseRevoked |
License | Azure SQL / PostgreSQL |
| PricingService | Manages pricing plans and price quotes for assets; integrates metering for usage-based plans. | Internal: GET /marketplace/pricing-plans (internal) |
Emits PricingPlanPublished, PriceQuoted |
PricingPlan | Azure SQL / PostgreSQL |
| PublisherPortalService | Publisher onboarding, verification, trust tiers, and portfolio analytics; backs the Publisher Portal UI. | Internal: POST /marketplace/publishers, GET /marketplace/publishers/{publisherId} |
Emits PublisherRegistered, PublisherVerified |
Publisher | Azure SQL / PostgreSQL |
| ReviewRatingService | Captures ratings and reviews, aggregates rating scores, and emits trust/reputation signals. | Internal: POST /marketplace/assets/{assetId}/reviews |
Emits AssetReviewed, RatingAggregated |
AssetReview | Azure SQL / PostgreSQL |
| DependencyResolutionService | Resolves the transitive dependency graph for an asset version and detects conflicts before installation. | Internal: POST /marketplace/assets/{assetId}/dependencies/resolve |
Emits DependenciesResolved, DependencyConflictDetected |
AssetDependency | Azure SQL / PostgreSQL; Redis (graph cache) |
Service interaction diagram¶
flowchart TB
Client["Studio / Agent Mesh"] -->|browse, search| MCS["MarketplaceCatalogService"]
Client -->|search| MSS["MarketplaceSearchService"]
Client -->|publish| APS["AssetPublishingService"]
Client -->|install| AIS["AssetInstallationService"]
APS -->|release version| AVS["AssetVersionService"]
APS -->|quality gate| Quality["AssetQualityScanWorker"]
APS -->|"AssetPublished"| MCS
AVS -->|"AssetVersionReleased"| MSS
AIS -->|evaluate| ACS["AssetCompatibilityService"]
AIS -->|resolve| DRS["DependencyResolutionService"]
AIS -->|check entitlement| LS["LicenseService"]
LS -->|price| PS["PricingService"]
LS -.->|billing ACL| Billing["ConnectSoft.Extensions.Saas.Billing"]
PPS["PublisherPortalService"] -->|publisher identity| APS
RRS["ReviewRatingService"] -->|"AssetReviewed"| MCS
RRS -->|reputation| PPS
AIS -->|"AssetInstalled"| MSS
Hold "Alt" / "Option" to enable pan & zoom
Cross-cutting concerns¶
- Clean Architecture layering — each service splits into
.Api(REST + gRPC),.Application,.ApplicationModel,.DomainModel,.PersistenceModel.NHibernate,.FlowModel.MassTransit,.DatabaseModel.Migrations, and.Options, per Naming Conventions. - Messaging — all inter-service facts flow as domain/integration events over MassTransit on Azure Service Bus, never via direct database access.
- Multi-tenancy — every store, query, and event handler is
tenantId-scoped; catalog reads are tenant-filtered before ranking. - Saga coordination —
AssetPublishingServiceandAssetInstallationServiceare saga coordinators that orchestrate the publishing and installation workflows across the compatibility, dependency, license, and version services. - Caching — Catalog, Search, Compatibility, and Dependency services use Redis for read-heavy paths; verdicts and graphs are cached with version-keyed invalidation.
Continue to APIs, Workers, Events, and Aggregate Roots.