Add DynamoStore, EventStoreDb, MessageDb, eqx query, LoadOption.AllowStale, DeciderCore; Update to FsCodec 3.0 JsonElement/ReadOnlyMemory event bodies
This release is about 3 major versions in one (as evidenced by 1 alpha, 12 beta, 17 rc and multiple interim nuget releases!)
Major new features:
DynamoStore
: Full ground-up store implementation (including indexing/changefeed in thePropulsion.DynamoStore.*
packages), usingFSharp.AWS.DynamoDB
🙏 @ameier38 @epNickColeman @samritchieEventStoreDb
: Replacement for theEventStore
package (which uses the deprecatedEventStore DB
TCP/IP
protocol) that uses their modern gRPC stack 🙏 @oskardudycz @thefringeninja @keppelerjMessageDb
: Full ground-up store implementation for PostgreSQL based on Message DB with strong Open Telemetry support (that will eventually be implemented similarly across the board) 🙏 @nordfjordLoadMode.AllowStale
: Support for bounded staleness (and limiting concurrent reads), enabling use for non-trivial read activity without having to adhere to strict CQRS separation and/or eventual consistency 🙏 @brihadishDeciderCore
: C#-optimized API (arrays,Func
,Task<T>
,ValueTuple
etc)- Internal rewrite for performance, replacing usage of F#
async
withtask
, andAsyncSeq
with [TaskSeq
](https://github.com/fsprojects/fsharp.control.taskseq] 🙏 @abelbraaksma CosmosStore
supports hydrating streams based on queries for Tip documents from across streams (i.e. you can now efficiently render a paged list of items based on search criteria against the snaphot's state in the Tip, in addition to the existing individual stream APIs) @brihadish @raghuAtRACosmosStore
internal implementation is now entirely based onSystem.Text.Json
, with no internalNewtonsoft.Json
usage) @ylibrach- significant naming and structural influences based on the EquinoxJS project instigated by by
Einar Norðfjörð 🙏 @nordfjord
API changes summary:
- All packages require
net6.0
(i.e. it works seamlessly with NET 6.0 and and later, but there is no longer anynetstandard2.0
support) - Relies on
FsCodec v3
's FsCodec.StreamId
(replacing the lower-level StreamName abstraction), streamlining how identity types get mapped to stream names- Migrates from
byte[]
Event Bodies toSystem.ReadOnlyMemory<byte>
Category
base class enables significantly simpler wiring (seeFactory
/Store.Config
structure in/samples
anddotnet-templates
- Clearer Category APIs (e.g.
name
is passed to the constructor) - Removal usage of F#-specific and/or otherwise deprecated types from the public interfaces:
FSharpFunc
->Func
System.Tuple
->System.ValueTuple
list
/seq
s of events as returned from Decision functions are now arrays
Added
Equinox
:Decider.Transact
,TransactEx
overloads #325Equinox.LoadOption.RequireLeader
: support for requesting a consistent read of a stream #341Equinox.LoadOption.AllowStale
: Read mode that limits reads to a maximum of one retrieval per the defined time window #386Equinox.Category
base class, withDecider
andStream
helpermodule
s #337Equinox.DeciderCore
: C# friendly equivalent ofDecider
(i.e.Func
andTask
) #338Equinox.ISyncContext.StreamEventBytes
: Exposes stored size of events in the stream (initial impl provides it forDynamoStore
only) #326Equinox.Core.Batching
:BatcherDictionary
,BatcherCache
to host concurrentBatchers
#390Equinox.Core.Batching
: Addlimiter: SemaphoreSlim
argument to extend linger phase #427CosmosStore.CosmosStoreConnector
:Connect
,ConnectAsync
#421CosmosStore.Exceptions
: Active patterns to simplify classification in the context of Propulsion handlers #416CosmosStore.Prometheus
: Addrut
tag to enable filtering/grouping by Read vs Write activity as perDynamoStore
#321DynamoStore
/DynamoStore.Prometheus
: Implements the majority of theCosmosStore
functionality viaFSharp.AWS.DynamoDB
#321EventStore
: Revise test rig to target a Docker-hosted cluster #317EventStoreDb
: As perEventStore
module, but using the modernEventStore.Client.Grpc.Streams
client #196MessageDb
: Implements a message-db storage backend #339 with OpenTelemetry tracing and snapshotting support #348 🙏 @nordfjordeqx init --indexUnfolds cosmos
: enables querying uncompressed unfolds (seeshouldCompress
) #434eqx query cosmos
: Queries based on uncompressed unfolds (seeeqx init -U
) #434eqx query -o FILEPATH cosmos
: Allows capture of raw JSON to a file #444eqx dump
:-s
flag is now optionaleqx stats
:-A
flag to request all stats (equivalent to requesting-ESD
) #424
Changed
- Change surface APIs that use Tuples and Options to
struct
equivalents. Some due tostruct
changes inFsCodec
#82, and usetask
in hot paths #337 - Change surface APIs that use
'event list
or'event seq
to'event[]
#411 - Raise
FSharp.Core
req to6.0.7
, framework req tonet6.0
#310 #337 #33 #411 - Replace
AsyncSeq
usage withFSharp.Control.TaskSeq
v0.4.0
#361 #391 Equinox
: MoveSerilog
dependency fromDecider
constructor toCategory
/Decider.forStream
#337 #419Equinox
:FsCodec.StreamId
replaces usage ofFsCodec.StreamName
#353 #378 #419Equinox.ResolveOption
: rename toLoadOption
#308 #413Equinox.LoadOption
: RenameAllowStale
toAnyCachedValue
#386Equinox.Decider
: Replace'event list
with'event[]
#411Equinox.Decider
: ReplacemaxAttempts
with a default policy and an optional argument onTransact*
APIs #337Equinox.Decider
: renameDecider.TransactAsync
,Decider.TransactExAsync
toTransact
#314Equinox.Core.AsyncBatchingGate
: renamed toBatching.Batcher
#390Equinox.Core.AsyncCacheCell
: renamed toTaskCell
#433Equinox.Core
: Now a free-standing library that a) does not depend onEquinox
b) is not depended on by the Stores (thoughCosmosStore
inlinesTaskCell
) #420- Stores: Change Event Body types, requiring
FsCodec
v3.0.0
, withEventBody
types switching frombyte[]
toReadOnlyMemory<byte>
and/orJsonElement
see FsCodec#75 #323 - Stores:
*Category.Resolve
: ReplaceResolve(sn, ?ResolveOption, ?requestContext)
with?load = LoadOption
parameter on allTransact
andQuery
methods, andDecider.forStream
/Decider.forRequest
to convey request context #308 - Stores:
*Category
ctor: Add mandatoryname
argument, andName
property #410 - Stores:
*Category
ctor: Changefold
to be aFunc
(no changes to F# code required) #421 - Stores:
*Category
ctor: Changecaching
to be last argument, to reflect that it is applied over the top #410 - Stores:
*Category
ctor: Changecaching
andaccess
to be mandatory, addingNoCaching
andUnoptimized
modes to represent the former defaults #417 CosmosStore
: RequireMicrosoft.Azure.Cosmos
v3.35.4
#310CosmosStore
: Switch to natively usingJsonElement
event bodies #305 🙏 @ylibrachCosmosStore
: Switch to natively usingSystem.Text.Json
for serialization of allMicrosoft.Azure.Cosmos
round-trips #305 🙏 @ylibrachCosmosStore
: Only logbytes
when log level isDebug
#305CosmosStore.AccessStrategy.MultiSnapshot
,Custom
: Changelist
andseq
types toarray
#338CosmosStore.CosmosStoreCategory
: GeneralizecompressUnfolds
toshouldCompress
predicate #436CosmosStore.CosmosStoreCategory.TryHydrateTip
: Generates a Stream State Momento based on externally loadedu
nfold state #434CosmosStore.CosmosStoreCategory.TryLoad
: Renders a'state
based on an Unfold #434CosmosStore.Core.Initialization.initAux
: Replace hard-coded manual 400 RU withmode
parameter #328 🙏 @brihadishCosmosStore.CosmosClientFactory
: Moved to Core #430EventStore
: TargetEventStore.Client
v22.0.0
; renameConnector
->EventStoreConnector
#317Tool
/samples/
: switched to useEquinox.EventStoreDb
#196
New Contributors
- @ameier38 was instrumental in the design and implementation of
DynamoStore
and many programming model advancements in V4 - @brihadish made their first contribution in #328 and was key to the development of the concept of the bounded staleness
AllowStale
mode - @epNickColeman made their first contribution in #337 and drove #401;
DynamoStore
has correct ordering semantics thanks to major efforts on his part - @keppelerj made their first contribution in #371
- @nordfjord made their first contribution in #339, added and polished the
MessageDb
store and was a huge impetus behind pretty much all positive changes in v4
Old contributors
- The DDD-CQRS-ES community are the reason this project exists and continues. Countless people influenced design decisions in this release directly and indirectly
- Multiple employers and colleagues over the course of the V4 development have provided boundless tolerance and support for always doing the right thing
Full Changelog: 3.0.7...4.0.0