• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Amazon shafaq v6-10-12-11
 

Amazon shafaq v6-10-12-11

on

  • 358 views

 

Statistics

Views

Total Views
358
Views on SlideShare
358
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Amazon shafaq v6-10-12-11 Amazon shafaq v6-10-12-11 Presentation Transcript

    • Amazon SDK on Android DevicesCTIA ENTERPRISE AND APPLICATIONS 2011Shafaq AbdullahPrincipal/Architect, SoftwareOctober 12, 2011Twitter: @shafaq110Shafaq.abdullah@zenprise.com © 2011 Zenprise, Inc. All rights reserved. 0
    • Amazon Web Services• Storage• Database• Messaging• Compute• Monitoring © 2011 Zenprise, Inc. All rights reserved. 1
    • Amazon Web Services• Amazon S3• Amazon Simple Db• Amazon SQS• Amazon SNS © 2011 Zenprise, Inc. All rights reserved. 2
    • REST• Resource• Resource’s URI• Resource’s Representation © 2011 Zenprise, Inc. All rights reserved. 3
    • CRUD Operation Description Http Method Read Just read, without modifying GET Delete Delete resource DELETE Create Create a new resource PUT /POST Update Modify resources value POST/PUT © 2011 Zenprise, Inc. All rights reserved. 4
    • AWS Demo © 2011 Zenprise, Inc. All rights reserved. 5
    • AWS Demo © 2011 Zenprise, Inc. All rights reserved. 6
    • S3 Storage Schema• Similar to files and folders• No bucket(s) inside bucket © 2011 Zenprise, Inc. All rights reserved. 7
    • Amazon S3 Bucket Amazon S3 Your S3 Bucket Object 1 Object 2 Object 3 © 2011 Zenprise, Inc. All rights reserved. 8
    • Creating a Bucket in S3AWSAuthConnection conn = new AWSAuthConnection(accessKeyId, secretAccessKey, false, Utils.DEFAULT_HOST,Utils.INSECURE_PORT, CallingFormat.getPathCallingFormat());Response createResponse = conn.createBucket(“TestBucket”, null, null); //PUT © 2011 Zenprise, Inc. All rights reserved. 9
    • Amazon Console © 2011 Zenprise, Inc. All rights reserved. 10
    • Amazon S3 is Restful• Stateless• Client-Server• Layered Architecture• Uniform Interface• Cacheable• Coding on Demand (optional) © 2011 Zenprise, Inc. All rights reserved. 11
    • Security Principles• Build Security in every layer• Group based rule for controlling access in every layer• Limit access to specific IP ranges• Encrypt stored data• Encrypt data in-transit• Rotate AWS credentials, Multifactor authentication © 2011 Zenprise, Inc. All rights reserved. 12
    • Amazon Account Setup• Access Credentials: Your Access Keys, X.509 Certificates, and Key Pairs• Sign-In Credentials: Your E-mail Address, Password, and AWS Multi-Factor Authentication Device• Account Identifiers: Your AWS Account ID and Canonical User ID © 2011 Zenprise, Inc. All rights reserved. 13
    • AWS Account Identifiers• AWS uses two types of account identifiers• The canonical user ID can be used exclusively for Amazon S3 resources such as buckets or files• The AWS account ID can be used for all AWS service resources except Amazon S3 © 2011 Zenprise, Inc. All rights reserved. 14
    • Amazon S3 Client• Public List<Bucket> listBuckets• Public Bucket createBucket(String bucketName)• Public ObjectMetadata getObjectMetadata(String bucketName, String key)• Public S3Object getObject(String bucketName, String key)• Public PutObjectResult putObject(String bucketName, String key, File file) © 2011 Zenprise, Inc. All rights reserved. 15
    • Amazon Simple DB Description• Hierarchy for DataStorage in SImpleDB - Domains - Items - Attributes © 2011 Zenprise, Inc. All rights reserved. 16
    • Simple DB Storage Model © 2011 Zenprise, Inc. All rights reserved. 17
    • Data Creation in SimpleDB• Region Selection US East (Northern Virginia), US West (Northern California), EU (Ireland) Asia Pacific (Singapore), Asia Pacific (Tokyo) Regions• AmazonSimpleDBAsyncClient: has followoing methods for Data Creation CreateDomain DeleteDomain ListDomains DomainMetadata © 2011 Zenprise, Inc. All rights reserved. 18
    • Retrieving Data in Simple DB• GetAttributes to retrieve a specific item• Select to query your data set for items that meet specified criteria © 2011 Zenprise, Inc. All rights reserved. 19
    • API Highlight of Amazon Simple DB• CreateDomain — Create a domain that contains your dataset.• DeleteDomain — Delete a domain.• ListDomains — List all domains.• DomainMetadata — Retrieve information about creation time for the domain, storage information both as counts of item names and attributes, as well as total size in bytes.• PutAttributes — Add or update an item and its attributes, or add attribute-value pairs to items that exist already. Items are automatically indexed as they are received.• BatchPutAttributes — For greater overall throughput of bulk writes, perform up to 25 PutAttribute operations in a single call.• DeleteAttributes — Delete an item, an attribute, or an attribute value.• BatchDeleteAttributes — For greater overall throughput of bulk deletes, perform up to 25 DeleteAttributes operations in a single call.• GetAttributes — Retrieve an item and all or a subset of its attributes and values.• Select — Query the data set in the familiar Example: select * from mydomain where every(keyword) = ‘Car’. Order results using the SORT operator, and count items that meet the condition(s) specified by the predicate(s) in a query using the Count operator. © 2011 Zenprise, Inc. All rights reserved. 20
    • SimpleDB Use CaseS3ObjectID Date Last Subject Comments Rating Tags Created Modified0001 10-10-2011 10-10-2011 • Science • Good A • Information • Animal • Fair • Nature History © 2011 Zenprise, Inc. All rights reserved. 21
    • Simple DB: Read Operation Eventually Consistent Read Consistent Read Stale reads possible No stale reads Lowest read latency Higher read latency Highest read throughput Lower read throughputhttp://www.allthingsdistributed.com/2010/02/strong_consistency_simpledb.html © 2011 Zenprise, Inc. All rights reserved. 22
    • Amazon SQS• Used to pass messages asynchronously between two distributed applications © 2011 Zenprise, Inc. All rights reserved. 23
    • Amazon SQShttp://sqs-public-images.s3.amazonaws.com/Building_Scalabale_EC2_applications_with_SQS2.pdf © 2011 Zenprise, Inc. All rights reserved. 24
    • Amazon SQS• A single queue can be shared with multiple server• A server can “lock” the message under process with a timeout, if its not able to delelte it within the timeout then the lock is relinquished © 2011 Zenprise, Inc. All rights reserved. 25
    • Basic SQS API• CreateQueue: Create queues for use with your AWS account• ListQueues: List your existing queues• DeleteQueue: Delete one of your queues• SendMessage: Add any data entries to a specified queue• ReceiveMessage: Return one or more messages from a specified queue © 2011 Zenprise, Inc. All rights reserved. 26
    • Life Cycle of SQS API• System uses SendMessage to add a new message to it SQS• A different system that processes messages needs more messages to process, so it calls ReceiveMessage• Once a message has been returned by ReceiveMessage, it will not be returned by any other ReceiveMessage until the visibility timeout has passed• If the system that processes messages successfully finishes working with this message, it calls DeleteMessage, which removes the message from the queue so no one else will ever process it © 2011 Zenprise, Inc. All rights reserved. 27
    • Amazon SNS• A highly scalable, flexible, and cost-effective capability to publish messages from an application and immediately deliver them to subscribers or other application• SNS push and SQS poll mechanism © 2011 Zenprise, Inc. All rights reserved. 28
    • NetFlix and AWS http://qcontokyo.com/pdf/adriancockroft.pdf © 2011 Zenprise, Inc. All rights reserved. 29
    • © 2011 Zenprise, Inc. All rights reserved. 30