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 Equinox.StreamId #353

Merged
merged 14 commits into from
Nov 16, 2022
Merged

Add Equinox.StreamId #353

merged 14 commits into from
Nov 16, 2022

Conversation

bartelink
Copy link
Collaborator

@bartelink bartelink commented Nov 15, 2022

Polishes the ids -> stream name -> Decider resolution process

  • removes ugly struct tuples from primary APIs (temp state from earlier performance work)

The major credit must go to @nordfjord who provided the impetus for this effort, and had the final late night insight that leaves us with a well-named and Simple mechanism that resolves all the forces in the mapping process neatly

src/Equinox/Decider.fs Outdated Show resolved Hide resolved
src/Equinox/Decider.fs Outdated Show resolved Hide resolved
samples/Tutorial/Set.fs Outdated Show resolved Hide resolved
src/Equinox/Decider.fs Outdated Show resolved Hide resolved
@bartelink bartelink changed the title Add Equinox.StreamId Add Equinox.Target Nov 16, 2022
@nordfjord
Copy link
Contributor

Okay, my thinking cap has been on for a long time today so this is probably a horrible line of questioning. Given we already have a Category class, why do we not store the category name there?

@bartelink
Copy link
Collaborator Author

  1. Category is needed when filtering events to react to
  2. the constant would need to be passed to N Categories where a Config permits multiple stores (e.g. Memory)
  3. you lose the forcing function that. makes people put the ids and the category name constant together top of file just before the events
    (and I think there are exotic situations where you'd want to parameterise the categoryName, but use a single Category instance)

@bartelink bartelink changed the title Add Equinox.Target Add Equinox.StreamId Nov 16, 2022
@bartelink bartelink marked this pull request as ready for review November 16, 2022 10:56
src/Equinox/Decider.fs Outdated Show resolved Hide resolved
DOCUMENTATION.md Outdated Show resolved Hide resolved
@nordfjord
Copy link
Contributor

This is looking great!

@bartelink bartelink merged commit f74c93a into master Nov 16, 2022
@bartelink bartelink deleted the streamid branch November 16, 2022 15:56
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.

None yet

2 participants