AWS Summit Tel Aviv - Startup Track - Backend Use Cases
1. AWS Summit 2013 Tel Aviv
Oct 16 – Tel Aviv, Israel
BACK-END USE CASES
Carlos Conde – Sr. Mgr. Solutions Architecture
Thomas Metschke – Technical Program Manager AWS OpsWorks
21. DECIDERS
COORDINATION LOGIC
1.
Poll for work on a decision list
Long polling
2.
Evaluate workflow execution history
SWF sends full history in JSON format
3.
Return decision to Amazon SWF
Usually scheduling another task
22. WORKERS
EXECUTION LOGIC
1.
Poll for work on a specific task list
Long polling
2.
Execute works, send heartbeats
SWF sends input data from deciders
3.
Return success / failure
Detailed data can be provided to deciders
23. AMAZON SWF TRACKS:
Execution
Time to start, time to finish, …
Time to finish for overall workflow
Timeouts controlled for each of these (and more)
Heartbeats for long-running activities
(optional)
Decider is informed of timeouts
Schedule retries, “mitigation” strategies or cleanup tasks
24. NO NEW LANGUAGE
TO LEARN
YOUR CODE IS YOUR WORKFLOW LANGUAGE
AMAZON SWF MAINTAINS STATE
36. SD $0.015 / MINUTE
Resolution of less than 720p
HD $0.030 / MINUTE
Resolution of more than 720p
Transcode up to 20 minutes of content each
month for free.
81. iOS
Android
// Create Amazon S3 Client
// Create Amazon S3 Client
AmazonS3Client *s3 = [[AmazonS3Client alloc]
initWithAccessKey:ACCESS_KEY_ID withSecretKey:SECRET_KEY];
AmazonS3Client s3 = new AmazonS3Client(
new BasicAWSCredentials( ACCESS_KEY_ID, SECRET_KEY ) );
// Put an Object into a Bucket
// Put an Object into a Bucket
S3PutObjectRequest *por = [[S3PutObjectRequest alloc]
initWithKey:VIDEO_NAME inBucket:VIDEO_BUCKET];
por.contentType = @“mpeg4";
por.data = video;
[s3 putObject:por];
PutObjectRequest por =
new PutObjectRequest(VIDEO_BUCKET,
VIDEO_NAME,
new java.io.File( video ) );
s3.putObject( por );
// Get an Object from a Bucket
// Get an Object from a Bucket
S3GetObjectRequest *gor = [[S3GetObjectRequest alloc]
initWithKey:VIDEO_NAME withBucket:VIDEO_BUCKET];
S3GetObjectResponse *response = [s3 getObject:gor];
S3Object data = s3.getObject(VIDEO_BUCKET, VIDEO_NAME);