power your mobile applications on the cloud [indicthreads mobile application development conference]
DESCRIPTION
Session Presented at 1st IndicThreads.com Conference On Mobile Application Development held on 19-20 November 2010 in Pune, India WEB: http://M10.IndicThreads.com ------------ Speaker: Romin Irani Abstract: Mobile applications typically present the client side of a hosted application be it an enterprise app or a web application. This session aims to bridge and cover how you can power your mobile applications from the Cloud. The presentation will demonstrate how you can power both a native mobile application (Android) and a mobile web application (HTML based) from the Cloud via REST based HTTP Services. The session will look at: a) Advantages of using the cloud for mobile apps, with Google App Engine as an example. We shall build and deploy a simple Google App Engine application in the Cloud live. b) Develop a simple Android Native Application that is powered by the services developed in (a). Demonstrate the same for a Mobile Web Application c) Cover WURFL and how the device database can help you serve different content based on the capabilities of the mobile device that accesses your application.TRANSCRIPT
![Page 1: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/1.jpg)
1
Power Your Mobile
Applications via the Cloud
Romin IraniXoriant
![Page 2: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/2.jpg)
2
Agenda
Cloud Computing Google App Engine Writing Mobile Applications –
Powered by the Cloud
![Page 3: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/3.jpg)
3
What is Cloud Computing?
• An application that you can use• A computer that you can use• A network peripheral that you can
use• Storage
• Applications like Gmail, SalesForce, etc
![Page 4: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/4.jpg)
4
What is the ‘Computing’ part?
Servers
Networks
Applications
Storage
Services
![Page 5: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/5.jpg)
5
Define Cloud Computing?
• Cloud computing is a pay-per-use model for enabling available, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.
![Page 6: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/6.jpg)
6
5-4-3 Formula
Cloud Computing comprises of
• 5 key characteristics– On Demand Self Service, Ubiquitous Network Access,
Location Independent Resource Pooling, Elasticity & Pay Per Use
• 3 delivery models– SaaS, PaaS, IaaS
• 4 deployment models– Public, Private, Hybrid & Community
![Page 7: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/7.jpg)
7
Another view!
![Page 8: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/8.jpg)
8
IaaS, PaaS and SaaS - Summary
IaaS PaaS SaaSI will give you a virtual machine
in the cloud which you can
provision any time you want
I will give you a software platform which you can use to build and deploy application in the cloud
I will provide you with ready to use applications
You pay for what you use You pay based on usage You just need to log in and use
You can scale it up or down whenever you wish
You do not need to pay for any additional software
You not need to buy anything
You continue to use the same set of software
You have no administrative hassles
You pay only for what you use
![Page 9: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/9.jpg)
9
Who are the providers?
• Amazon [IaaS]
• SalesForce [SaaS, PaaS]
• Google [SaaS, PaaS]
• Microsoft [SaaS, PaaS]
• Zoho [SaaS]
• And many more …
![Page 10: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/10.jpg)
10
Amazon – Web Services (IaaS)• Elastic Compute Cloud (EC2)– Rent computing resources by the hour– Basic unit of accounting = instance-hour– Additional costs for bandwidth
• Simple Storage Service (S3)– Persistent storage– Charge by the GB/month– Additional costs for bandwidth
• Several Other services : Virtual Private Cloud, etc
![Page 11: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/11.jpg)
11
For the Developer - PaaS
• Java (Google App Engine)
• .NET (Azure)
• Python (Google App Engine)
• PHP (Rackspace)
• Ruby (Heroku)
• Other Platforms (Force.com, etc)
![Page 12: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/12.jpg)
12
Advantages• Increase the speed at which application
can be deployed.• Organizations can respond to change
much faster.• IT Management is taken care of and you
focus on the application.• By paying only for what you use - it shifts
the burden of planning for something that you are not very sure of.
• IT is being delivered as a service via APIs.
![Page 13: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/13.jpg)
13
Disadvantages• Traditional IT methods are not going to work
• Architectural decisions are in the hands of the developers
• Programming models/APIs need to be learnt (PaaS)
• Coding needs to be done so as to get maximum value for what you are paying
• Cloud Interoperability is suspect at this point in time
• Cloud standards/tools are still evolving
• Still need to separate out the hype from the substance
![Page 14: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/14.jpg)
14
PaaS Walkthrough
• Google App Engine
![Page 15: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/15.jpg)
15
Google App Engine
• It is a PaaS, been around for 2.5 years
• It provides a software stack to develop web applications
• Python and Java
• Downloadable SDK & Tools
– Eclipse Plugin, Local Server, Local Dashboard
• Specialized Services
• Scalable, Generous Free Quota … more.
![Page 16: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/16.jpg)
16
Google App Engine - Services
![Page 17: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/17.jpg)
17
App Engine Architecture
17
Python / JavaVM
process
stdlib
app
memcachedatastore
urlfetch
Services R/O FSreq/resp
Images
XMPP
Cron Jobs
Task Queue
Blob Store
User Service
![Page 18: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/18.jpg)
18
Advantages• Development without worrying about the
deployment infrastructure• Single development environment – end to end
[Eclipse based tools]• Instant deployment, cloud scalability [Eclipse based
tools]• Excellent Monitoring Tools• Billing : Pay as you use. Generous free quotas that
get you started immediately• In short: An affordable, efficient and scalable
environment for your web applications.
![Page 19: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/19.jpg)
19
Google App Engine - Quotas
• ~5M pageviews/month
• 6.5 CPU hrs/day
• 1 GB storage
• 650K URL Fetch calls/day
• 2,000 recipients emailed
• 1 GB/day bandwidth
• 100,000 tasks enqueued
• 650K XMPP messages/day
![Page 20: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/20.jpg)
20
How to use Google App engine
• Download Java 6
• Download Eclipse and Google plug in
• Register a user account in Google
• Register an application
• Create an application (Java) and deploy the application
• Your app is ready !!
• Monitor Usage & (Modify-Test-Deploy)
![Page 21: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/21.jpg)
21
Sample Application
• Reminder Service
–Monthly Reminders
– Example : FEB – Mom/Dad Anniversary, JUN – Wife Birthday, JULY – Pay Tax .
– Simple REST like API to fetch details
![Page 22: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/22.jpg)
22
Lets get started!!
Download Java 6
Download Eclipse and Google plug in
Register a user account in Google
Register an application
Create an application (Java) and deploy the application
Your app is ready !!
Monitor Usage & (Modify-Test-Deploy)
![Page 23: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/23.jpg)
23
Mobile Applications - Development• Various Mobile OS
• Plenty of Tools / IDEs
• Possible to write many more apps – all served by a Service Layer powered by the Cloud
• Native or Web Mobile Applications
![Page 24: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/24.jpg)
24
Mobile Applications
![Page 25: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/25.jpg)
25
Web Mobile Applications
![Page 26: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/26.jpg)
26
• On the Server side, a 2-step procedure is used to deliver the content.
– Identify the Device Capabilities and thereby its group• Use of WURFL Device Database
– Server side adaption to deliver the content accordingly
Thin Client Architecture – Key Points
![Page 27: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/27.jpg)
27
WURFL
• http://wurfl.sourceforge.net, spearheaded by Luca Passani
• WURFL = Wireless Universal Resource File
• XML Configuration File
• Information about capabilities and features of many mobile devices
![Page 28: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/28.jpg)
28
Native Mobile Development – (Thick Client)
![Page 29: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/29.jpg)
29
• Build a common REST layer that will expose functionality over XML/HTTP
• The REST functionality will contain all methods required i.e. login, get account summary, report data, payment transactions
• This common REST layer will be used by all Thick Client applications and Thin Clients
• Thick client applications will use the features available on the respective handsets.
Thick Client Architecture – Key Points
![Page 30: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/30.jpg)
30
Key to bringing it all together
• Cloud Application -> Service Enablement
• Glue : HTTP, REST , JSON/XML
• One Service layer -> Multiple Mobile Applications (various platforms)
![Page 31: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/31.jpg)
31
Demos
• Cloud application and Service Layer
• Android Native application
• Web Mobile application
• WURFL Integration for Device detection
– http://wurfl.sourceforge.net/help_doc.php
![Page 32: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/32.jpg)
32
References
Google App Engine: http://appengine.google.com/
Google App Engine Experimentshttp://gaejexperiments.wordpress.com
WURFLhttp://wurfl.sourceforge.net/
![Page 33: Power Your Mobile Applications On The Cloud [IndicThreads Mobile Application Development Conference]](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5586da47d8b42a5c718b460f/html5/thumbnails/33.jpg)
33
Thank You
Q & A
romin.k.irani@
gmail.com
iRomin