Memory Checkpoint
Memory Checkpoint
1
shared memory etc. Do note the care which has been taken in the implementation
around threading and the use of interLocked operations. It is not uncommon
that you have multiple threads operating on the same checkpoint.
When you have multiple threads operating on the same InMemoryCheckpoint you
can quite easily run into threading issues associated with how it interacts. There
is however simultaneously a cost associated to making an InMemoryCheckpoint
capable of supporting many concurrent callers.
In many codebases you will see two implementations. One which is focused on
dealing with a single subscriber (and is optimized for it) and another which can
safely support many subscribers.
[1] https://github.com/EventStore/EventStore/blob/master/src/EventStore.Core/TransactionLog/Checkpoint/I