MeshWeaver.Mesh.Contract
2.0.3
dotnet add package MeshWeaver.Mesh.Contract --version 2.0.3
NuGet\Install-Package MeshWeaver.Mesh.Contract -Version 2.0.3
<PackageReference Include="MeshWeaver.Mesh.Contract" Version="2.0.3" />
paket add MeshWeaver.Mesh.Contract --version 2.0.3
#r "nuget: MeshWeaver.Mesh.Contract, 2.0.3"
// Install MeshWeaver.Mesh.Contract as a Cake Addin #addin nuget:?package=MeshWeaver.Mesh.Contract&version=2.0.3 // Install MeshWeaver.Mesh.Contract as a Cake Tool #tool nuget:?package=MeshWeaver.Mesh.Contract&version=2.0.3
MeshWeaver.Mesh.Contract
Overview
MeshWeaver.Mesh.Contract defines the foundational interfaces and types for operating a distributed data mesh. This library provides the contract definitions for data storage, streaming, and mesh topology management, enabling seamless integration of diverse data sources and processing nodes.
Core Concepts
Addressing System
// Base address type for mesh nodes
public record Address(string Type, string Id);
// Application and UI addresses
public record ApplicationAddress(string Id) : Address("app", Id);
// Computation addresses
public record KernelAddress(string Id = null) : Address("kernel", Id ?? Guid.NewGuid().AsString());
// Content addresses
public record PortalAddress(string Id = null) : Address("portal", Id ?? Guid.NewGuid().AsString());
Each address type serves a specific purpose in the mesh:
ApplicationAddress
: Identifies application instancesSignalRAddress
: Addresses real-time communication endpointsKernelAddress
: Points to computation kernelsPortalAddress
: References portal instances
Note that many address types support automatic ID generation using GUIDs when no explicit ID is provided.
Creating Domain-Specific Addresses
The addressing system is extensible, allowing creation of purpose-specific addresses for different data domains. For example:
// Time series data domain
public record PricingAddress(string Id) : Address("pricing", Id);
// Document storage domain
public record TransactionalDataAddress(string Id) : Address("transactionaldata", Id);
When creating domain-specific addresses:
- Choose a meaningful type identifier that represents your domain
- Decide if automatic ID generation is needed for your use case
- Consider adding domain-specific validation or formatting rules
- Document the address format and usage patterns
Best Practices
- Use appropriate address types for different mesh resources
- Implement proper error handling for distributed operations
- Consider data locality when designing mesh topology
- Use schemas to ensure data consistency
- Implement proper retry mechanisms for distributed operations
- Monitor and manage resource lifecycle
Integration
- Works with MeshWeaver.Messaging.Hub for mesh communication
- Provides foundation for MeshWeaver.Mesh.Core
- Enables custom provider implementations
See Also
Refer to the main MeshWeaver documentation for more information about the overall mesh architecture.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- MeshWeaver.Messaging.Contract (>= 2.0.3)
- MeshWeaver.Messaging.Hub (>= 2.0.3)
NuGet packages (11)
Showing the top 5 NuGet packages that depend on MeshWeaver.Mesh.Contract:
Package | Downloads |
---|---|
MeshWeaver.Hosting
Package Description |
|
MeshWeaver.Kernel
Package Description |
|
MeshWeaver.Articles
Package Description |
|
MeshWeaver.Hosting.Monolith
Package Description |
|
MeshWeaver.Connection.SignalR
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.3 | 522 | 3/24/2025 |
2.0.2 | 494 | 3/24/2025 |
2.0.1 | 150 | 3/21/2025 |
2.0.0 | 188 | 3/20/2025 |
2.0.0-preview3 | 136 | 2/28/2025 |
2.0.0-Preview2 | 147 | 2/10/2025 |
2.0.0-preview1 | 158 | 1/6/2025 |
1.0.1 | 128 | 10/8/2024 |
1.0.0 | 131 | 10/8/2024 |