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
From: Ron Liu
Sent: 8/15/2014 7:43 AM
To: ddd...@googlegroups.com
Cc: Kasey Speakman
Subject: Re: [DDD/CQRS] How to implement delete and delete-after-N-days in event sourcingHi 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
On Sat, Aug 16, 2014 at 12:18 AM, Michael Schmidt <mikeyw...@gmail.com> wrote:So if you use a future message, and the user touches that cart again, do you cancel the message so the user has another X days to keep their cart? or do you copy the cart to a new cart. If you do that you can delete the old cart right away.
I guess I need to see the video. Read some more about future messages.
Sent from my Windows Phone
From: Kasey Speakman
Sent: 8/15/2014 6:33 AM
To: ddd...@googlegroups.com
Subject: Re: [DDD/CQRS] How to implement delete and delete-after-N-days in event sourcingHere is perspective from Rinat.
On Fri, Aug 15, 2014 at 1:39 AM, Ron Liu <ronl...@gmail.com> wrote:Hi Kasey,Could you give me a link I can learn from?Thanks,Ron
On Fri, Aug 15, 2014 at 12:41 AM, Kasey Speakman <ka...@cornerspeed.com> wrote:I recall him saying that he starts with projected views and letting a user be the process manager. Then automation options are evaluated as the process solidifies.
On Thursday, August 14, 2014 9:36:40 AM UTC-5, Kijana Woodard wrote: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.--
Studying for the Turing testTo unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+u...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.--
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 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 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.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dddcqrs/nkiqBT4hIY4/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.