pawelkaczor / akka-ddd

Akka CQRS/ES framework
https://newicom.pl/akka-ddd/
MIT License
352 stars 61 forks source link

Durable scheduler #3

Closed pawelkaczor closed 9 years ago

pawelkaczor commented 9 years ago

Motivation

Sagas (Process Managers) should be able to schedule timeout events (deadlines) to be notified when deadline comes.

Solution proposal

I came up with an idea of durable scheduler built on top of Eventstore. See initial concept here.

albertolobrano commented 9 years ago

i am not sure this need to be part of the framework. The business logic should contain this.

what will be the use case ?

pawelkaczor commented 9 years ago

Timeouts are part of business process model (See: BPMN-Timer) thus they must be supported by business process engine.

Axon and NServiceBus frameworks (both providing Saga support) also support timeout events:

pawelkaczor commented 9 years ago

Commonly, timeout events are used to ensure Saga reaches end state (eg. failure) when event that was expected to happen in the future does not happen.

albertolobrano commented 9 years ago

I see your point. In our case akka provides already the infrastructure to set timeouts on an actor that's why i thought we may not need it. But If we want to make it explicit in the framework then i like your diagrams

pawelkaczor commented 9 years ago

Akka does not provide durable scheduler (Timeout message will not survive system crash) . That's the reason we have this ticket :)

2015-03-28 9:09 GMT+01:00 Alberto Lobrano notifications@github.com:

I see your point. In our case akka provides already the infrastructure to set timeouts on an actor that's why i thought we may not need it. But If we want to make it explicit in the framework then i like your diagrams

— Reply to this email directly or view it on GitHub https://github.com/pawelkaczor/akka-ddd/issues/3#issuecomment-87189097.

albertolobrano commented 9 years ago

OMG you are right. I am used to think in terms of their views that i completely missed your point.

pawelkaczor commented 9 years ago

MVP (minimum viable product) implemented.