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

Initial event-sourced state machine #2

Closed
wants to merge 1 commit into from

Conversation

jessemyers
Copy link
Contributor

Includes:

  • An abstraction for defining event type enumerations and their behavior
  • A meta class for defining new event models
  • A base store for common event persistence
  • A base controller for common event business logic
  • A starting place for resources and routes

Includes:

 -  An abstraction for defining event type enumerations and their behavior
 -  A meta class for defining new event models
 -  A base store for common event persistence
 -  A base controller for common event business logic
 -  A starting place for resources and routes
@wheremiah
Copy link
Contributor

LGTM

I like the accumulation idea to differentiate between events that cause state changes and events that dont.

@jessemyers jessemyers closed this Apr 24, 2017
@jessemyers jessemyers deleted the feature/initial-structure branch April 24, 2017 23:33
"""
if version is None:
return 1
if self.is_restarting:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the first event cannot be is_restarting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the versioning logic allows it but the transitioning logic might not.

  • The first version is always 1
  • If the first event were of a restarting type, it would still start at version 1
  • If the restarting type came later, you'd get version N+1

I don't think it's easy to express "initial or [some other condition]" yet as a state transition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should now be addressed in develop

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

3 participants