-
Notifications
You must be signed in to change notification settings - Fork 72
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
Schedule price change for the future #190
Comments
Bi-temporal Event Sourcing will be fine when you have situation where "business validity date" is different than event publication date - seems to be a good match here. |
Backend part is now committed in b7c8395 |
Thanks for the implementation! It's much easier to reason about this strategy when we see the code. I agree with the pros/cons. What alternatives do we have? Sending commands to the future? |
I didn't think about this. Scheduling commands for the future sounds like an alternative. But it seems like we'd have to build some infrastructure in order to achieve that. And also, low chance, that the command might be rejected and the price wouldn't be applied. Such a situation would be highly undesired when using some kind of pricing planning strategy. But that's a low chance. Reasons for failure might be different however the outcome would be harmful. When we were implementing the scheduling feature with @fidel we thought that perhaps we should consider a different model for pricing. Initial idea was that we could have the I would also like to highlight the fact that the current solution is acceptable in my opinion. If time to market would be the only factor I think it's a good value for time spent. Also not that hard to change in the future. However, it feels like debt in terms of the domain model. Perhaps we're limiting ourselves, but we don't know yet about the potential use case. Or we don't know the domain enough, yet. |
We had some discussions and this is clarified for me now. If you think about your events as part of the domain, then this solution makes total sense 👍 |
Only the backend part is finished. UI is still up for grabs |
completed future prices fronted, for now only adding new future prices. |
I'm not sure, but maybe one possible approach to this would be https://railseventstore.org/docs/v2/bi-temporal/ Bi-temporal Event Sourcing, where we publish a normal PriceSet event, but we set the
valid_at
metadata.@mpraglowski sounds good?
The text was updated successfully, but these errors were encountered: