Question : Which of the following statements about SWF are true? Choose answers A. SWF tasks are assigned once and never duplicated B. SWF requires an S3 bucket for workflow storage C. SWF workflow executions can last up to a year D. SWF triggers SNS notifications on task assignment E. SWF uses deciders and workers to complete tasks F. SWF requires at least 1 EC2 instance per domain 1. A,B,C 2. D,E,F 3. D,E,F 4. B,E,F 5. A,C,E
Correct Answer : 5
Explanation: Q: What are workers and deciders? In Amazon SWF, an application is implemented by building workers and a decider which communicate directly with the service. Workers are programs that interact with Amazon SWF to get tasks, process received tasks, and return the results. The decider is a program that controls the coordination of tasks, i.e. their ordering, concurrency, and scheduling according to the application logic. The workers and the decider can run on cloud infrastructure, such as Amazon EC2, or on machines behind firewalls. Amazon SWF brokers the interactions between workers and the decider. It allows the decider to get consistent views into the progress of tasks and to initiate new tasks in an ongoing manner. At the same time, Amazon SWF stores tasks, assigns them to workers when they are ready, and monitors their progress. It ensures that a task is assigned only once and is never duplicated. Since Amazon SWF maintains the application's state durably, workers and deciders don't have to keep track of execution state. They can run independently, and scale quickly. Please see Functionality section of the Amazon SWF detail page to learn more about the steps in building applications with Amazon SWF.
You can have several concurrent runs of a workflow on Amazon SWF. Each run is referred to as a workflow execution or an execution. Executions are identified with unique names. You use the Amazon SWF Management Console (or the visibility APIs) to view your executions as a whole and to drill down on a given execution to see task-level details.
Q: How long can workflow executions run? Each workflow execution can run for a maximum of 1 year. Each workflow execution history can grow up to 25,000 events. If your use case requires you to go beyond these limits, you can use features Amazon SWF provides to continue executions and structure your applications using child workflow executions.
Question : With short polling, when you retrieve messages from the queue, you are not receiving the message. You know there are messages in the queue. What could be the possible reason for not able to get the messages 1. Your message queue servers are down 2. Message has been lost in the queue 3. You have not added header information the message and you application can receive message based on header information 4. Is it possible because your queue has less than 1000 messages, so in subsequent request you will receive the message
Correct Answer : 4
Explanation: With short polling, when you retrieve messages from the queue, Amazon SQS samples a subset of the servers (based on a weighted random distribution) and returns messages from just those servers. This means that a particular receive request might not return all your messages. Or, if you have a small number of messages in your queue (less than 1000), it means a particular request might not return any of your messages, whereas a subsequent request will. If you keep retrieving from your queues, Amazon SQS will sample all of the servers, and you will receive all of your messages.
Question : Which of the following are valid identifiers for the Amazon SQS queue and messages
1. Queue URL 2. Message ID 3. Receipt handle 4. 1 and 2 5. All 1 2 and 3
Correct Answer : 5
Explanation: Amazon SQS uses the following three identifiers that you need to be familiar with: Queue URL , Message ID , Receipt handle
Queue URLs : When creating a new queue, you must provide a queue name that is unique within the scope of all your queues. If you create queues using both the latest WSDL and a previous version, you still have a single namespace for all your queues. Amazon SQS assigns each queue you create an identifier called a queue URL, which includes the queue name and other components that Amazon SQS determines. Whenever you want to perform an action on a queue, you provide its queue URL. The following is the queue URL for a queue named "queue2" owned by a person with the AWS account number "123456789012". http://sqs.us-east-1.amazonaws.com/123456789012/queue2
Important : In your system, always store the entire queue URL as Amazon SQS returned it to you when you created the queue (for example, http://sqs.us-east-1.amazonaws.com/123456789012/queue2). Don't build the queue URL from its separate components each time you need to specify the queue URL in a request because Amazon SQS could change the components that make up the queue URL. You can also get the queue URL for a queue by listing your queues. Even though you have a single namespace for all your queues, the list of queues returned depends on the WSDL you use for the request. For more information, see ListQueues.
Message IDs : Each message receives a system-assigned message ID that Amazon SQS returns to you in the SendMessage response. This identifier is useful for identifying messages, but to delete a message, you need the message's receipt handle instead of the message ID. The maximum length of a message ID is 100 characters.
Receipt Handles : Each time you receive a message from a queue, you receive a receipt handle for that message. The handle is associated with the act of receiving the message, not with the message itself. To delete the message or to change the message visibility, you must provide the receipt handle and not the message ID. This means you must always receive a message before you can delete it (you can't put a message into the queue and then recall it). The maximum length of a receipt handle is 1024 characters.
Important : If you receive a message more than once, each time you receive it, you get a different receipt handle. You must provide the most recently received receipt handle when you request to delete the message or the message might not be deleted. Following is an example of a receipt handle. MbZj6wDWli+JvwwJaBV+3dcjk2YW2vA3+STFFljTM8tJJg6HRG6PYSasuWXPJB+Cw Lj1FjgXUv1uSj1gUPAWV66FU/WeR4mq2OKpEGYWbnLmpRCJVAyeMjeU5ZBdtcQ+QE auMZc8ZRv37sIW2iJKq3M9MFx1YvV11A2x/KSbkJ0=