EntglDb.Sync 2.3.0

dotnet add package EntglDb.Sync --version 2.3.0
                    
NuGet\Install-Package EntglDb.Sync -Version 2.3.0
                    
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="EntglDb.Sync" Version="2.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EntglDb.Sync" Version="2.3.0" />
                    
Directory.Packages.props
<PackageReference Include="EntglDb.Sync" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EntglDb.Sync --version 2.3.0
                    
#r "nuget: EntglDb.Sync, 2.3.0"
                    
#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.
#:package EntglDb.Sync@2.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EntglDb.Sync&version=2.3.0
                    
Install as a Cake Addin
#tool nuget:?package=EntglDb.Sync&version=2.3.0
                    
Install as a Cake Tool

EntglDb.Sync

Synchronization engine for EntglDb — provides oplog, vector clocks, anti-entropy gossip, snapshots, and the P2P service mesh.

What's Included

  • Oplog: Append-only, SHA-256 hash-chained journal of local changes
  • Vector Clock: Causal ordering and divergence detection across nodes
  • Anti-Entropy Gossip: Periodic exchange of vector clocks with peers to detect and reconcile differences
  • Snapshot Sync: Fast full-state catch-up for nodes that have been offline or missed too many changes
  • Interest-Aware Sync: Nodes advertise which collections they care about; only relevant changes are exchanged
  • P2P Service Mesh: The shared TCP connections can be used for custom application-level protocols (message type ≥ 32)

Installation

dotnet add package EntglDb.Core
dotnet add package EntglDb.Network
dotnet add package EntglDb.Sync
dotnet add package EntglDb.Persistence.BLite   # or EntglDb.Persistence.EntityFramework

Quick Start

builder.Services
    .AddEntglDbCore()
    .AddEntglDbBLite<MyDbContext, MyDocumentStore>(sp => new MyDbContext("data.blite"))
    .AddEntglDbNetwork<StaticPeerNodeConfigurationProvider>()
    .AddEntglDbSync();          // registers sync handlers + SyncOrchestrator + EntglDbNode

Custom P2P Services

Implement INetworkMessageHandler for server-side handling and inject IPeerMessenger for outbound calls. Message types ≥ 32 are reserved for user services.

// Server side — handle incoming requests
public class PingHandler : INetworkMessageHandler
{
    public int MessageType => 100;  // pick any value in the 32–999 custom range

    public Task<(IMessage? Response, int ResponseType)> HandleAsync(IMessageHandlerContext context)
    {
        var req = PingRequest.Parser.ParseFrom(context.Payload);
        return Task.FromResult<(IMessage?, int)>(
            (new PingResponse { Echo = req.Message }, 33));
    }
}

// Register after AddEntglDbNetwork / AddEntglDbSync
services.AddSingleton<INetworkMessageHandler, PingHandler>();

// Client side — send a request
var (_, payload) = await messenger.SendAndReceiveAsync(
    "192.168.1.10:7000", 100, new PingRequest { Message = "hello" }, ct);
var response = PingResponse.Parser.ParseFrom(payload);

Documentation

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on EntglDb.Sync:

Package Downloads
EntglDb.AspNet

ASP.NET Core integration for EntglDb with health checks, hosted services, and multi-cluster support.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 32 3/26/2026
2.2.0 39 3/25/2026
2.1.4 84 3/23/2026
2.1.3 96 3/20/2026