--
You received this message because you are subscribed to a topic in the Google Groups "DDD/CQRS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dddcqrs/R5kZce_WCJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Fwiw, I think I remember Rinat Abdullin talking about falling out of favor with storing "future messages" in a separate timeout service. I was never very clear on the replacement, but it might have been just keeping all the timeouts in memory.
On Thu, Aug 14, 2014 at 9:18 AM, Greg Young <gregor...@gmail.com> wrote:
Some event stores such as event store support this internally $maxage on stream. A more generic solution can be seen however in process managers and delayed messaging see my talk from dddx this year on skills after website
Hey Ron!--The case you want to delete an aggregate, you might store a deleted property to maintain enough state to be able to hold the hypothetical invariant that the only command that can be issued from that point on to this specific aggregate is a "RestoreAggregateCommand". You might have the repository wrapping an event store return null if it determines that an aggregate (after having all events applied to it) had a "deleted property" of "true". Either way, what comes out of the event store is events, that's it. They get applied to a specific aggregate as part of its history by a repository and the repository exposes the aggregate according to the constraints of its interface.In the case you wanted to implement "delete after N days", I have in the past used sagas to pull this off. Essentially each saga becomes an instance of a workflow that is defined by the behaviour you're seeking. In this case, the saga would abstractly "recognize how many days have passed since creation" and then simply send a command to your application, deleting the item. Greg Y. has a post on these forums I'll try to hunt down that describes this in more detail. If I can't find it, I'll try to elaborate more. But essentially, it's a long-running process that abstracts the rule you've described and simply sends a DeleteThisThingCommand when it's time (which is great because it just fits with the rest of your architecture, usually)
On Thursday, August 14, 2014 7:51:48 AM UTC-4, Ron Liu wrote:Hi Guys,I am new to event sourcing, recently I am trying on my e-commerce project. Right now I am struggling with how to delete or delete-after-N-days cases.1. Delete:I guess I should introduce a delted property in AbstractEventSourcedAggregate, and when delete command comes, just set this property to true. And when eventstore try to get an aggregate which has been set to deleted, it should return null. Is it right way to do it?2. Delete-after-N-days:The case is shopping cart. we should delete cart items after N days. But who should send a command which will generate this events and when?
Thanks,Ron
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "DDD/CQRS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dddcqrs/R5kZce_WCJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dddcqrs+u...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "DDD/CQRS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dddcqrs/R5kZce_WCJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dddcqrs+u...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "DDD/CQRS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dddcqrs/R5kZce_WCJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yes, it does seem like a poor use of future messages. We don't use any of this (ddd) , but our carts are expired by deletion by a job. Old school.
Sent from my Windows Phone
Subject: Re: [DDD/CQRS] How to implement delete and delete-after-N-days in event sourcing
Hi Michael,I think I will expire the cart only based on createdOn, which means touching again will not extend.If I really want to extend, based on Grey's future message talk, I guess we should add a number(like a sign) into message schema, so1. it sent a future message with 1 and expiry date is N day after yesterday, assume cart was created yesterday;2. when user touch ita. send a message straight away with -1 and date is N days after now which means cancel any future message whose date is before N days after nowb. send another future message again with 1 and date is N days after now.Hopefully it make sense.By the way, I feel a little bit it is overkilled to use future message to expire a cart, I am not sure if projection can do the same job.Cheers,Ron
--
You received this message because you are subscribed to a topic in the Google Groups "DDD/CQRS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dddcqrs/R5kZce_WCJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dddcqrs+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
IMO, The difference between scheduled job and future message are:1. If we doesn't care the accuracy, scheduled job is a better option, because it is easy. Like cart expiration case, the requirement should be expired in 2 hours, but it doesn't matter if it really expired in 2 hours and 1minute.2. If we do care the accuracy, has to use future message, like reserve patter used in movie ticket sale case, the requirement is the order should be expired in exact 15 minutes
On Thursday, 21 August 2014 23:26:35 UTC+10, Kijana Woodard wrote:That's just an, unfortunate, implementation detail.
The scheduled job run itself is the "future message".
Subject: RE: [DDD/CQRS] How to implement delete and delete-after-N-days inevent sourcing
Except its not a "message" its a db script. Our carts are kept in a relational db using XML. Don't even get me started.
Since its db code, compares a date, deletes a record, I have a hard time calling it a message. A command yes "delete cart"...
Sent from my Windows Phone
Subject: Re: [DDD/CQRS] How to implement delete and delete-after-N-days in event sourcing
"Yes, it does seem like a poor use of future messages. We don't use any of this (ddd) , but our carts are expired by deletion by a job. Old school."Umm what is your job? Its just a specific (poorly done) implementation of a future message no?
On Tue, Aug 19, 2014 at 11:34 AM, Michael Schmidt <mikeyw...@gmail.com> wrote:
Yes, it does seem like a poor use of future messages. We don't use any of this (ddd) , but our carts are expired by deletion by a job. Old school.
Sent from my Windows Phone
Subject: Re: [DDD/CQRS] How to implement delete and delete-after-N-days in event sourcing
Hi Michael,I think I will expire the cart only based on createdOn, which means touching again will not extend.If I really want to extend, based on Grey's future message talk, I guess we should add a number(like a sign) into message schema, so1. it sent a future message with 1 and expiry date is N day after yesterday, assume cart was created yesterday;2. when user touch ita. send a message straight away with -1 and date is N days after now which means cancel any future message whose date is before N days after nowb. send another future message again with 1 and date is N days after now.Hopefully it make sense.By the way, I feel a little bit it is overkilled to use future message to expire a cart, I am not sure if projection can do the same job.Cheers,Ron
--
You received this message because you are subscribed to a topic in the Google Groups "DDD/CQRS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dddcqrs/R5kZce_WCJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dddcqrs+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Studying for the Turing test
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.