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

Caching should not read forward on miss if window size constrained to 1 #23

Closed
bartelink opened this issue Jun 16, 2018 · 1 comment
Closed
Labels
up-for-grabs https://up-for-grabs.net

Comments

@bartelink
Copy link
Collaborator

Via @sorinoboroceanu
Using the caching layer when each event represents a full set of state by using a window size of 1 and a tautologous compaction predicate (see https://github.com/jet/foldunk/blob/master/Samples/Store/Domain/ContactPreferences.fs) currently has suboptimal behavior if there has been >1 competing write -- uncached, it would read exactly one event (backwards) whereas in this impl, we read all the events to catch up, but will then only use one

@bartelink bartelink added the up-for-grabs https://up-for-grabs.net label Jun 16, 2018
@bartelink
Copy link
Collaborator Author

For now, this has been addressed on the cosmos branch by refusing to permit the mixing of ReadStrategy.EventsAreState with the Cache.

(In Equinox.Cosmos, the Read Strategies get more powerful so implementing this facility does not fit on any reasonable roadmap, especially given the efficiency of a backward read of a single event in EventStore unless the events are of some extreme size and/or other edge cases)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
up-for-grabs https://up-for-grabs.net
Projects
None yet
Development

No branches or pull requests

1 participant