Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

SWF Poll API and Tutorial #2063

Closed
bmccary opened this Issue · 0 comments

2 participants

@bmccary

boto Folks,

All of the code examples in the SWF tutorial

http://boto.cloudhackers.com/en/latest/swf_tut.html

have the pattern only the latest ActivityTaskCompleted event is considered. This led me to make an incorrect assumption:

The SWF poll operation will only yield at most one new ActivityTaskCompleted event on each call

In fact the following is true:

The SWF poll operation may yield zero or more new ActivityTaskCompleted events and the poll property called previousStartedEventId is used to determine where new events in the queue start

As a result, this incorrect assumption leads to race conditions which are difficult to spot.

I had to discover this by reading printouts the entire poll structure and then comparing it with AWS's documentation of poll structure.

http://docs.aws.amazon.com/amazonswf/latest/apireference/API_PollForDecisionTask.html

It would be quite useful if the tutorial linked to the AWS SWF API reference. It would also be very useful if the tutorial included an example of explicitly processing multiple new events which occur from a single poll.

Brady

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.