$30 off During Our Annual Pro Sale. View Details »

Rethinking the mobile universe with Amazon Web Services

Rethinking the mobile universe with Amazon Web Services

Simone Brunozzi

January 24, 2013
Tweet

More Decks by Simone Brunozzi

Other Decks in Technology

Transcript

  1. Simone Brunozzi ( @simon )
    Senior Technology Evangelist, Amazon Web Services
    Rethinking the mobile universe
    with Amazon Web Services

    View Slide

  2. “Knowledge starts
    from great questions.”

    View Slide

  3. The Mobile Universe
    PART ONE

    View Slide

  4. 1
    Are Desktop and Mobile
    that different?
    PART ONE

    View Slide

  5. Desktop
    Mobile

    View Slide

  6. Users Front End Back End

    View Slide

  7. Users Front End Back End
    3rd party
    API
    3rd party
    API

    View Slide

  8. Users Front End Back End
    3rd party
    API
    Desktop
    Mobile
    3rd party
    API

    View Slide

  9. Desktop
    Mobile

    View Slide

  10. Desktop
    Mobile

    View Slide

  11. Real World

    View Slide

  12. Desktop
    Mobile
    Mobile

    View Slide

  13. Desktop Mobile
    Mobile

    View Slide

  14. Mobile
    Mobile
    Desktop

    View Slide

  15. 2
    Why Desktop?
    Why Mobile?
    PART ONE

    View Slide

  16. Location awareness
    Desktop Mobile
    App complexity / Richness
    Payments
    Intimacy

    View Slide

  17. Location awareness
    Mobile
    App complexity / Richness
    Payments
    Intimacy
    Desktop

    View Slide

  18. Location awareness
    Mobile
    App complexity / Richness
    Payments
    Intimacy
    Desktop

    View Slide

  19. Location awareness
    Mobile
    App complexity / Richness
    Payments
    Intimacy
    Desktop

    View Slide

  20. Location awareness
    Mobile
    App complexity / Richness
    Payments
    Intimacy
    Desktop

    View Slide

  21. Location awareness
    Mobile
    App complexity / Richness
    Payments
    Intimacy
    Camera/GPS/
    NFC/Bluetooth/
    Voice
    Bandwidth/
    Power/Screen/
    Keyboard
    Desktop

    View Slide

  22. Let’s talk Mobile...

    View Slide

  23. 3
    Mobile Web
    or
    Rich (Native) App?
    PART ONE

    View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. "Don't shrink. Rethink."
    Jeff Hawkins
    1998 Palm developer conference

    View Slide

  28. View Slide

  29. 4
    HTML5?
    App stores? Discovery?
    Distribution? Monetization?
    PART ONE

    View Slide

  30. View Slide

  31. Web Native mobile apps
    Native desktop

    View Slide

  32. Web
    Desktop Mobile
    Native desktop
    Native mobile apps

    View Slide

  33. Web
    Desktop Mobile
    Native desktop
    Native mobile apps

    View Slide

  34. 5
    Does it make a difference?
    (if I use Cloud Computing or not)
    PART ONE

    View Slide

  35. View Slide

  36. Benefits
    of Cloud Computing

    View Slide

  37. View Slide

  38. AWS Mobile SDK
    PART TWO

    View Slide

  39. 6
    How can I develop
    with Amazon Web Services?
    PART TWO

    View Slide

  40. AWS Developer tools
    38
    SDKs IDE toolkits

    View Slide

  41. AWS Developer tools
    39
    SDKs IDE toolkits
    Command Line Tools

    View Slide

  42. AWS Developer tools
    40
    SDKs IDE toolkits
    Command Line Tools Command Line Interface
    New!

    View Slide

  43. View Slide

  44. View Slide

  45. View Slide

  46. View Slide

  47. 7
    Can you show me an example?
    PART TWO

    View Slide

  48. DEMO
    (before the technical details)

    View Slide

  49. View Slide

  50. Now the technical details :-)

    View Slide

  51. 8
    How can I get started?
    PART TWO

    View Slide

  52. Using the AWS Mobile SDK (Android)
    1) Download + install Eclipse
    2) Download + install ADT (Android Dev Tools) plugin
    3) Configure the ADT plugin (prompted after restart)
    4) Download + setup the Android SDK Manager
    5) Setup an Android Virtual Device (AVD)
    6) Download and install the AWS toolkit for Eclipse
    7) You can easily start a new AWS Android Project
    50

    View Slide

  53. 51

    View Slide

  54. 52

    View Slide

  55. 53

    View Slide

  56. 54

    View Slide

  57. 55

    View Slide

  58. 9
    Why do I need the
    AWS Mobile SDKs?
    PART TWO

    View Slide

  59. Why do I need the AWS Mobile SDKs?
    57
    Simplifies Development Thick client Architecture
    iOS:
    v 4.3 and above
    x
    y
    Android:
    v 2.2 (API level 8) and above

    View Slide

  60. Why do I need the AWS Mobile SDKs?
    58
    Simplifies Development
    x
    y
    No back end needed
    High/Low level interfaces
    Credentials management

    View Slide

  61. Thin/Thick client architecture
    AWS SDK
    Service

    View Slide

  62. Thin/Thick client architecture
    Service
    AWS SDK
    AWS Mobile SDK

    View Slide

  63. 10
    Which services are supported
    by the AWS Mobile SDKs?
    PART TWO

    View Slide

  64. 62
    Compute / Networking
    Amazon EC2
    Elastic Load Balancing
    Auto Scaling
    App services
    Amazon SQS
    Amazon SNS
    Amazon SES
    Database
    Amazon DynamoDB
    Amazon SimpleDB
    Deployment/Management
    Amazon CloudWatch
    Storage/CDN
    Amazon S3
    EXTRA
    Security Token Service

    View Slide

  65. 11
    How are the SDKs integrated
    into my Application?
    PART TWO

    View Slide

  66. App integration
    64
    Single framework that
    can be added to your
    application
    Single or service level
    jars available
    Android
    iOS

    View Slide

  67. App integration
    65
    Single framework that
    can be added to your
    application
    Single or service level
    jars available
    Statically linked
    (only parts that are
    used will be added)
    Proguard integration
    (obfuscate/minimize)
    Android
    iOS

    View Slide

  68. Why Proguard is important
    1) Removes unused code (usage.txt)
    2) Classes/fields/methods names are obscured (mapping.txt)
    3) Non obfuscated ones are listed in “seeds.txt”
    4) The resulting .apk is smaller, harder to reverse engineer
    66

    View Slide

  69. Why Proguard is important
    1) Removes unused code (usage.txt)
    2) Classes/fields/methods names are obscured (mapping.txt)
    3) Non obfuscated ones are listed in “seeds.txt”
    4) The resulting .apk is smaller, harder to reverse engineer
    1) Proguard just needs to be enabled
    2) You can customize it through “proguard-project.txt”
    67

    View Slide

  70. 68
    http://mobile.awsblog.com

    View Slide

  71. 12
    Some code, please?
    PART TWO

    View Slide

  72. AmazonS3Client s3 = new AmazonS3Client (
    new BasicAWSCredentials ( ACCESS_KEY_ID, SECRET_KEY ) );
    70
    Create
    Amazon S3
    client

    View Slide

  73. AmazonS3Client s3 = new AmazonS3Client (
    new BasicAWSCredentials ( ACCESS_KEY_ID, SECRET_KEY ) );
    s3.createBucket ( PICTURE_BUCKET ) ;
    71
    Create
    Amazon S3
    client
    Create
    Amazon S3
    bucket

    View Slide

  74. AmazonS3Client s3 = new AmazonS3Client (
    new BasicAWSCredentials ( ACCESS_KEY_ID, SECRET_KEY ) );
    s3.createBucket ( PICTURE_BUCKET ) ;
    PutObjectRequest por = new PutObjectRequest (
    PICTURE_BUCKET,
    PICTURE_NAME,
    new java.io.File ( image ) );
    s3.putObject ( por ) ;
    72
    Create
    Amazon S3
    client
    Create
    Amazon S3
    bucket
    Put object
    into bucket

    View Slide

  75. AmazonS3Client s3 = new AmazonS3Client (
    new BasicAWSCredentials ( ACCESS_KEY_ID, SECRET_KEY ) );
    s3.createBucket ( PICTURE_BUCKET ) ;
    PutObjectRequest por = new PutObjectRequest (
    PICTURE_BUCKET,
    PICTURE_NAME,
    new java.io.File ( image ) );
    s3.putObject ( por ) ;
    S3Object data = s3.getObject ( PICTURE_BUCKET, PICTURE_NAME ) ;
    73
    Get object
    from bucket
    Create
    Amazon S3
    client
    Create
    Amazon S3
    bucket
    Put object
    into bucket

    View Slide

  76. Low level APIs
    74
    Low level APIs

    View Slide

  77. High level (DynamoDB)
    75
    AWS Persistence Framework
    for Core Data
    iOS v 5.0 and
    above

    View Slide

  78. High level (DynamoDB)
    76
    DynamoDB Mapper for Android

    View Slide

  79. Key primaryKey = new Key().withHashKeyElement(targetValue);
    DeleteItemRequest request = new DeleteItemRequest()
    .withTableName(PropertyLoader
    .getInstance()
    .getTestTableName())
    .withKey(primaryKey);
    ddb.deleteItem(request);
    mapper.delete(deleteUserPreference);
    77
    Low level API
    DynamoDB
    mapper for
    Android

    View Slide

  80. 13
    What about
    security and credentials?
    PART TWO

    View Slide

  81. 79
    http://aws.amazon.com/articles/SDKs

    View Slide

  82. Never store credentials in the App
    1) Credentials can be extracted from an App
    2) No individual revocation (all or none)
    3) No rotation (the App would not work)
    80

    View Slide

  83. Token Vending Machine
    Security
    Token
    Service
    IAM
    1) Anonymous TVM (identity of the phone user is not stored)
    2) Identity TVM (user registration and login)

    View Slide

  84. 14
    I need HELP!
    PART TWO

    View Slide

  85. How to get help
    1) https://forums.aws.amazon.com/forum.jspa?forumID=88
    2) SDKs contain samples/articles
    3) AWS Mobile blog: http://mobile.awsblog.com
    4) AWS Support
    83

    View Slide

  86. The Mobile Universe
    PART ONE
    AWS Mobile SDK
    PART TWO
    ???
    PART THREE
    Conclusions
    PART FOUR

    View Slide

  87. A guest
    PART THREE

    View Slide

  88. 86
    1/8

    View Slide

  89. 87
    2/8

    View Slide

  90. 88

    View Slide

  91. 89
    5/8

    View Slide

  92. 90
    4/8

    View Slide

  93. 91
    6/8

    View Slide

  94. 92
    7/8

    View Slide

  95. 93
    8/8

    View Slide

  96. Conclusions
    PART FOUR

    View Slide

  97. Simone Brunozzi ( @simon )
    Senior Technology Evangelist, Amazon Web Services
    Rethinking the mobile universe
    with Amazon Web Services
    Thank you!

    View Slide