Morpheo.Sdk
1.0.5
dotnet add package Morpheo.Sdk --version 1.0.5
NuGet\Install-Package Morpheo.Sdk -Version 1.0.5
<PackageReference Include="Morpheo.Sdk" Version="1.0.5" />
<PackageVersion Include="Morpheo.Sdk" Version="1.0.5" />
<PackageReference Include="Morpheo.Sdk" />
paket add Morpheo.Sdk --version 1.0.5
#r "nuget: Morpheo.Sdk, 1.0.5"
#:package Morpheo.Sdk@1.0.5
#addin nuget:?package=Morpheo.Sdk&version=1.0.5
#tool nuget:?package=Morpheo.Sdk&version=1.0.5
Morpheo SDK (Contrats Publics)
Morpheo.Sdk contient les abstractions, interfaces et modèles de données nécessaires pour intégrer le framework. Ce paquet est conçu pour être extrêmement léger afin d'être référencé par vos projets "Domain" ou "Shared" sans introduire de dépendances lourdes vers le moteur de synchronisation.
📦 Installation
dotnet add package Morpheo.Sdk
🔑 Concepts Clés
1. IMorpheoNode
C'est le contrat principal représentant une instance Morpheo en cours d'exécution.
StartAsync(): Initialise la base de données et commence l'écoute réseau (UDP/TCP).StopAsync(): Arrête proprement les services et ferme les connexions.Discovery: Permet de s'abonner aux événements de topologie (PeerFound,PeerLost).
2. Résolution de Conflits (IMergeable<T>)
Pour bénéficier des capacités de fusion automatique (CRDT), vos classes de données peuvent implémenter cette interface.
Merge(T remote): Méthode appelée par leConflictResolutionEnginelorsqu'une modification concurrente est détectée. Vous devez y définir la logique métier de fusion (ex: additionner des quantités, concaténer des listes).
3. Modèles de Données (SyncLogDto)
Le SyncLogDto est l'objet de transfert standard (DTO) utilisé pour échanger des modifications entre les nœuds. Il encapsule :
- Le contenu de l'entité (JSON).
- Les métadonnées de causalité (Vector Clock).
- L'origine de la modification.
4. Configuration (MorpheoOptions)
La classe MorpheoOptions permet de définir le comportement du nœud :
NodeName: Identité unique sur le réseau.Role:StandardClient(Passif),Relay, ouServer.DiscoveryPort: Port UDP utilisé pour le multicast.Capabilities: Liste extensible des fonctionnalités du nœud (ex: "HasPrinter", "HasScanner").
Morpheo SDK (Public Contracts)
Morpheo.Sdk contains the abstractions, interfaces, and data models required to integrate the framework. This package is designed to be extremely lightweight, allowing it to be referenced by your "Domain" or "Shared" projects without introducing heavy dependencies on the synchronization engine.
📦 Installation
dotnet add package Morpheo.Sdk
🔑 Key Concepts
1. IMorpheoNode
This is the primary contract representing a running Morpheo instance.
StartAsync(): Initializes the database and begins network listening (UDP/TCP).StopAsync(): Gracefully stops services and closes connections.Discovery: Allows subscription to topology events (PeerFound,PeerLost).
2. Conflict Resolution (IMergeable<T>)
To leverage automatic conflict resolution capabilities (CRDT), your data classes can implement this interface.
Merge(T remote): Method called by theConflictResolutionEnginewhen a concurrent modification is detected. You must define the merge business logic here (e.g., adding quantities, concatenating lists).
3. Data Models (SyncLogDto)
The SyncLogDto is the standard Data Transfer Object (DTO) used to exchange changes between nodes. It encapsulates:
- The entity content (JSON).
- Causality metadata (Vector Clock).
- The origin of the modification.
4. Configuration (MorpheoOptions)
The MorpheoOptions class allows defining the node's behavior:
NodeName: Unique identity on the network.Role:StandardClient(Passive),Relay, orServer.DiscoveryPort: UDP port used for multicast.Capabilities: Extensible list of node features (e.g., "HasPrinter", "HasScanner").
| 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Morpheo.Sdk:
| Package | Downloads |
|---|---|
|
Morpheo.Core
Core implementation of the Morpheo distributed data synchronization framework (.NET 10): vector-clock conflict resolution, Merkle anti-entropy, UDP/SignalR/HTTP sync transports, CRDTs, embedded server, blobs, and white-label hosting. |
GitHub repositories
This package is not used by any popular GitHub repositories.