For which of the following use cases are Simple Workflow Service (SWF) and Amazon EC2 an appropriate
solution? Choose 2 answers
A.
Using as an endpoint to collect thousands of data points per hour from a distributed fleet of sensors
B.
Managing a multi-step and multi-decision checkout process of an e-commerce website
C.
Orchestrating the execution of distributed and auditable business processes
D.
Using as an SNS (Simple Notification Service) endpoint to trigger execution of video transcoding jobs
E.
Using as a distributed session store for your web application
B, C
http://www.aiotestking.com/amazon/which-of-the-following-use-cases-are-simple-workflow-service-swf-and-amazon-ec2-an-appropriate-solution/
kirrim
November 5, 2016 at 12:39 pm
I definitely like B and C the best…
A. Using as an endpoint to collect thousands of data points per hour from a distributed fleet of sensors
This is far more applicable scenario for a Kinesis stream. Have the sensors send data into the stream, then process out of the stream (e.g. with a Lambda function to upload to DynamoDb for further analysis, or into CloudWatch if you just wanted to plot the data from the sensors as a time series).
B. Managing a multi-step and multi-decision checkout process of an e-commerce website
Ideal scenario for SWF. Track the progress of the checkout process as it proceeds through the multiple steps.
C. Orchestrating the execution of distributed and auditable business processes
Also good for SWF. The key words in the question are “process” and “distributed”. If you’ve got multiple components involved the process, and you need to keep them all appraised of what the current state/stage in the process is, SWF can help.
D. Using as an SNS (Simple Notification Service) endpoint to trigger execution of video transcoding jobs
This is a potential scenario for Lambda, which can take an SNS notification as a triggering event. Lambda kicks off the transcoding job (or drops the piece of work into an SQS queue that workers pull from to kick off the transcoding job)
E. Using as a distributed session store for your web application
Not applicable for SWF at all. As for how you might want to do this, key word here is “distributed”. If you wanted to store session state data for a web session on a single web server, just throw it into scratch space on the instance (e.g. ephmeral/instance-store drive mounted to the instance). But this is “distributed”, meaning multiple web instances are in play. If one instance fails, you want session state to still be maintained when the user’s traffic traverses a different web server. (It wouldn’t be acceptable for them to have two items in their shopping cart, be ready to check out, have the instance they were on fail, their traffic go to another web instance, and their shopping cart suddenly shows up as empty.) So you save their session state off to an external session store. If the session state only needs to be maintained for, say, 24 hours, ElastiCache is a good solution. If the session state needs to be maintained for a long period of time, store it in DynamoDb.
BC
https://aws.amazon.com/swf/faqs/
Q: When should I use Amazon SWF vs. AWS Step Functions?
AWS Step Functions is a fully managed service that makes it easy to coordinate the components of distributed applications and microservices using visual workflows. Instead of writing a Decider program, you define state machines in JSON. AWS customers should consider using Step Functions for new applications. If Step Functions does not fit your needs, then you should consider Amazon Simple Workflow (SWF). Amazon SWF provides you complete control over your orchestration logic, but increases the complexity of developing applications. You may write decider programs in the programming language of your choice, or you may use the Flow framework to use programming constructs that structure asynchronous interactions for you. AWS will continue to provide the Amazon SWF service, Flow framework, and support all Amazon SWF customers.
Q: What can I do with Amazon SWF?
Getting detailed audit trails and visibility into all running instances of your applications.