Designing Highly Available, Cost Efficient Cloud Solutions
Developing Cloud Solutions
An introduction to the AWS components that help us develop highly available, cost efficient solutions
In this course we will:
Understand the core AWS services, uses, and basic architecture best practices
Identify and recognize cloud architecture considerations, such as fundamental components and effective designs.
Elasticity and Scalability
Regions and AZ's
Amazon Elastic Load Balancer
Amazon Simple Queue Service
Amazon Elastic IP Addresses
Amazon Auto Scaling
Identify the appropriate techniques to code a cloud solution
Recognize and implement secure procedures for optimum cloud deployment and maintenance
Using Amazon SQS
Using Amazon SNS
Using Amazon SWF
Using Cross Origin Resources (CORS)
If you have thoughts or suggestions for this course, please contact Cloud Academy at firstname.lastname@example.org.
Hi. This entire lecture will be dedicated to the Simple Workflow Service. AWS's Simple Workflow Service is a fully-managed state tracker and task coordinator in the cloud. It works differently from SQS where you only store messages to process as you need. SWF on the other hand, manages the entire workflow. It helps developers build, run and scale background jobs that have parallel or sequential steps.
This example provided by AWS, shows an E-Commerce application that starts when the user places an order. The next task is to verify the order. After the order gets verified, the payment is processed and the order must be shipped. Notice that this process is performed by the warehouse employees. SWF has support for human tasks, too. After the order is shipped, it's time to record the completion and end the workflow.
During this entire workflow, we have more than one entity involved in the process. These entities are called actors. We'll talk about those next. A workflow has three types of actors. We have the workflow starters, which are responsible to start the workflow. In the last example, our workflow starters are the customers who place orders. We have the workers, which in our example were the servers doing the processing, and also the employees that ship the order. And the last category of actor is the decider.
This wasn't so clear in the example. Deciders are vital to workflows. A decider is an implementation of a workflow's coordination logic. Besides actors, there are a few more concepts that you should be aware of for the exam's Simple Workflow Service related objectives. All the workflows have tasks that are managed by the decider logic. Each task is performed by a worker. Tasks are predefined functions. The progress of every workflow execution is recorded in its workflow history, which Amazon SWF maintains. It is a detailed, complete and consistent record of events since the workflow started.
Domains are the scope of all the workflows that you have. All the other components will be found within a domain.
It's important to know that workflows in different domains cannot interact with each other. This is basically what you need to know for the exam.
However, let me briefly show you how some of those things appear in the AWS console. To be brief, I've already created a domain. It's called Sample Workflow, but it is a domain. I've used this sample workflow to deploy it. You can do this by yourself if you want, but it's not needed.
Here we can take a look at the executions that we have. Currently there are none. We have a simple workflow in here that processes an image file and converts it to black and white or sepia, depending on what you choose. There is not much to see here, just the active executions and the closed executions in the last 24 hours. We could start a new execution, but I'll get to that in a few moments. I would first like to show you the activity tasks that we have. These are all the defined tasks.
We could use those tasks in more than one workflow within a domain, and really, there's not much to see or do in here, since SWF is likely used with a programming language and an AWS SDK. The console has only basic stuff, like delete tasks.
Now, let's start a new execution. Don't expect too much, since I haven't set up this sample workflow properly. I just wanted to show you how it would feel in the real world. You must provide an ID to the execution and a few parameters that aren't important for us right now. Click on continue and add some input. Review.
And now, we're good to go. What I'd like to show you is that we can check the status of this execution right here. We can also send signals, cancel, or terminate the execution in case we need to. That's it for this lecture. I hope you enjoyed it.
About the Author
Andrew is an AWS certified professional who is passionate about helping others learn how to use and gain benefit from AWS technologies. Andrew has worked for AWS and for AWS technology partners Ooyala and Adobe. His favorite Amazon leadership principle is "Customer Obsession" as everything AWS starts with the customer. Passions around work are cycling and surfing, and having a laugh about the lessons learnt trying to launch two daughters and a few start ups.