SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Combining REST and Context for
Killer iPhone Apps

Iphone Developer Summit
22.June.2009


Jason Hayes Christensen
jasonc411.com
Intro
●   Mobile Applications Entered a New
    Frontier
●   New Platforms like the iPhone are:
    ●   ALWAYS Connected
        –   3G, WiFi, Bluetooth
    ●   ALWAYS On
        –   Very rarely do I shut my phone off
    ●   ALWAYS Around
        –   I almost always have my phone with me, can't say
            the same for my laptop.
Outline
●   Technical Convergence
    ●   REST,Cloud,3G
●   Mobile Apps Tetrahedron
    ●   With Cloud Enhancements
●   Whats in the cloud
●   Get Some “Good REST”
●   Context And the iPhone
●   An iPhone in the Cloud
●   Code Examples throughout
●   Summary
Technical Convergence
●   What happened In the last few Years
    Opened up a new software archetype.
     1. The advent of continuous connectivity
     using 3G and WiFi
     2. The advent of easily invoked and
     consumed RESTful web-services
     3. the ability to leverage off-device
     processing, storage, and security through
     cloud computing.
●   this convergent set of technologies
    becomes a novel, powerful archetype
    for mobile architectures.
Combining ReST and Context for Killer iPhone Apps
Protect User-Info
                         ●   RESTful web-
                             services over SSL
                         ●   No Clear Text
                             Passwords
●   Security is the      ●   OpenID in the
    base of the              Cloud as Best
    Tetrahedron              Practice
●   Security touches     ●   Limit On-Device
    all other aspects.       User Data
●   Variable in a number of ways
    ●   Connected?
    ●   Speed?
●   Program Defensively for the
    Network(especially for REST)
    ●   Check Connectivity & Speed.
    ●   Have a Local Option.
    ●   Make sure to Balance
        –   Request Frequency/Payload
            Size.
●   Cloud Options for
                                     Processing
                                     ●   Custom(your own),
                                         i.e. intelligent mobile
                                         game engine scenario
                                         stack.
                                     ●   Amazon EC2
●   Processing is                    ●   Amazon Elastic
    Constrained                          MapReduce intensive
                                         processes.
●   Perfect for Cloud                ●   Others...
    ●   Off-host analytical or
        intensive tasks
●   Consider:Memory or Storage?
●   Memory is an on-device issue
●   Storage can be augmented
    with cloud
    ●   Database: Amazon SimpleDB,
        Google Database, Apple Mobile
        Me, …
    ●   Content: Amazon S3, Amazon
        Cloudfront, Mobile Me, …
    ●   Synchronization: Amazon SQS,
        Asynchronous Process then
        Push technologies.
Combining ReST and Context for Killer iPhone Apps
Get Some “Good REST”
●   What is “Good REST”?
    ●   balance Request Frequency and Payload
●   Request Frequency
    ●   Make requests infrequently
        –   Extends battery life
        –   Minimizes network exposure
●   Payload
    ●   Large requests are hard to process
        –   Memory is only so large
        –   Processing takes time and battery
Rest Simple to Complex
●   Google Apps for the most part have
    simple REST APIs
    ●   No Authentication or Simple Authentication
    ●   Apple is providing wrappers for exposed
        services such as geocaching.
    ●   Simple REST Services are GREAT look at this
        invocation for Geocoding.
Simpler and Simpler
●   Apple has started wrapping Google APIs
    for geocoding with MKReverseGeocoder.
     - Switching to XCode...
On the Other Side we have
       Amazon Web-Services
●   Has a complex authentication scheme.
●   Request dependent
●   Involves hashing(HMAC-SHA1) and
    encoding headers, then adding
    additional headers to the request.
Creating the Authorization
               Token
 ●   Sign up for S3, you will get a public and
     private key.
 ●   Create a string from the following
     headers, then create and encode hash:
StringToSign = HTTP-VERB + "n" +

Content-MD5 + "n" +

Content-Type + "n" +

Expires + "n" +

CanonicalizedAmzHeaders +

CanonicalizedResource; // /bucket/resource
Processing the Response
●   REST is nice because each response is
    discrete(unlike streaming socket as in
    XMPP)
●   NSXMLParser is lightweight
    ●   Can initialize with the data from a request,
        or with the request directly.(note S3ListBucketsResponse
        extends NSXMLParser)
Managing State
●   didStartElement
    ●   Set fags if you want to gather data
    ●   Grab any attributes from the
        attributeDictionary
●   didEndElement
    ●   Reset fags as necessary
●   foundCharacters
    ●   Grab any enclosed text as necessary
Example from Geocoding
Context and the iPhone
●   Iphone has three sensors that can be
    used for context:
    ●   GPS/Core Location
    ●   Accelerometer
    ●   Proximity Sensor
●   A Context-Aware Application will use
    those sensors to minimize user input.
●   Additional context can be ascertained
    from your present activity.
●   Upcoming, audio and visual contexts are
    coming. Think augmented spatial reality.
The future of Contexts

●   We looked at this earlier in the simple
    example of MKReverseGeocode.
●   Location is low hanging fruit, that is
    why there is SO much focus on LBS.
    ●   LBS is a context aware application
●   Future contexts include activity
    analysis using bluetooth, camera, …
What We Looked At
●   Amazon S3 using rest based web-services
    to store fles(menus, photos.)
●   Location information from the iPhone.
●   REST for geocoded context(GPS<-
    >Street Address)
●   No expensive servers because of cloud
    computing.
●   This archetype can be solved for
    numerous apps.
Questions?
THANKS FOR ATTENDING
  Source code available at
       http://jasonc411.com

Weitere ähnliche Inhalte

Ähnlich wie Combining ReST and Context for Killer iPhone Apps

NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2aspyker
 
What is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokWhat is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokImre Nagi
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned Omid Vahdaty
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | EnglishOmid Vahdaty
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native PlatformSunil Govindan
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native PlatformSunil Govindan
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned Omid Vahdaty
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3 Omid Vahdaty
 
Public Cloud Workshop
Public Cloud WorkshopPublic Cloud Workshop
Public Cloud WorkshopAmer Ather
 
Aws meetup 2017-02-09-role-auto-scaling
Aws meetup 2017-02-09-role-auto-scalingAws meetup 2017-02-09-role-auto-scaling
Aws meetup 2017-02-09-role-auto-scalingYeung Siu
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthNicolas Brousse
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Guglielmo Iozzia
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointChristopher Dubois
 
Preparing your web services for Android and your Android app for web services...
Preparing your web services for Android and your Android app for web services...Preparing your web services for Android and your Android app for web services...
Preparing your web services for Android and your Android app for web services...Droidcon Eastern Europe
 
Deep Learning at the Edge
Deep Learning at the EdgeDeep Learning at the Edge
Deep Learning at the EdgeJulien SIMON
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Ruslan Meshenberg
 
Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!pflueras
 
Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3Damien Contreras
 

Ähnlich wie Combining ReST and Context for Killer iPhone Apps (20)

NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
What is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokWhat is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 Depok
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
 
Big Data on Cloud Native Platform
Big Data on Cloud Native PlatformBig Data on Cloud Native Platform
Big Data on Cloud Native Platform
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
 
Public Cloud Workshop
Public Cloud WorkshopPublic Cloud Workshop
Public Cloud Workshop
 
Aws meetup 2017-02-09-role-auto-scaling
Aws meetup 2017-02-09-role-auto-scalingAws meetup 2017-02-09-role-auto-scaling
Aws meetup 2017-02-09-role-auto-scaling
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
GCP overview
GCP overviewGCP overview
GCP overview
 
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
Building a data pipeline to ingest data into Hadoop in minutes using Streamse...
 
Summer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpointSummer 2017 undergraduate research powerpoint
Summer 2017 undergraduate research powerpoint
 
Preparing your web services for Android and your Android app for web services...
Preparing your web services for Android and your Android app for web services...Preparing your web services for Android and your Android app for web services...
Preparing your web services for Android and your Android app for web services...
 
Deep Learning at the Edge
Deep Learning at the EdgeDeep Learning at the Edge
Deep Learning at the Edge
 
Netflix oss season 1 episode 3
Netflix oss season 1 episode 3 Netflix oss season 1 episode 3
Netflix oss season 1 episode 3
 
Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!Migrate to Microservices Judiciously!
Migrate to Microservices Judiciously!
 
Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3
 

Kürzlich hochgeladen

Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 

Kürzlich hochgeladen (20)

Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 

Combining ReST and Context for Killer iPhone Apps

  • 1. Combining REST and Context for Killer iPhone Apps Iphone Developer Summit 22.June.2009 Jason Hayes Christensen jasonc411.com
  • 2. Intro ● Mobile Applications Entered a New Frontier ● New Platforms like the iPhone are: ● ALWAYS Connected – 3G, WiFi, Bluetooth ● ALWAYS On – Very rarely do I shut my phone off ● ALWAYS Around – I almost always have my phone with me, can't say the same for my laptop.
  • 3. Outline ● Technical Convergence ● REST,Cloud,3G ● Mobile Apps Tetrahedron ● With Cloud Enhancements ● Whats in the cloud ● Get Some “Good REST” ● Context And the iPhone ● An iPhone in the Cloud ● Code Examples throughout ● Summary
  • 4. Technical Convergence ● What happened In the last few Years Opened up a new software archetype. 1. The advent of continuous connectivity using 3G and WiFi 2. The advent of easily invoked and consumed RESTful web-services 3. the ability to leverage off-device processing, storage, and security through cloud computing. ● this convergent set of technologies becomes a novel, powerful archetype for mobile architectures.
  • 6. Protect User-Info ● RESTful web- services over SSL ● No Clear Text Passwords ● Security is the ● OpenID in the base of the Cloud as Best Tetrahedron Practice ● Security touches ● Limit On-Device all other aspects. User Data
  • 7. Variable in a number of ways ● Connected? ● Speed? ● Program Defensively for the Network(especially for REST) ● Check Connectivity & Speed. ● Have a Local Option. ● Make sure to Balance – Request Frequency/Payload Size.
  • 8. Cloud Options for Processing ● Custom(your own), i.e. intelligent mobile game engine scenario stack. ● Amazon EC2 ● Processing is ● Amazon Elastic Constrained MapReduce intensive processes. ● Perfect for Cloud ● Others... ● Off-host analytical or intensive tasks
  • 9. Consider:Memory or Storage? ● Memory is an on-device issue ● Storage can be augmented with cloud ● Database: Amazon SimpleDB, Google Database, Apple Mobile Me, … ● Content: Amazon S3, Amazon Cloudfront, Mobile Me, … ● Synchronization: Amazon SQS, Asynchronous Process then Push technologies.
  • 11. Get Some “Good REST” ● What is “Good REST”? ● balance Request Frequency and Payload ● Request Frequency ● Make requests infrequently – Extends battery life – Minimizes network exposure ● Payload ● Large requests are hard to process – Memory is only so large – Processing takes time and battery
  • 12. Rest Simple to Complex ● Google Apps for the most part have simple REST APIs ● No Authentication or Simple Authentication ● Apple is providing wrappers for exposed services such as geocaching. ● Simple REST Services are GREAT look at this invocation for Geocoding.
  • 13. Simpler and Simpler ● Apple has started wrapping Google APIs for geocoding with MKReverseGeocoder. - Switching to XCode...
  • 14. On the Other Side we have Amazon Web-Services ● Has a complex authentication scheme. ● Request dependent ● Involves hashing(HMAC-SHA1) and encoding headers, then adding additional headers to the request.
  • 15. Creating the Authorization Token ● Sign up for S3, you will get a public and private key. ● Create a string from the following headers, then create and encode hash: StringToSign = HTTP-VERB + "n" + Content-MD5 + "n" + Content-Type + "n" + Expires + "n" + CanonicalizedAmzHeaders + CanonicalizedResource; // /bucket/resource
  • 16. Processing the Response ● REST is nice because each response is discrete(unlike streaming socket as in XMPP) ● NSXMLParser is lightweight ● Can initialize with the data from a request, or with the request directly.(note S3ListBucketsResponse extends NSXMLParser)
  • 17. Managing State ● didStartElement ● Set fags if you want to gather data ● Grab any attributes from the attributeDictionary ● didEndElement ● Reset fags as necessary ● foundCharacters ● Grab any enclosed text as necessary
  • 19. Context and the iPhone ● Iphone has three sensors that can be used for context: ● GPS/Core Location ● Accelerometer ● Proximity Sensor ● A Context-Aware Application will use those sensors to minimize user input. ● Additional context can be ascertained from your present activity. ● Upcoming, audio and visual contexts are coming. Think augmented spatial reality.
  • 20. The future of Contexts ● We looked at this earlier in the simple example of MKReverseGeocode. ● Location is low hanging fruit, that is why there is SO much focus on LBS. ● LBS is a context aware application ● Future contexts include activity analysis using bluetooth, camera, …
  • 21. What We Looked At ● Amazon S3 using rest based web-services to store fles(menus, photos.) ● Location information from the iPhone. ● REST for geocoded context(GPS<- >Street Address) ● No expensive servers because of cloud computing. ● This archetype can be solved for numerous apps.
  • 22. Questions? THANKS FOR ATTENDING Source code available at http://jasonc411.com