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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MeshWeaver.Mesh.Contract" Version="2.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MeshWeaver.Mesh.Contract --version 2.0.3                
#r "nuget: MeshWeaver.Mesh.Contract, 2.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 instances
  • SignalRAddress: Addresses real-time communication endpoints
  • KernelAddress: Points to computation kernels
  • PortalAddress: 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:

  1. Choose a meaningful type identifier that represents your domain
  2. Decide if automatic ID generation is needed for your use case
  3. Consider adding domain-specific validation or formatting rules
  4. Document the address format and usage patterns

Best Practices

  1. Use appropriate address types for different mesh resources
  2. Implement proper error handling for distributed operations
  3. Consider data locality when designing mesh topology
  4. Use schemas to ensure data consistency
  5. Implement proper retry mechanisms for distributed operations
  6. Monitor and manage resource lifecycle

Integration

See Also

Refer to the main MeshWeaver documentation for more information about the overall mesh architecture.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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