Migration from 1.x
2.x is mostly compatible with 1.x. However, there are several minor and major incompatible changes in API surface.
Minor changes:
DotNext.IOnamespace and its classes moved from DotNext library to DotNext.IO library- Encoding and decoding context from
DotNext.Textnamespace moved to DotNext.IO library DotNext.Runtime.InteropServices.Memoryclass merged withDotNext.Runtime.Intrinsics- Core interfaces from
DotNext.Net.Cluster.Replicationnamespace moved to DotNext.IO library DotNext.Net.Cluster.Consensus.Raft.PersistentStateclass fromDotNext.Net.Clusterclass now completely migrated toValueTaskinstead ofTask
Major changes:
- DotNext.AspNetCore.Cluster now relies on .NET Core 3.1 SDK instead of .NET Standard 2.1. This was happened because ASP.NET Core 3.x dependencies are not available from NuGet and became a part of .NET Core SDK.
- DotNext.AspNetCore.Cluster uses Generic Host Builder instead of Web Host Builder so configuration methods are changed
DotNext.Runtime.InteropServices.UnmanagedMemoryandDotNext.Runtime.InteropServices.UnmanagedMemory<T>classes from DotNext.Unsafe library are no longer exist. Use UnmanagedMemoryPool class insteadEnsureConsistencyAsyncmethod removed fromIAuditTrailinterface. Method with the same is added toIPersistentStateinterface but it has different semantics aimed to support ClientQuery RPC according with Chapter 6 of dissertation- Default Raft implementation calls
InitializeAsyncmethod of audit trail to reconstruct the state machine at initialization time. This functionality was missed in 1.x version InMemoryAuditTrailclass is replaced byConsensusOnlyStatewhich is optimized for cases when you need consensus functionality only without replication of real dataForceReplicationAsyncmethod ofIReplicationClusterclass is introduced and included into Raft implementation and allows to organize ClientQuery RPC according with Chapter 6 of dissertationIMessaheHandlerinterface moved from DotNext.AspNetCore.Cluster library to DotNext.Net.Cluster library and renamed toIInputChannel.