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

Sagas implementation #7

Open
thangchung opened this issue Mar 4, 2017 · 7 comments
Open

Sagas implementation #7

thangchung opened this issue Mar 4, 2017 · 7 comments
Assignees
Labels

Comments

@thangchung
Copy link
Owner

Consider could we use the https://github.com/dotnet-state-machine/stateless to implement the state-machine for the admin approval the article submission from the editor. Maybe we need to choose the workflow lib to make it work

@thangchung thangchung self-assigned this Mar 4, 2017
@thangchung
Copy link
Owner Author

thangchung commented Mar 4, 2017

Read this for more clear about state machine, workflow and sagas https://medium.com/@roman01la/confusion-about-saga-pattern-bbaac56e622#.7x70mb8q3
Another collection of articles about Sagas at https://github.com/thangchung/magazine-website-akka/wiki/Saga-research

@thangchung
Copy link
Owner Author

thangchung commented Mar 4, 2017

stateless + quartz + topshelf

We can use Quartz (https://github.com/quartznet/quartznet) to schedule the job (run forever) and inside that job, we can trigger the stateless's state machine to get it work. Not sure it works or not? Need to check
https://stackoverflow.com/questions/25299662/executing-multiple-quartz-net-jobs-with-topshelf
I think Topself will boot the Service to run the persistence actor, inside that actor will get events from event store to re-init the state of the Aggregate of entity, then we can instance the stateless's state machine for run in every 1 minute or more by using Quartz

akka FSM + quartz + topshelf

The best way to do here is akka state machine with Quatz

@thangchung
Copy link
Owner Author

Really nice example using stateless at https://sachabarbs.wordpress.com/2013/05/16/simple-but-nice-state-machine/

@thangchung
Copy link
Owner Author

The next refactor should be as

  1. Separate the process manager into another service, maybe ProcessManager service
  2. Make current CategoryService builds the actor selection that points to the ProcessManager service
  3. Then each request in CategoryService will trigger the command to the ProcessManager service
  4. ProcessManager service will take care of inter-communication with side-effect services like email, pdf... services to finish its works and persistence its state into the storage via akka's PersistenceFSM

@thangchung
Copy link
Owner Author

Good for reference at http://vasters.com/archive/Sagas.html

thangchung added a commit that referenced this issue Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant