Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AsyncBatchingGate #228

Merged
merged 4 commits into from
Aug 4, 2020
Merged

Add AsyncBatchingGate #228

merged 4 commits into from
Aug 4, 2020

Conversation

bartelink
Copy link
Collaborator

@bartelink bartelink commented Jul 9, 2020

Helper primitive that can be used to constrain contention where multiple threads are targeting a single upstream.

The specific need at hand is where multiple threads in a projector are transacting against the same aggregate. In such a case the duelling transactions trigger Equinox.Cosmos Resync operations / ESDB WrongExpectedVersion which increases load for the upstream, in addition to increasing latency due to having to retry.


Like AsyncCacheCell (although that's slightly more justifiable given its used in the impl of Equinox.Cosmos), these helpers are generic; the happen to be useful in typical Concurrent Transaction processing work, but are not "part of Equinox". Hosting this in Equinox.Core is thus not a long term plan - ideally these primitives ultimately end up with their own home at some point (not dissimilar to how Equinox.Codec moved out to FsCodec).

@bartelink bartelink mentioned this pull request Jul 9, 2020
@bartelink
Copy link
Collaborator Author

(I'm intending to merge this and include in a 2.2.0 release when that happens - atm it's being validated internally)

@bartelink bartelink merged commit 48cb77e into master Aug 4, 2020
@bartelink bartelink deleted the add-abg branch August 4, 2020 11:46
bartelink added a commit that referenced this pull request Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant