Hi, quick question regarding a pattern:
I saw a pattern a while ago (of which the name I sadly cannot cemember), which chained several complex operations and also noted a "reversal" operation for each of them, in case something in the chain fails.
Quick example:
I want to create something in my application, let's call it a Workspace.
For a workspace I need: An s3 bucket, an ElasticSearch index, and lastly a Database entry which will need the info of both previous steps.
So my process in the mentioned pattern would look like this:
1. Create S3 bucket, return a bucket name. Reversal operation: delete bucket with that name.
2. Create ElasticSearch index, return index name. Reversal operation: delete index with that name.
3. Create Database entry, use values of 1. and 2. for that.
Now, when 1. Fails, rev. op. of 1. triggers.
When 3. should fail after 1. and 2. succeeded, automatically rev. ops. of 1. and 2. trigger.
This way I do not have to care about the cleanup of a more complex chain of events, which depend on each other.
Is this possible with the current Effect library methods, and if so, how? I read through the docs but I couldn't really find something that would handle this for me.
Thanks in advance!