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

[Discussion] Consistency (Strong vs Eventual): give a better name #125

Closed
cottinisimone opened this issue Oct 10, 2022 · 2 comments
Closed

Comments

@cottinisimone
Copy link
Contributor

cottinisimone commented Oct 10, 2022

This discussion is related to this PR

@cottinisimone
Copy link
Contributor Author

@emturner proposed this:

/// Governs the relationship of an event to a resulting projection.
pub enum ParentEventRelationship {
   ///  This projector must succeed, for the parent event to be persisted.
   Blocking,
   /// This projector is allowed to fail, and doesn't block persisting the parent event.
   Fallible
}

It seems to me that ParentEventRelationship is a bit a too long name. What do you think about renaming it in Persistence? This seems to me that is moreover more consistent with PgStore::persist function

/// Specify the persistence for that projector
pub enum Persistence {
    ///  This projector must succeed, for the event to be persisted.
    Mandatory,
    /// This projector is allowed to fail, and doesn't block persisting the event.
    Fallible,
}

Or ProjectorPersistence too. Anyway no strong opinions on this topic

@emturner
Copy link
Contributor

@cottinisimone I agree that the original suggestion is a bit too long!

Fwiw, I like your suggestion of ProjectorPersistence, with Mandatory & Fallible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment