What is Amazon Simple Workflow Service? - Amazon Simple Workflow Service

What is Amazon Simple Workflow Service?

The Amazon Simple Workflow Service (Amazon SWF) provides a way to build, run, and scale background jobs that have parallel or sequential steps. With Amazon SWF, you can coordinate work across distributed components, tracking the state of tasks.

In Amazon SWF, a task represents a logical unit of work that is performed by a component of your application. Coordinating tasks across the application involves managing intertask dependencies, scheduling, and concurrency in the logical flow of your application. Amazon SWF gives you control over implementing tasks and coordinating them without worrying about underlying complexities such as tracking their progress and maintaining their state.

When using Amazon SWF, you implement workers to perform tasks. Workers can run either on cloud infrastructure, such as Amazon Elastic Compute Cloud (Amazon EC2), or on your own premises. You can create tasks that are long-running, or that may fail, time out, or require restarts—or that may complete with varying throughput and latency. Amazon SWF stores tasks and assigns them to workers when they are ready, tracks their progress, and maintains their state, including details on their completion.

To coordinate tasks, you write a program that gets the latest task state from Amazon SWF and uses that state to initiate subsequent tasks. Amazon SWF maintains an application's execution state durably, so your application is resilient to individual component failures. With Amazon SWF, you can build, deploy, scale, and modify application components independently.

Amazon SWF suits use cases that require coordination of tasks, including media processing, web application back-ends, business process workflows, and analytics pipelines.

Develop with AWS SDKs

Amazon SWF is supported by the AWS SDKs for Java, .NET, Node.js, PHP, Python and Ruby, providing a convenient way to use the Amazon SWF HTTP API in the programming language of your choice.

You can develop deciders, activity workers, or workflow starters using the API exposed by these libraries. And, you can use visibility operations through these libraries so you can develop your own Amazon SWF monitoring and reporting tools.

To download tools for developing and managing applications on AWS, including SDKs, go to the Developer Center.

For detailed information about the Amazon SWF methods in each SDK, refer to the language-specific reference documentation for the SDK.

Consider the AWS Flow Framework

The AWS Flow Framework is an enhanced SDK for writing distributed, asynchronous programs that run as workflows on Amazon SWF. The framework is available for the Java programming language and provides classes for writing complex distributed programs.

With the AWS Flow Framework, you use preconfigured types to map the definition of your workflow directly to methods in your program. The AWS Flow Framework supports standard object-oriented concepts, such as exception-based error handling, which makes it easier to implement complex workflows. Programs written with the AWS Flow Framework can be created, run, and debugged entirely within your preferred editor or IDE. For more information, see the AWS Flow Framework website, and see AWS Flow Framework for Java Developer Guide.

Build with the HTTP Service API

Amazon SWF provides service operations that are accessible through HTTP requests. You can use these operations to communicate directly with Amazon SWF, and you can use them to develop your own libraries in any language that can communicate with Amazon SWF through HTTP.

You can develop deciders, activity workers, or workflow starters by using the service API. You can also use visibility operations through the API to develop your own monitoring and reporting tools.

For information about how to use the API, see Making HTTP Requests to Amazon SWF.