Synergy of cloud platforms with mobile applications

tastelessbeachInternet and Web Development

Nov 12, 2013 (3 years and 9 months ago)

182 views

M
ASARYK
U
NIVERSITY

F
ACULTY OF
I
NFORMATICS


Synergy of cloud platforms

with mobile applications

M
ASTER

T
HESIS

Martin
Čech

Fall 2012

Brno, Czech Republic

i



Declaration

Hereby I
declare

that this paper is my original authorial work, which I have
worked out by my own. All sources, references and literature used or
excerpted during elaboration of this work are properly cited and listed in
complete reference to the due source.

Martin Čech



Thesis supervisor
:
RNDr. Jaroslav Škrabálek

ii



Acknowledgement

I wish to thank

to
everybody who helped me with this
project
.



My
special
gratitude belongs to
RNDr. Jaroslav Škrabálek

for
supervising my
work, to my sister
Gabriela

for her patience
,

to
Eliška
,
Ondřej
,
Jana
,
Milan

and
the rest of my great family for providing a wonderful study background,

and
to
Monika

for all the
fish
.


iii



Keywords

Cloud

computing
,
platform as a service, PaaS,

infrastructure as a service, IaaS,
mobile

platform
, Android,
Amazon Web Services, Google App Engine
,
representational state transfer
, REST, pillory



iv



Abstract

One billion people own a smartphone that can run software with
enormous variety of
features
.

Even more people use desktops and laptops
getting similar advanta
ges.

Grasping
the art of
scaling the technology for an
unapprehended

number of users has been a wish of many software architects
since the mass adoption of computational devices

merely two dozen
years
ago
.

This thesis
targets

the
potentially strong

synergy
in
between
the
mobile
te
chnologies and cloud platforms. It

presents

im
plementation
s of
cloud
applications
created
for
two major cloud

platforms



both being
described,
evaluated
, and tested

in this the
sis. One
application
is engineered for the
Ama
zon Web Services (AWS) platform, the second for the Google App
Engine (GAE) environment.
A

client application
for the Android OS
that uses
the API of the aforementioned services

has also been created

and

is

presented.

The strong s
ynergy of these applicatio
ns is aimed to provide a service
to the public in the market with consumer information

via

the project Pillory
.

v



Acronyms



API


Application Programming Interface



SDK


Software Development Kit



PaaS


Platform as a Service



IaaS


Infrastructure as a Service



SaaS


Software as a Service



JSON



JavaScript Object Notation



XML



Extensible Markup Language



AWS


Amazon Web Services

o

EC2


Elastic
Compute
Cloud

o

EB
L



Elastic Beanstalk

o

S3


Simple Storage Service



GAE


Google App Engine



iOS


iPhone
Operating System



SLA


Service Level Agreement



REST


Representational S
tate
T
ransfer



SOAP


Simple Object Access Protocol



Azure


Microsoft Azure Platform



JRE


Java Runtime Environment



vi



Table of Contents

Chapter
One

Introduction

................................
................................
...................

1

1.1

Background and Motivation

................................
................................
.......

1

1.2

Goal of the Thesis

................................
................................
.........................

2

1.3

Th
esis Structure

................................
................................
............................

2

Chapter Two

State of the Art
................................
................................
...............

4

2.1

Definition of Terms

................................
................................
......................

4

2.2

Cloud Computing

................................
................................
........................

4

2.2.1

Cloud Computing Forecast

................................
................................
.

7

2.3

Mobile Platforms Trend

................................
................................
..............

8

2.3.1

Smartphone Spread

................................
................................
..............

8

2.3.2

Leading Mobile Platforms

................................
................................
...

9

Chapter Three

Context

................................
................................
..........................

11

3.1

Available Enterprise Cloud Platforms

................................
....................

11

3.1.1

Amazon Web Services

................................
................................
........

11

3.1.2

Google App Engine

................................
................................
............

13

3.1.3

Microsoft Azure

................................
................................
..................

14

3.1.4

Other Cloud Computing Platforms

................................
..................

15

Chapter Four

On
-
premise and Cloud Comparison

................................
.......

16

4.1

Reliability

................................
................................
................................
.....

16

4.2

Other Main Characteristics Comparison

................................
................

17

4.3

Economy of Moving to the Cloud

................................
............................

18

4.4

Developing Mobile Cloud

................................
................................
.........

19

Chapter Five

Implementation

................................
................................
...........

20

5.1

Area of Focus and Intention of this Software

................................
.........

20

5.2

Architecture and Technologies

................................
................................
.

21

5.2.1

Web Service Specification

................................
................................
..

21

vii



5.2.2

Non
-
relational databases

................................
................................
...

23

5.3

Amazon Elastic Beanstalk Implementation

................................
............

23

5.3.1

Autoscaling

................................
................................
..........................

24

5.3.2

Load Balancing

................................
................................
....................

25

5.3.3

Task Scheduling

................................
................................
..................

26

5.4

Google App Engine Implementation

................................
......................

26

5.5

Mobile Client Implementation

................................
................................
.

27

5.5.1

Design

................................
................................
................................
...

28

5.5.2

Backend Platform Failover

................................
................................

29

5.6

Functional Testing

................................
................................
......................

30

5.7

Performance Testing

................................
................................
..................

31

5.7.
1

AWS Results

................................
................................
........................

31

5.7.2

GAE Results

................................
................................
.........................

32

5.8

Results and Benefits

................................
................................
...................

34

5.9

Source Codes Release
................................
................................
.................

34

Chap
ter Six

Conclusion

................................
................................
.......................

35

List of Tables

................................
................................
................................
..........

36

List of Figures

................................
................................
................................
........

37

Bibliography

................................
................................
................................
..........

38

Appendix A

................................
................................
................................
............

40

Appendix B

................................
................................
................................
............

41



1



Chapter One


Introduction

Cloud computing and mobile devices are changing the world.


During my research for this thesis I have learned that most people in
the IT industry recognize cloud computing as very important phenomenon
and see big potential in it.
The idea why do they believe in it might be one of
the reasons why this work was creat
ed.

The
broad
influence of
this

technology can
even

be

observed

in the life
of many
citizens

of

the developed countries.
The phrase "in the cloud"
entered
the colloquial language and is used both

among IT professionals and
even
outside of its native envir
onment

of computer science
. We hear every day that
a service or
smartphone

app or some
piece of
software stores data in the
cloud
. We

recognize

the
spread

of this phenomenon
from various
sources

including common software tools or the

mainstream media.

1.1

Background and Motivation

The environment of the information technologies has been always
evolving very fast but its goal is the same since it begun


to optimize existing
work and in spare time find a new purpose or push the boundaries of the
known.

H
ardware limitations are something that only the best developers
consider properly and thoroughly while creating a piece of software.
Databases are more and more complex
-

every
year

we create so much
additional information
that the whole mankind produced u
ntil 1980


so

it is
increasingly difficult to keep up with storing it. Relational approach to
database design often seems to be insufficient and lately on the decline being
replaced by non
-
relational paradigm. Outsourcing hardware management in
a form of
buying Infrastructure as a Service (IaaS) is starting
to be new
“conservative choice”
. Moreover, deploying applications without taking care
of any of the potent
ial hardware bottlenecks is not science fiction

but reality
for many of the
cloud computing

ado
pters.

2



The word “cloud” refers to the intangible nature of the service model

and stands mainly for the abstraction of the physical resources
.

Cloud
computing consists of related concepts that people recognized long before
the
cloud phenomenon
1

started

and
i
t seems like a perfect synergy to connect the
power and scalability advantages of cloud computing with the rise of the
demand for web services. With the spread of the smartphones, tablets and
other portable
devices
, which

larger and larger
number
s of peop
le carry

around and

which

are designed to consume web services we could get an
advantage of the ability to abandon the low
-
level hardware matters and focus
on the development of the best services.

1.2

Goal of th
e

T
hesis

In this work, I would like to present
and discuss some of the
possibilities, advantages
,

and drawbacks of
running applications

in the cloud
.

Mainly the implementation is focused
, but not limited to,
on
synergy with
mobile applications.

Product of this thesis is a set of applications that are t
ied
together creating a platform for sharing viable consumer data and
information.

1.3

Thesis S
tructure

This work is structured into following
six

chapters.

First chapter

introduces the problematics of the cloud platforms and
the environment
s

of the most impor
tant topics that are discussed and
elaborated in this thesis.

The s
econd part

sets the ground w
ith defining the basic elements. Also
describes
the state of the art
in
both
the cloud computing and mobile
technolog
ies
.

Third chapter

focuses on the context o
f
relevant

platforms and
technologies

like Amazon Web Services and Google App Engine
.

Chapter four

aims for

deeper analysis and comparison of

cloud
computing and on
-
premise

solutions

and
discusses mobile and cloud
platforms synergy.




1

There is notable parallel with the Asynchronous JavaScript and XML technology. See
(14)
.

3



Second to last

chapter

bestows the impleme
ntation
of the application
for two
chosen
cloud computing platforms
including testing and results.
Furthermore it presents

a client application for the Android platform
.

Last

chapter
, the conclusion, summarizes the whole work and points

out its benefits and deficits. It also discusses the next steps that could be taken
to improve the outcome.

It sets questions for further work in this topic.

4



Chapter Two


State of the Art

Current

chapter has a
following
goal


to define and describe the

current stat
e of
knowledge of
relevant
elements and
lay the cornerstone for
further in
-
depth analysis.

2.1

Definition of Terms

Following terms are of such importance that I
would like to

look at

them
closer

to avoid any
misinterpretation
.



On
-
premise System



IT system that is usually maintained and often even
developed in
-
house
2
.



Cloud Computing



This key term is further described in the Cloud
Computing
subchapter
.



Scalability



The ability to
handle growing (or decreasing)

demand

for
resources efficiently
. In this work it is usually used in the context of IT
resources

like HW and network bandwidth
.



Web Service



Application functionality
that is
exposed to
the
clients
outside of the system

usually via the Internet
.



Web Service Client/Consumer



Usually an

application (e.g. web
browser, thin client
, mobile application
) using standardized format for
information exchange.
Most popular notations used for communication
purposes are JavaScript Object Notation (JSON) and Extensible Markup
Language (XML).



Platform



A set of underlying hardware and

software providing
complete environment for the application.

2.2

Cloud Computing

The term itself was coined in 2006 by Eric Schmidt of Google.
(1)

Cloud
computing can be perceived as a delivery

model that conveys unprecedented



2

i.e. using a company's own funds, staff, or resources

5



computing resources to people and organizations across the globe on
demand. It encompasses many disciplines of distributed computing including
cluster computing and utility computing.
3


Complex and widely used definition o
f cloud computing was created
by the National Institute of Standards and Technology (NIST) of
the U.S.
Department of Commerce.




Figure
1
: The NIST cloud computi
ng
components
. Figure reprinted from
(2)
.

According to NIST

(3)

there are three basic
service model
s that
cloud
computing solutions are
composed of

(see
Figure
1
)
. These are

“infrastructure
as a service”

(IaaS)
, “platform as a service”

(PaaS) and

“software as a service”

(SaaS)
.




3

Adapted from

(13)

NIST Definition

of Cloud Computing
:

Cloud computing is a model for enabling ubiquitous, convenient,
on
-
demand network access
to a shared pool of configurable
computing resources that can be rapidly provisioned and
released with minimal management effort or service provider
interaction.

(3)


6



IaaS

provides virtualized environments and hardware assets as
resources th
at clients can provision. However the client has to take care of the
operating systems and applications. In exchange it allows the
best

control
over the cloud service as depicted in
Figure
2
.


Amazon Web Services (AWS) are globally dominant

IaaS

provider
with their Elastic Compute Cloud (EC2).

PaaS

providers take care of the whole deployment process on the
cloud infrastructure including the
virtual machines, operation
systems, and
control structures. The client is responsible for managing the application
itself.


AWS, Google App Engine (GAE), and Microsoft Azure are the largest
powers in the PaaS market
.

SaaS

is a complete environment with applications and user interface
and the client only manages the data that he uses the application with.
Everything from the application down to the infrastructure is the vendor’s
responsibility.

(2)

In this case the client has the least control over the
application and the environment.

Notable characteristics of this model are
popular pay
-
as
-
you
-
go pricing and never
-
stopping evolution of the products
partly inspired by the
pioneer
examples of Goog
le’s Maps, Gmail or
Salesforce
4

implementations.

Another possible

breakdown of the problematics according to NIST
is
based on the deployment model. Cloud computing can be provisioned for a
single organization (private cloud), for certain community (communi
ty cloud)
or for everybody (public cloud). Also hybrids of these approaches are possible
which enable

portability of the solution.

The last mentioned
breakdown

defines five

essential characteristics
including

rapid
elasticity
5

and
wide accessibility of the

service. For further
description I recommend the
very well

described
original
by

NIST

(3)
.




4

Company best known for its cloud Customer Relationship Management software.
http://www.salesforce.com
.

5

Rapid scaling of
capabili
ties available for provisioning;
often appear
s

to be unlimited and
can be appropriated in any quantity at any time
.

(3)

7




Figure
2
: Laye
rs of basic service models in
cloud computing.

The higher the abstraction the better the
cost
-
efficiency but for the cost of losing certain control over the system.

Figure reprinted from
(4)
.

2.2.1

Cloud Computing
Forecast

The technology of cloud computing is being widely discussed in terms
of its efficiency,
reliability

and security.
Also f
ollowing

should be considered


the status of the cloud computing in the technology hype cycle
6
. According
to Gartner

(5)

the hype of
some parts of cloud computing (e.g. SaaS and IaaS)
are on their way to reach the plateau of productivity in a few years.

On the
other hand PaaS or Cloud
-
based
Business Process
Modeling

(BPM)

is

considered

to be in the peak of its expectations meaning that the actual
productivity of such systems
is

couple of years away.




6

Further information about the hype cycle methodology can be found via http://
www.gartner.com/
technology/
research/
methodologies/
hype
-
cycle.jsp

8




Figure
3

depicts

h
ype
c
ycle for
the c
loud
c
omputing

segments

favoring SaaS and IaaS platforms.
Figure
reprinted from
(5)
.

2.3

Mobile Platforms

Trend

Following subchapter presents the trends in mobile platforms and
discusses expected progress.

2.3.1

Smartphone
S
pread

According to
the
2012
comScore
7

report
(6)

the
saturation

of
smartphones in the major markets are
beginning to surpass

50% of total
mobile audience

a
s
we see

in
Figure
4
.

Based on this trend it is safe to
approximate that by now (December 2012) the smartphone spread is even
wider and total number of working devices in EU5
8

is more than 100 million
devices.

Sa
turation of 80%

is expected to be hit by the year 2015.

(7)





7

An

internet analytics company based in the US with worldwide reputation.

8

UK, Spain, Italy, France, Germany

9




Figure
4

illustrates a

trend and

share of smartphones in chosen
countries. Figure

reprinted from
(6)
.

2.3.2

Leading Mobile Platforms


Mobile platforms market has been very dynamic for the last few years
shifting from Apple’s
former
domination towards more
competitive

environment. One of the m
ost important qualities of any mobile platform is
the attention of
the application
developers resulting in massive numbers of
applications available for the
platform. A
t the present time

b
oth Android and iOS
respectable software
distribution markets have
about

700

000 applications available

(8)

leaving the rest of the
competitors behind

as described
in

Table
1
.

As shown in
Figure
5

the
market
share of the mobile platforms

in the
last year

is shifting rapidly in favor of the Google Android open source
operating system. Emerging tentative numbers from 2012 are also confirming
this trend of
former smartphone lea
der
Symbian
9

losing its position to the
Apple’s iOS and aforementioned Android.




9

Former open source smartphone OS; now closed source and
proprietary
for Nokia use only.

Mobile Platform

No. of apps

iOS


App Store

700 000

Android


Play Store

700 000

Windows Phone

125 000

Nokia


Ovi Store

110 000

Blackberry


App World

100 000

Table
1

presenting how many applications were
available for main mobile platforms by the end of 2012.


10




Figure
5

depicts s
martphone market share shift in EU5

between December 2010 and 2011
.
Figure
r
eprinted from
(6)
.

In

another major market,
the US
,
the
situation is fairly similar but instead of
Symbian losing its position it is the Blackberry
OS

who is
unsuccessful even to maintain its
former share as can be seen in
Figure
6
.

I
n a moment

the last to announce an
entrance to the mobile
OS platforms
was
Canonical Ltd. with its Ubuntu for phones.
(9)

G
iven these points

the mobile
platforms market seems economically very
promising
as

the competition toughens over
time

resulting in more and

more users
owning device permanently connected to the
Internet.
An important characteristic of
majority of these users is that they

want to
consume web services.



Figure
6

showing the dynamics of the
smartphone market in the US. Figure
reprinted from
(19)
.

11



Chapter Three


Context

Following chapter
aims to present current level of development in the
field
s

of

re
levant

cloud computing

and mobile
platforms
.

3.1

Available Enterprise Cloud Platforms

One of the first big efforts to offer cloud services

globally

was started
by Amazon
in 2006
and soon was followed by other leading tech
nology

companies like Google and Microsoft.
In the last year
other

global high
-
tech
compan
ies

announced its entrance to the cloud computing provider market
inc
luding Oracle and

HP
. Every platform tries to offer something different as
we will see in the next chap
ters.


3.1.1

Amazon Web Services

As the largest online retailer
10

Amazon has been trying to be prepared
for the increase in traffic during the peaks of
customer
’s demand. Inevitably
this resulted in
indispensable
portion of Amazon’s resources
being

underutilized
during phases with lower customer demand.

They tried to solve this by implementing an idea of
capitalizing

on the
free resources by renting them out to others on the pa
y
-
as
-
you
-
go
11

principle

and it is now for them fairly successful business model expecting revenue of
$1.5 billion in 2012.

(10)

Amazon Web Services (AWS) consists of

huge variety of cloud
-
computing services with the possibilities to connect them together
and
orchestrate the resulting set of services on demand.

Amazon maintains very active community with focus on developers
and tries to make application migration to c
loud trivial. It offers various



10

In 2011 Amazon had revenue of
US$ 48.07

billion.
(16)

11

A payment model in which customer pays only for what is actually used without the
commitment to use anything.

12



software development kits
12

(SDKs) for many programming languages as well
as Android and iOS development bundles. Dozens of major companies are
using AWS and reporting crucial savings in the costs for infrastructure.
13

3.1.1.1

Elastic

Beanstalk

To us the most important
services
are Elastic Beanstalk (EB
L
)

and
Elastic Compute Cloud (EC2). EC2 is
an example

of the IaaS distribution
model and
technically
lies underneath the EB
L

environment.

It is

basically a
virtual machine that is pre
-
co
nfigured and run
s on the Amazon
infrastructure.
These machines are called
Amazon Machine Images

(AMI) and
besides using pre
-
configured AMIs you can prepare and run your own.

However EB
L


which is built on top of the AMI



provides true
platform as a servi
ce

and allows one
-
click deployment of the application.

Elastic Beanstalk
allows the
convenient

level of approach by simply
deploying your application package
14

onto it
. All the
pre
-
configuration and
settings are done automatically (with you in control of mo
st of the
modifications

and alterations
) and the application is deployed onto
chosen
server
almost seamlessly.

Deployment itself is orchestrated using Git
15

revision control system
with the repository being stored on S3

whi
ch is transparent to the user. It

a
lso
allows incremental deployment effectively enabling convenient rollback to
previous versions of the application


unless they are manually removed from
the S3 storage.

3.1.1.2

Pricing

In addition to the pay
-
as
-
you
-
go model i
n the first year of usage you
are e
ligible for a free tier of services
.

This

allows you to run small
-
sized
application without incurring more than negligible costs
16
.




12

A s
et of tools for certain programming language enabling efficient work with remote
services. Usually

provided by the developers of the respective services.

13

E.g.
Lamborghini
, NASA, 37Signals, Imdb, Netflix, and Washington Post


case studies
provided.
(17)

14

Ina case of Java application this would be a
.war file.

15

Distributed source code management system designed by Linus Torvalds.

16

Allows to run one micro instance of EC2 machine.
(18)

13



During the 6 years of AWS history the prices for crucial resource
consumption significantly dropped as depicted in
Table
2
. This trend resulted
in costs for incoming network bandwidth being completely removed and the
outward bandwidth cost dropping up to 25% of the original for the largest

applications.

Also

any

traffic in between different Amazon cloud services (
e.g.
EBL instance loading data from S3
)

is free

of charge
.


Storage

Cost of Data Stored per GB
-
Month

Date

< 50 TB

> 50
-
500TB

500
-
1000TB

1000
-
5000TB

> 5000TB


3/13/06

$0.15

$0.15

$0.15

$0.15

$0.15


10/9/08

$0.15

$0.13

$0.12

$0.12

$0.12


11/29/12

$0.080

$0.070

$0.065

$0.060

$0.055


% Original Price

53%

46%

43%

40%

37%


Network

Networking Cost per GB of Wide
-
Area Networking Traffic

Date

In

Out: < 10 TB

Out: 10
-
50 TB

Out: 50
-
150
TB

Out: >150 TB


3/13/06

$0.20

$0.20

$0.20

$0.20

$0.20


10/31/07

$0.10

$0.18

$0.16

$0.13

$0.13


5/1/08

$0.10

$0.17

$0.13

$0.11

$0.10


11/29/12

FREE

$0.12

$0.09

$0.07

$0.05


% Original Price

N/A

60%

45%

35%

25%


Table
2

shows changes in prices for AWS storage and networking over 6 years.

3.1.2

Google App Engine

Official references for

Google App Engine (GAE) usage and case
studies
can be found but
are sporadic
17
.

The platform is available for applications written in Java,
Python, or

Go
18

programming languages

but u
nlike
ELB

it

comes with

some
conditions

for developers regarding the
Java Runtime Environment (JRE)

availability
.
Some of the

core Java
classes

are
restricted

which makes developing for GAE
more difficult.
19


On the

other hand, the deployment
and configuration
is
convenient,
the underlying HW is almost com
pletely transparent to the user
, and instance
replication and scaling require minimal attention
.




17

A couple is available at
https://cloud.google.com/customers/
.

18

Modern programming language designed by Google.

19

The whitelist of allowed Java JRE classes is available at
https://

developers.google.com/
appengine/
docs/
java/jrewhitelist
.

14



Downside of this level of abstraction is loss of the scaling contro
l


you
cannot define when the scaling should stop


and therefore the only control
that you have left is that of the billing management. Once exceeding the free
quota you can
set a single budget for resource usage

and GAE will continue
to serve your appli
cation until it is exhausted.

Deployment of application to GAE is as seamless as to AWS and
versioning management of application allows running multiple versions at
once which is convenient for testing purposes.

3.1.3

Microsoft Azure

Azure is the last from the t
hree mentioned providers to enter the
market. The set of available programming technologies that Azure can host
consist of
Java, Python,
ASP.NET, PHP, and

Node.js
20

which makes Azure the
most open platform from this perspective.

On
Microsoft’s

website, there are
dozens very interesting case
studies from

companies including NASA, Boeing
and Fujitsu that are using some of its capabilities.

Azure Compute is the name of the main service providing application
hosting where you choose one out of thr
ee types of hosting based on the
server capabilities

called “roles”:




Web role

provides Internet Information Services
and is usually used for
web
-
system applications.



Worker role

runs
backend applications.



Virtual Machine role

can custom
Windows Server
image



comparatively
to the AMI of Amazon.

Azure does not offer non
-
relational database services.
T
o point out
u
nlike
previous two providers it allows using server’s own local storage for
the application purposes


sadly this approach prevents data distri
bution
among instances.




20

JavaScript platform for server
-
side logic based on Google’s Javascript engin
e V8.

15



3.1.4

Other Cloud Computing Platforms

S
erver and software giants HP and Oracle revealed their cloud
platforms in late May/June

of 2012

with clear intention
to
establish a position

in
the cloud world
21
. Oracle is
focusing

on close integration of hundreds
enterprise applications already used worldwide. HP on the contrary is
commenting their cloud as “a place to test your application be
fore you buy
your own hardware”
. Nevertheless, these two major
technology giants
are
tryin
g to shift the momentum of the cloud computation market
giving

an idea
how significant the market is
believed

to be

in the future
.





21

Reports available at
http://www.wired.com/insights/2012/05/hp
-
gets
-
its
-
cloud
-
on/

and
http://www.networkcomputing.com/cloud
-
computing/oracle
-
cloud
-
finally
-
arrives
-
with
-
a
-
focu/
240002104

respectively

16



Chapter Four


On
-
premise

and Cloud Comparison

Chapter four analyz
es the upsides and downsides of cloud c
omputing
approach
compared to on
-
premise

systems.

4.1

Reliability

I
mportant asset
s

of the cloud service providers
are

the robustness of
the service

and the
ir

availability
. Companies often trust them with their
critical data and IT resources for crucial parts of the business workflow
where

ev
ery downtime is rather expensive.

Unlike on
-
premise

system that usually resides in the company’s

own

datacenter or rented housing provider in the same region as most of
its

users
the cloud
solution

offers small or no variety of
location
options.

Nevertheless g
eographic distribution of
datacenters

is an approach that
most of the major providers value as can be seen in
Figure
7
.

This sp
read
and
independency

of
the endpoints

enables
software
architects to choose what
location their application’s servers will use
thus
effectively reducing latency.

Note that GAE server locations are undisclosed but according to Ikai Lan of
GAE
22

all traffic is routed to the North Am
erica


where the datacenters are


resulting in greater delays when accessed from outside of the US.




22

His statement can be reached at
https://groups.google.com/
d/topic/
google
-
appengine/
67mZ3bXIqWk/
discussion
.

17




Figure
7

showing geographic distribution of AWS (yellow) and Azure (blue) datacenters
.
23

Be that as it may
, there
is non
-
trivial

outage history for

the
cloud
provider’s services
. In 2012 two significant outages of Azure were reported
24
,
three
of

the AWS
25

and
one serious of

GAE

(11)
.

4.2

Other
Main Characteristics C
omparison

Following
Table
3

displays several identified characteristics
(other than
reliability)
that differ between the approaches.



On
-
premise System

Cloud Computing

Control



best control over all
components

of the computing
environment



you lose
large portion

of the
control



technology stack
26

for the
application is provider
-
dependent

Cost



you pay for all resources
available regardless whether you
utilize them or not



usually you

only pay for what you
use



cheap start
-
up

with sophisticated
technology



minimizes the invest in hardware



reduces the need for an IT staff



moving computing from a capital
expense towards an operating
expense



reduces paperwork




23

Background provided by the Google Maps.

24

One was caused by the wrong implementation of leap years.
(20)

25

Including the Christmas Eve
outage.

(21)

26

Layers of components used to create a software solution.

18



Scalability



time
-
consuming and

resource
-
draining



whole service

scales with the size
of
the
company

Availability



availability depends on your

company
‘s

investment and
readiness



availability depends
completely
on the provider



backup strategies are expensive



Service Level Agreements
(SLA)
are usually signed for 99.95%
availability or higher

Privacy



privacy depends on the state of
art of your security and in
-
house
policies



you lose
essential

control over
your data



you have to trust the provider and
negotiate privacy agreements

Data
M
obility



you set own data standards thus
allowing mobility



cloud technologies are often
provider
-
dependent



moving application to a different
provider might be tricky

Table
3

showing comparison of

main characteristics of

Cloud
Computing system and on
-
premise

system
s
.


4.3

Economy of
M
oving to the
C
loud

Outsourcing infrastructure, platform, or even whole application to the
cloud is
for

the largest part an economic question. To answer it many
variables
have to be considered. These

includ
e

hardware, network
bandwidth, and IT staff costs.

Following example is based on a bioinformatics lab working on human
genome analysis. These analyses produce large amounts of data
with which

the scientists need

to
do resource
-
heavy computations

and

find specific
matches in various datasets.
27





27

Information for the mentioned example are based on real data provided by the
Institute of
Biophysics, Academy of Sciences of the Czech Republic, v.v.
i.


19




4.4

Developing Mobile Cloud

For developing mobile applications that use cloud services to store
their data only (variant of thick client) cloud providers offer various level of
support.


Amazon provides the
SDKs for both Android and iOS motivating
develo
pers to use its
storage
cloud services namely Simple Storage Service for
media handling and both non
-
relational database services


SimpleDB and
DynamoDB



for the conventional data store
. Google
focuses on Android
developers only by offering “
App Engine C
onnected Android Support

which simplifies the connecting to the backend deployed on GAE. Microsoft
Azure support both Windows Phone and iOS omitting Android. Nevertheless
after research of the Azure mobile SDKs

my finding
is that Microsoft did the
best jo
b

in preparing their mobile platform
. Tutorials are written with a large
emphasis on the
clearness and whole system is well interconnected for the
mobile developer usage.



Example: Moving to cloud
.

Suppose a bioinformatics lab creates 1 TB of new data for every
particular
lab experiment.
A computer the speed of one
small

EC2 instance takes 3 hours per GB to process the new
data. The lab has the equivalent 10 instances locally, so the time to evaluate the
experiment is






or
300

hours or
5

days
.
They could process it in
24

hour
s

on
125

instances at AWS. The cost to
process one experiment would be







or $
195

in computation. Input network transfer fees are
$
0

and the output size of the computation
can be omitted
.

They measure the transf
er rate from the lab to AWS at 5
0 Mbits/second.
The transfer time is









or more than
44

hours.
Thus the computation

takes 5
days localy or about 3 days on AWS. The difference might evoke thorough consideration
whether it is viable to manage local computational grid or it is better to outsource this to a
cloud provi
der.

20



Chapter Five


Implementation

Part of my work was to develop
a duo

of web applications deployed
on different platforms providing similar web service in order to compare
performance, development
possibilities

and ease of deployment.

For this


based on the analysis and research summarized above


I have chosen AWS
and GAE

out of the platforms available
.

Also an
application

for the Android
platform was developed to consume aforementioned services.

First subchapter specifies

why the application was created and its goal,
the following one presents

the application architecture
,
model

and
technologies used
. Following

two
subchapter
s

cover

the cloud service
s

part of
the implementation followed by the

last

part

of the implementation chapter

about the
Android client

project
.

5.1

Area of Focus and
Intention

of this Software

This applica
tion aims to

provide services for improving

consumers

28

awareness
about
insufficient quality of
goods they are buying or going to b
uy.
In the modeled and implemented database

there are flaws and shortcomings



usually the results of lab tests


from
various official sources stored
.

A
ny
client can
query

them via the public API
. F
orthwith
,

it provides data that help

to
decide whether the brand, producer, distributor
, or seller

of the goods

is
trustworthy
. H
ence
the project got its name



The
Pillory
.

In the
first milestone
29

t
he sources

will

include

public data by

Czech
Agriculture and Food Inspection Authority
,
The Czech Trade Inspection
Authority
, and hygiene authorities of all districts of the Czech Republic.

In the
second milestone

I plan to open th
e platform to the public and
allow community
-
driven content to be uploaded thus granting people the
right to report
incidents directly

to the system
.




28

The word
“consumer” is used in the economic perspective here.

29

This work covers about 75% of the first milestone.

21



The
third milestone

includes the bidirectional connection to the
aforementioned official authorities to su
ch a degree that they will be notified
and involved in solving cases that are considered
a health risk.

5.2

Architecture and Technologies

One of the main goals of any web application

in order to be successful

is to provide services that are being used by
the
consumers. An important
step towards reaching this
ambition

is to offer them in a standardized and
well
-
designed way. Also the choice of technologies affects further
maintenance and eventual evolution

or growth

of the software.

5.2.1

Web Service Specification

As

yet

there are two main standards used in

offering web services
via
the
computer network
:
Simple Object Access Protocol

(SOAP) and
Representational S
tate
T
ransfer

(REST).

From these two approaches
,
inspired by its operation
-
transparency and
affected

by the

technology leaders such as Google and Twitter,
I have chosen
to implement own web

services in a RESTful way


using HTTP and REST


as described by Fielding.

(12)

The applications offer their services to the public
via
cons
istent
REST
API as depicted in the
Figure
8
. The actual number of backend instances
running behind the API is not important

from this point of view

because of
the load

balancing and
autoscaling provided by the cloud services.

22




Figure
8

visualizing the
high
-
level
architecture of the solution
.



Figure
9

showin
g ba
sic use
case diagram of the
service

implemented for AWS.

23




5.2.2

Non
-
relational databases

I have
focused on
non
-
relational databases as the provider
s

of the
application’s persistency.
This comply well with the scalability of the
applications hence I use it to avoid bottlenecks. These could occur when
multiple instance
s of the same application try to access and modify a standard
relational database. This is usually solved by locking the working tables
which results in lower performance and higher susceptibility to programming
errors and exposing the application to numbe
r of various concurrent bugs in
the code.

Non
-
relational approach sacrifices the consistency and
relationships

between elements for the speed and scalability. Also it is usually based on the
flat
30

data model.

5.3

Amazon Elastic Beanstalk Implementation

I have
chosen Java programming language as
the

main

framework
31

along with other tools and libraries list of which can be found in the
appendices section.

I
also
decided to use
an
advanced framework
for implementing the
REST API
in order to avoid low
-
level approach like manual modification of
HTTP headers and basic parsing. After considering many options and trying
some of the
better
known frameworks
32

I decided to use Restlet
33



simple yet
powerful framework with many extensions.
One of the main reasons to
choose it was the availability of an extension to run in a servlet container
which helped me a lot while dep
loying it in the cloud of AWS
.

Secondly its
integration with the Jackson library
34

proved to be of much utility

effectivel
y
helping with (de)serialization of objects
.


Amazon’
s non
-
relational database service is

SimpleDB
and I accessed it
programmatically using provided Amazon SDK. Unlike in relational



30

2
-
Dimensional

31

Up to this date EBL runs Java version 1.6 only; support of version 1.7 is not announced yet.

32

E.g. Jersey or Spring REST frameworks.

33

Project’s home can be found at
http://www.restlet.org/
.

34

JSON data
-
binder, parser, and processor.

24



databases the database model is not normalized and in fact consists of
simple
flat structures called domains. This brings non
-
trivial redundancy as SQL
queries are limited and for example JOIN clause on different domains is not
supported at all. Also the database is proclaimed to be “eventually
-
consistent” which may result in

application obtaining obsolete reads

of data.

The implemented application does not strictly require the newest data
and has high resistance to database inconsistency. This was achieved by
sacrificing the precision of the data state which was identified t
o be of lower
importance than availability.

5.3.1

Autoscaling

AWS allows configuring many aspects of the autoscaling in the
management console. I have identified key metrics of the web service to be
the latency of the end
-
to
-
end response time and the caching ef
ficiency.
However, AWS allows setting up only one scaling trigger resulting in the
latency being preferred to the caching efficiency. The application’s trigger
configuration can be observed in
Figure
10
.

25




Figure
10

showing the scaling dialog for the EBL application.

If the latency breaches an average of 5
seconds in a minute an a
pplication configured like this will scale up by one instance ea
ch minute

up to
the total count of maximal instances. If the latency drops below the lower treshold the application scales
down by one instance following similar formula.

5.3.2

Load Balancing

Once multiple instances of the application are created it is important

to
balance the load of the instances in order to prevent overloads. For this
purpose AWS pr
ovides load balancer that takes care of this based on the
configuration shown in
Figure
11
.

26




Figure
11

depicting the configuration of instance health checking. Load balancer automatically checks
the provided URL

each 6 seconds

and in case
the count of
consecutive
timouts

(5 seconds)

hits

the
threshold

of 2

it redirects the traffic
to a healthy instance
.
When properly configured t
his

balance
s

the
overall
load

of the instances
.

In case the application requires requests of one user to always hit the
same instance the AWS load balancer provides the possibil
ity of sticky
sessions granting this functionality.

5.3.3

Task Scheduling

Elastic Beanstalk does not provide any
built
-
in
means for setting up a
cron job
35

on the server.

You can set up your own
server image (AMI)

with
cron tasks configured but once your applicat
ion scales up and runs
in more
instances
on more machines your cron jobs multiply too
. This

leads

to
concurrency and multiplication

problem
s

especially
when using shared
resources


like a database.

Identified

so
lutions to this problem include
:



running a
separate EC2 micro instance for the tasks



using a different service to periodically call your application
with scheduled tasks
36

5.4

Google App Engine Implementation

Same
architecture, model and
implementation language

as for the
AWS
platform

were

chosen allowi
ng the GAE implementation to be partly
derived from the

existing

application
.

Special Restlet editi
on for GAE
replaced the servlet
-
one

used previously

and d
atabase connection was
changed.

Also Java SDK for GAE provided by Google replaced the main



35

A scheduled task that runs within a certain time interval.

36

E.g.
Amazon Simple Queue Service

or Iron.io
’s
might
be used.

27



developm
ent kit for AWS. Besides these modifications and changed
configurations the application remained very similar in both environments.


5.5

Mobile Client Implementation

I have chosen the Android platform mainly
because of being

pragmatic. Development environment for the iOS is quite expensive to build
(HW cost, developer’s account fees) and Objective C, the language used in
programming for the iOS platform, is not my favorite. As of Windows Phone

OS I lack devices to test with a
s

well as the needed .NET
programming
framework
knowledge.

In the Android implementation
I have used part of the Spring
framework


the Spring for Android


mainly because of its RestTemplate
component which enables seamless access to any REST API.

Also Jackson
library for JSON (de)serialization is put in practice.


Figure
12

depicts flow when user's action asks for data. Application always tries to reach the data from
the best source (based on expected delay).

Application
parses the data from the API and stores it in the local
SQLite database to optimize future data requests. The principle is visualized
in
Figure
12
.

28



5.5.1

Design

I have focu
sed on clear B&W design without using obtrusive graphical
elements
or animation as can be seen in
Figure
13
.





For the map vie
w screen some interesting calculations had to be
programmed. These include deriving the coordinates of the middle of the
visible map from its bounds and calculating the distance from this point to
each of the delict points. This distance was used in order
to provide only set
of the closest delicts converted to map markers. Main goal of this approach
was to save memory as layer of the map with hundreds of markers is
Figure
13

showing the home screen of the application (left) and the map view (right). The map view
always shows delicts nearby based on the center of the map regardless whether the position is
obtained automatically or user panes the map manual
l
y.

29



impossible to handle because of the Android architecture
37
. Standard
approach of calculating t
his distance uses
great
-
circle algorithm
38

which might
have too high resource/precision ratio for my case because I need only rough
precision. Additionally, I do not need a universal solution for the whole Earth
but only for the Czech Republic region (becau
se of the data available).

The result of this research is the following algorithm

written in Java
.

Two static variables
CZECH_REP_LATITUDE_DEGREE_DISTANCE

and
CZECH_REP_LONGITUDE_DEGREE_DISTANCE

represent respectively the width/height
of the rectangle in the center of

the Czech Republic which has width and
height of one degree. These variables allow me to calculate the distance very
efficiently based on the
Pythagorean Theorem
.

Accuracy of such results varies with the position of the points. It is best
with the points
by the center

(and nearby of course)

and can go up to 500m
39

of difference on the edges of the Czech Republic
40

which is still enough for the
calculations given the dataset.

5.5.2

Backend Platform Failover

Client is implemented in such a way that in case of the ma
in cloud
service outage

(in this case the Elastic Beanstalk)

it
can easily
switch to the
idle one thus preventing the unreachability of service. This approach is
especially efficient when the application is deployed in the cloud because of



37

Android application has about 30MB of operation memory available. After exhausting it
usually force
-
closes.

38

Details cen be found at
http://en.wikipedia.org/wiki/Great
-
circle_distance
.

39

About 1600 feet.

40

Roughly a rectangle of sides




miles long.

public static final Double CZECH_REP_LATITUDE_DEGREE_DISTANCE =
111319.49079327373d;

public static final Double CZECH_REP_LONGITUDE_DEGREE_DISTANCE =
73018.95393028315d;


public static final double quickDistance(double lat1, d
ouble lon1,

double lat2, double lon2) {



double dMeterLat = (lat1
-

lat2) * CZECH_REP_LATITUDE_DEGREE_DISTANCE;


double dMeterLng = (lon1
-

lon2) * CZECH_REP_LONGITUDE_DEGREE_DISTANCE;



return Math.sqrt(dMeterLat * dMeterLat + dMeterLng *
dMeterLng);

}


30



the minimal cost
s that are incurred by the spare instance of the application

running without

load
.

A
lthough this may be true
,

the downside of it is the newly emerged
need for outside synchronization of the two databases. After the failover
the
databases

will be
inconsiste
nt and need to be
programmatically

checked. This
might be conveniently done using the timestamp indicating time of the last
modification of each item. In the same fashion
the
changes made in the main
insta
nce need to be pushed to the spare one us
ing cron

p
eriodical job

or
similar approach

like replication
.

5.6

Functional Testing

There were no
automatic,
functional or unit test used during the
development of the described applications.

In this subchapter I would like to
explain why.

The applications are built fr
om functional pieces of software that are
being used in production environments for years and therefore I trust their
functionality and testing. In the beginning there was a vision what the
applications should provide but there were never any
specific
requ
irements
regarding the implementation itself. In order to adopt test
-
driven
development much more detailed specification of the implement
ation would
need to be designed. In this case this would result in
serious overhead

because of the agile approach to th
e implementation
.

For

the development part I have been inspired mainly by the
development
sprints
41

principle

taken from the SCRUM
42

methodic,
by the
Lean Startup
principles
43

and the extreme programming paradigm
44
.

This
resulted in many working versions of the applications being developed
incrementally

with growing functionalities
.




41

Week
-
long development phases that always end up with a newer working version of the
application.

42


I
terative and incremental agile software development framework

based on aforementioned
sprints.

43

Principles reachable at
http://theleanstart
up.com/principles
.

44

An i
ntroduction to extreme programming can be found at
http://
www.
extremeprogramming.
org/
.

31



5.7

Performance Testing

As a part of the implementation
the performance tests have been

performed which
is the matter

of this subchapter.


For performance testing purposes the following metrics have been
identified

and focused
:



Latency



average of total

elapsed wall clock time it takes a
request to be serviced



Requests per period of time



Bytes
per period of time

For testing
the applications a
cloud
-
based testing
service was used
called blitz.io.
Test
-
runs

consisted of calling API that responded with 100
response objects serialized into JSON format resulting in size of 69.1
K
B

per
one response
.

5.7.1

AWS Results

The testing machines
as well as the deployed application were located
in Ireland. From the
Figure
14

we can observe the moment when the number
of hits

(green)

dropped as the number of timeouts (orange) started to grow.


Figure
14

visualizing the hit rate

of the AWS
-
hosted application

during 60 seconds long performance
test starting with one concurrent user and growing up to 1000
concur
rent
users with linear growth.

After about 30 seconds in the test the Elastic Beanstalk platform
’s

autoscaling
trigger
ed

as specified in the

application’s configuration. After
32



evaluation of the trigger autoscaling mechanism created a new instance of the
ap
plication and added it to the environment.

Further requests were served
with barely any latency.


Figure
15

depicts the growth in response time right before the autoscaling allocated a new application
instance.


Figure
16

shows the log of adding a new instance to the environment (top) and statistics collected in the
AWS Management Console during the test (bottom).

5.7.2

GAE Results

Testing machines from Virginia were selected to match the probable
location of th
e Google datacenter
s
.

In spite of this the average response times
were worse than in the first case

as illustrated on graph in
Figure
18
.

33




Figure
17

visualizing the hit rate
of the GAE
-
hosted application
during 60 seconds long performance
test starting with one concurrent user and growing up to 1000 concurrent users with linear growth
.


Figure
18

depicts the
varying
response time as GAE autoscaling was adding more and more instances of
the application.


Figure
19

shows the increase in the number of instances over time during the test. After the end of the
test the application was running on t
otal of 33 instances.

34



Based on the results of the tests at this
level of load the AWS scaling
worked better. This is probably because of the manually and precisely
specified metrics for auto scaling.

5.8

Results and
Benefits

Main results of this work are:



Analysis and comparison of enterprise
-
level cloud services and
providers of these services



Functional framework based on trio of applications

o

Implemented and tested duo of cloud applications

o

Close
-
to
-
production client for Android platform


Main benefits
of the work include
the framework itself and the applied
implementation aimed for information spread


The Pillory application.

As of the platform comparison I would recommend to choose AWS
over GAE for projects where you want to be in better control of th
e
environment. On the other hand main advantage of GAE is the transparent
process of scaling and load balancing.


5.9

Source Codes Release

For every implemented appl
ication the whole source code will be
released after the thesis defense

under
the
MIT
45

license
and will be

reachable
at
the
following addresses:


Project

URL

AWS Backend

https://github.com/martenson/pillory
-
aws

GAE Backend

https://
github.com/martenson/pillory
-
gae

Android Client

https://github.com/martenson/pillory
-
android
-
client






45

License s
pecifics can be seen at
http://

opensource.org/
licenses/
mit
-
license.php

or in the
source
code itself.

35



Chapter Six


Conclusion

When people try to draw “The Internet” on the piece of paper they
often end up depicting it in the shape of the cloud. The wide spread of cloud
computing technology supports the trend of these two terms diffusing.
It is
possible that soon enough these key
IT concepts will be
come

synonyms.

I believe that the synergy of
mobile technology,
web services and cloud
environments is going to be exploited more and more in the future. This goes
in synergy

with the Service Oriented Architecture paradigm taking part in

the
enterprise systems nowadays. It is a natural join and a step
further into
abstraction making it easier for developers and software architects
to work by
making certain layers

of sof
tware applications transparent.

There is always some work remaining.
The highest priority has the
a
utomatic replication and synchronization between databases as well as
scheduled scanning of relevant information sources. Also offering the ability
to create new items in the system to the public might be a good addition
al
fea
ture of the mobile client
. Bandwidth used for synchronization can be
minimized

providing compressed responses.

The big question of the near future is the competition in between the
low
-
level IaaS platforms represented by Amazon Elastic Compute Cloud and
hi
gher level PaaS environments like Google App Engine.

In this thesis I have presented a set of projects
that I develop and
maintain in order to bring relevant information to the public and perhaps
help them decide better what to buy and where. I believe

in

people using it
because having you
r

work being used is the best
a

developer can
hope for
.



36



List of Tables

T
ABLE
1

PRESENTING HOW MANY
APPLICATIONS WERE AV
AILABLE FOR MAIN MOB
ILE PLATFORMS BY THE

END OF
2012.

...

9

T
ABLE
2

SHOWS CHANGES IN PRI
CES FOR
AWS

STORAGE AND NETWORKI
NG OVER
6

YEARS
.

................................
......

13

T
ABLE
3

SHOWING C
OMPARISON OF MAIN CH
ARACTERISTICS OF
C
LOUD
C
OMPUTING SYSTEM AND
ON
-
PREMISE SYSTEMS
.

................................
................................
................................
................................
......................

18



37



List of Figures

F
IGURE
1:

T
HE
NIST

CLOUD COMPUTING CO
MPONENTS
.

F
IGURE REPRINTED FROM

(2).

................................
.............

5

F
IGURE
2:

L
AYERS OF BASIC SERVI
CE MODELS IN CLOUD C
OMPUTING
.

T
HE HIGHER THE ABSTRA
CTION THE BETTER THE

COST
-
EFFICIENCY BUT FOR T
HE COST OF LOSING CE
RTAIN CONTROL OVER T
HE SYSTEM
.

F
IGURE REPR
INTED FROM
(4).

.....

7

F
IGURE
3

DEPICTS HYPE CYCLE F
OR THE CLOUD COMPUTI
NG SEGMENTS FAVORING

S
AA
S

AND
I
AA
S

PLATFORMS
.

F
IGURE
REPRINTED FROM
(5).

................................
................................
................................
...........................

8

F
IGURE
4

ILLUSTRATES A TREND
AND SHARE OF SMARTPH
ONES IN CHOSEN COUNT
RIES
.

F
IGURE REPRINTED FROM

(6).

......

9

F
IGURE
5

DEPICTS SMARTPHONE M
ARKET SHARE SHIFT IN

EU5

BETWEEN
D
ECEMBER
2010

AND
2011.

F
IGURE REPRINTED
FROM
(6).

................................
................................
................................
................................
........

10

F
IGURE
6

SHOWING THE DYNAMICS

O
F THE SMARTPHONE MAR
KET IN THE
US.

F
IGURE REPRINTED FROM

(19)
.

.............

10

F
IGURE
7

SHOWING GEOGRAPHIC D
ISTRIBUTION OF
AWS

(
YELLOW
)

AND
A
ZURE
(
BLUE
)

DATACENTERS
.

.......................

17

F
IGURE
8

VISUALIZING THE HIGH
-
LEVEL ARCHITECTURE O
F THE SOLUTION
.

................................
..............................

22

F
IGURE
9

SHOWING BASIC USE CA
SE DIAGRAM OF THE SE
RVICE IMPLEMENTED FO
R
AWS.

................................
.........

22

F
IGURE
10

SHOWING THE SCALING
DIALOG FOR THE
EBL

APPLICATION
.

I
F THE LATENCY BREACH
ES AN
AVERAGE OF
5

SECONDS IN A MINUTE
AN APPLICATION CONFI
GURED LIKE THIS WILL

SCALE UP BY ONE INST
ANCE EACH MINUTE UP
TO
THE TOTAL COUNT OF M
AXIMAL INSTANCES
.

I
F THE LATENCY DROPS
BELOW THE LOWER TRES
HOLD THE APPLICATION

SCALES DOWN BY ONE I
NSTANCE FOLLOWING S
IMILAR FORMULA
.

................................
................................

25

F
IGURE
11

DEPICTING THE CONFI
GURATION OF INSTANCE

HEALTH CHECKING
.

L
OAD BALANCER AUTOMAT
ICALLY CHECKS
THE PROVIDED
URL

EACH
6

SECONDS AND IN C
ASE THE COUNT OF CON
SECUTIVE TIMOUTS
(5

SECONDS
)

HITS THE
THRESHOLD OF
2

IT REDIRECTS THE TRA
FFIC TO A HEALTHY IN
STANCE
.

W
HEN PROPERLY CONFIGU
RED THIS BALANCES
THE OVERALL LOAD OF
THE INSTANCES
.

................................
................................
................................
..

26

F
IGURE
12

DEPICTS FLOW WHEN US
ER
'
S ACTION ASKS FOR DA
TA
.

A
PPLICATION ALWAYS TR
IES TO REACH THE DAT
A FROM
THE BEST SOURCE
(
BASED ON EXPECTED DE
LAY
).

................................
................................
......................

27

F
IGURE
13

SHOWING THE HOME SCR
EEN OF THE APPLICATI
ON
(
LEFT
)

AND THE MAP VIEW
(
RIGHT
).

T
HE MAP VIEW ALWAYS
SHOWS DELICTS NEARBY

BASED ON THE CENTER
OF THE MAP REGARDLES
S WHETHER THE POSITI
ON IS OBTAINED
AUTOMATICALLY OR USE
R PANES THE

MAP MANUAL
L
Y
.

................................
................................
..............

28

F
IGURE
14

VISUALIZING THE HIT
RATE OF THE
AWS
-
HOSTED APPLICATION D
URING
60

SECONDS LONG PERFORM
ANCE TEST
STARTING WITH ONE CO
NCURRENT USER AND GR
OWING UP TO
1000

CONCURRENT USERS WIT
H LINEAR GROWTH
.

................................
................................
................................
................................
......................

31

F
IGURE
15

DEPICTS THE GROWTH I
N RESPONSE TIME RIGH
T BEFORE THE AUTOSCA
LING ALLOCATED A NEW

APPLICATION
IN
STANCE
.

................................
................................
................................
................................
........

32

F
IGURE
16

SHOWS THE LOG OF ADD
ING A NEW INSTANCE T
O THE ENVIRONMENT
(
TOP
)

AND STATISTICS COLLE
CTED IN THE
AWS

M
ANAGEMENT
C
ONSOLE DURING THE TE
ST
(
BOTTOM
).

................................
................................
....

32

F
IGURE
17

VISUALIZING THE HIT
RATE OF THE
GAE
-
HOSTED APPLICATION D
URING
60

SECONDS LONG PERFORM
ANCE TEST
STARTING WITH ONE CO
NCURRENT USER AND GR
OWIN
G UP TO
1000

CONCURRENT USERS WIT
H LINEAR GROWTH
.

................................
................................
................................
................................
......................

33

F
IGURE
18

DEPICTS THE VARYING
RESPONSE TIME AS
GAE

AUTOSCALING WAS ADDI
NG MORE AND MORE INS
TANCES OF THE
APPL
ICATION
.

................................
................................
................................
................................
....

33

F
IGURE
19

SHOWS THE INCREASE I
N THE NUMBER OF INST
ANCES OVER TIME DURI
NG THE TEST
.

A
FTER THE END OF THE
TEST
THE APPLICATION WAS
RUNNING ON TOTAL OF
33

INSTANCES
.

................................
................................
....

33




38



Bibliography

1.
Schmidt, Eric.

Conversation with Eric Schmidt hosted by Danny Sullivan.
[interv.] Danny Sullivan.
Search Engine Strategies Conference.
August 9, 2006.

2.
Sosinsky, Barrie.

Cloud Computing Bible.
Indianapolis

: s.n., 2011. 978
-
0
-
470
-
90356
-
8.

3.
Peter Mell, Timothy Grance.

The NIST Definition of Cloud Computing.
[Online] September 2011. [Cited: January 3, 2013.] http://

csrc.nist.gov/
publications/
nistpubs/
800
-
145/SP800
-
145.pdf.

4. The Hyderabad Cloud Computing Group. [Online] July 23, 2010. [Cited:
January
3, 2013.] http://
www.meetup.com/
The
-
Hyderabad
-
Cloud
-
Computing
-
Group/
photos/
997114/
16636889/
.

5.
Jackie
Fenn, Mark Raskino.

Hype Cycles 2012 Research Report. [Online]
Gartner, July 2012. [Cited: January 3, 2013.] http://

www.gartner.com/
technology/
research/
hype
-
cycles/.

6.
comScore.

2012 Mobile Future in Focus. [Online] February 23, 2012. [Cited:
January

3, 2013.] http:/
/
www.comscore.com/
Insights/
Presentations_
and_
Whitepapers/
2012/2012_Mobile_Future_in_Focus.

7.
Dediu, Horace.

When will smartphones reach saturation? [Online] Asymco,
January 4, 2013. [Cited: January 3, 2013.] http://

www.asymco.com
/
2013/
01/
04/
when
-
will
-
smartphones
-
reach
-
saturation/.

8.
McCann, John.

Google Play store matches Apple's as

it hits 700,000 apps.
[Online]

October
30, 2012. [Cited: January 3, 2013.] http://
www.techradar.com/
news/
phone
-
and
-
communications/
mobile
-
pho
nes/
google
-
play
-
store
-
matches
-
apples
-
as
-
it
-
hits
-
700000
-
apps
-
1108577.

9.
Canonical Ltd.

Ubuntu for phones.
Ubuntu.
[Online] January 3, 2013.
[Cited: January 3, 2013.] http://www.ubuntu.com/devices/phone.

10.
Williams, Alex.

Amazon Web Services Expected To
Hit $1.5 Billion In
Revenues For 2012. [Online] November 27, 2012. [Cited: January 3, 2013.]


http://

techcrunch.com/
2012/
11/
27/
amazon
-
web
-
services
-
expected
-
to
-
hit
-
1
-
5
-
billion
-
in
-
revenues
-
for
-
2012/.

11.
Google Inc.

About today's App Engine outage.
Go
ogle App Engine Blog.
[Online] Google, October 26, 2012. [Cited: January 3, 2013.] http://

googleappengine.blogspot.cz/
2012/
10/
about
-
todays
-
app
-
engine
-
outage.html.

39



12.
Fielding, Roy Thomas.

Architectural Styles and the Design of Network
-
based Software
Architectures. [Online] 2000. [Cited: January 3, 2013.] http://

www.ics.uci.edu/
~fielding/
pubs/dissertation/rest_arch_style.htm.

13. Recommended Reading and Cloud Computing Glossary. [Online]
Meghan
-
Kiffer Press. [Cited: January 3, 2013.] http://
www.mk
press.com/
CloudReading/.

14.
Garret, Jesee James.

Ajax: A New Approach to Web Applications.
[Online] February 18, 2005. [Cited: January 3, 2013.] http://
www.adaptivepath.com/
ideas/
ajax
-
new
-
approach
-
web
-
applications.

15.
Market
-
Oriented Cloud Computing:

Vision, Hype, and Reality for Delivering IT
Services as Computing Utilities.
Rajkumar Buyya, Chee Shin Yeo, Srikumar
Venugopal.

Melbourne

: IEEE, 2008.

16.
Amazon Inc.

Amazon Inc. annual report for the fiscal year ended
December 31, 2011. [Online] Decembe
r 31, 2011. [Cited: January 3, 2013.]
http://
www.sec.gov/
Archives/
edgar/
data/
1018724/
000119312512032846/
d269317d10k.htm.


17.

. Case Studies. [Online] [Cited: January 3, 2013.] http://

aws.amazon.com/
solutions/
case
-
studies/.

18.

. Micro Instan
ces.
AWS User Guide.
[Online] [Cited: January 3, 2013.]


http://
docs.amazonwebservices.com/
AWSEC2/
latest/
UserGuide/
concepts_micro_instances.html.

19.
Dediu, Horace.

Shares of US smartphones in use by Platform. [Online]
January 3, 2013. [Cited: Januar
y 3, 2013.] http://

twitpic.com/
bs6gzv.

20.
Microsoft.

Summary of Windows Azure Service Disruption on Feb 29th,
2012.
Windows Azure Team Blog.
[Online] Microsoft, March 9, 2012. [Cited:
January 3, 2013.] http://

blogs.msdn.com/
b/
windowsazure/
archive/
2012/
03/
09/
summary
-
of
-
windows
-
azure
-
service
-
disruption
-
on
-
feb
-
29th
-
2012.aspx.

21.
Amazon Inc.

Summary of the December 24, 2012 Amazon ELB Service
Event in the US
-
East Region.
AWS.
[Online] Amazon Inc., 2012. [C
ited:
January 3, 2013.] http://

aws.amazon.com/
message/680587/.




40



Appendix

A

List of

Tools used

I hereby thank to the developers of all following tools.

A.1


List of used software



Eclipse

for backend development



IntelliJ IDEA

for Android development



Notepad++



Dia

for schema drawing



Gimp

for picture editing



Git

for source control



SdbNavigator

Chrome Extension

for SimpleDB access



Advanced REST Client

Chrome Extension

for API testing



Microsoft Word

for typing and typesetting



Microsoft Paint


A.2

List of used services



Loader.io



Blitz.io



Github



Dropbox



Google

Maps


A.3

List of used Libraries and Frameworks



Android SDK



AWS Java SDK



Restlet



GAE Java SDK



Jackson



Spring for Android



41



Appendix B

Content of the DVD



Sources for the
whole trio of implemented applications



This thesis in .pdf format