[{"data":1,"prerenderedAt":59},["ShallowReactive",2],{"workflow-event-sourcing-design-pattern":3},{"id":4,"title":5,"cleanup":6,"contributors":11,"deploy":13,"description":16,"diagram":17,"extension":18,"framework":19,"gitHub":20,"introBox":29,"level":34,"meta":35,"resources":36,"s3URL":45,"services":46,"simplicity":50,"stem":51,"testing":52,"type":56,"usecase":57,"videoId":28,"__hash__":58},"workflows\u002Fworkflows\u002Fevent-sourcing-design-pattern.json","Event Sourcing Design Pattern",{"headline":7,"text":8},"Cleanup",[9,10],"1. Delete the stack: \u003Ccode>sam delete --stack-name STACK_NAME\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[12],"content\u002Fcontributors\u002Fanirudha-joshi.json",{"text":14},[15],"sam deploy --guided","A sample implementation of the event sourcing design pattern using AWS Step Functions","\u002Fassets\u002Fimages\u002Fworkflows\u002Fevent-sourcing-design-pattern.png","json","AWS SAM",{"template":21,"payloads":26},{"repoURL":22,"templateDir":23,"templateFile":24,"ASL":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fstep-functions-workflows-collection\u002Ftree\u002Fmain\u002Fevent-sourcing\u002F","event-sourcing\u002F","template.yaml","statemachine\u002Fevent-sourcing.asl.json",[27],{"headline":28,"payloadURL":28},"",{"headline":30,"text":31},"How it works",[32,33],"Event Sourcing pattern ensures that all changes to application state are stored as a sequence of events. Not just can we query these events, we can also use the event log to reconstruct past states, and as a foundation to automatically adjust the state to cope with retroactive changes.","The example implementation demonstrates implementation of event sourcing pattern to capture product inventory state changes. All product inventory events are sent to a Step Functionsworkflow, which executes series of task and persists the state of product as a sequence of state-changing events. Each task contains mock logic that processes a specific product event (ex: productReceived, productShipped etc.). It then passes on the updated product state to the next processing task. The updated product state along with event which caused the state change is stored in the Product Inventory Event log. ","200",{},{"headline":37,"bullets":38},"Additional resources",[39,42],{"text":40,"link":41},"Event Sourcing pattern","https:\u002F\u002Fdocs.aws.amazon.com\u002Fprescriptive-guidance\u002Flatest\u002Fmodernization-data-persistence\u002Fservice-per-team.html",{"text":43,"link":44},"Decompose monoliths into microservices by using CQRS and event sourcing","https:\u002F\u002Fdocs.aws.amazon.com\u002Fprescriptive-guidance\u002Flatest\u002Fpatterns\u002Fdecompose-monoliths-into-microservices-by-using-cqrs-and-event-sourcing.html",null,[47,48,49],"dynamodb","sfn","lambda","2 - Pattern","workflows\u002Fevent-sourcing-design-pattern",{"headline":53,"text":54},"Testing",[55],"See the GitHub repo for detailed testing instructions.","Standard","Event-Driven Architecture","pKFvqU4R9sdsAsaC2dnrvzm-35Q7VRwZi-ADGLACfCo",1778846889117]