Memory implementation of event store and aggregate store