School of Engineering & Design

Electronics & Computer Engineering

M.Sc. Data Communication Systems



Brunel University

Resource Optimization in
Mobile Cloud Environments

Qamar Idrees (1040511)
DR. Maozhen Li
September/2011

A Dissertation submitted in partial fulfilment of the requirements for
the degree of Master of Science




ABSTRACT
Cloud computing means a technology, which involves virtualization, distributed computing,
networking, software and web services. The elements that are included in a cloud may consist
of mobiles clients, datacenters and distributed servers. Major issues and challenges that
should be considered in developing a cloud environment includes fault tolerance, high
availability, scalability, flexibility, reduced overhead for users, reduced cost of ownership, on
demand services etc. To overcome these issues different algorithms and techniques have been
developed that includes load balancing, resource optimization and scheduling to enhance the
performance of cloud environment. In a cloud environment resources can be shared among
many servers and nodes to overcome many issues like scalability, reliability and utilization.
In this project a mobile cloud environment is created and different techniques are developed
to ensure that all the jobs performed in the mobile cloud should be shared among virtual
servers. Furthermore job scheduling techniques like Particle Swarm Optimization techniques
have been introduced to schedule the jobs performed by each virtual machine running in the
mobile cloud.










ACKNOWLEDGMENT

First of all I would like to thank to Almighty ALLAH who gave me the strength to finish this
project. Then I would express my profound sense of gratitude towards my supervisor Dr.
Maozhen Li, Professor, Department of Engineering and Design, for his able guidance,
support and encouragement throughout my entire one year of study. His readiness for
consultation at all times, his educative comments, his concern and assistance even with
practical things have been invaluable.
I would also like to convey my sincerest gratitude and indebtedness to our entire faculty
members and staff of the Department of Engineering and Design, Brunel University West
London, who bestowed their efforts and guidance at appropriate times without which it would
have been very difficult on my part to finish the project work. Finally, I would like to thank
my parents, my family members and friends for their unconditional love and selfless support.







Table of Contents
1. Introduction ..................................................................................................................................... 1
1.1. Introduction ................................................................................................................................. 2
1.1.1. Cloud Computing ................................................................................................................. 2
1.1.2. Mobile Cloud Computing..................................................................................................... 3
1.1.3. Challenges ........................................................................................................................... 3
1.2. Motivation ................................................................................................................................... 4
1.3. Aims and Objectives .................................................................................................................... 4
1.4. Project Management ................................................................................................................... 5
1.5. Organization of Report ................................................................................................................ 6
2. Literature Review ............................................................................................................................ 7
2.1. Introduction ................................................................................................................................. 8
2.2. Types of Cloud Computing .......................................................................................................... 8
2.2.1. Public Cloud ......................................................................................................................... 9
2.2.2. Private Cloud ....................................................................................................................... 9
2.2.3. Hybrid Cloud ........................................................................................................................ 9
2.3. Layers of Cloud Computing ....................................................................................................... 10
2.3.1. Hardware Layer ................................................................................................................. 11
2.3.2. Virtualization Layer ............................................................................................................ 11
2.3.3. Infrastructure as a Service (IaaS) ....................................................................................... 11
2.3.4. Platform as a Service (PaaS) .............................................................................................. 11
2.3.5. Software as a Service (SaaS) .............................................................................................. 12
2.4. Evaluation of cloud services ...................................................................................................... 12
2.4.1. Measuring Cloud computing Properties ........................................................................... 12
2.5. Challenges in Cloud Computing................................................................................................. 12
2.6. Mobile Cloud Computing .......................................................................................................... 14
2.7. Features and Benefits of Mobile Cloud ..................................................................................... 15
2.8. Challenges and Issues ................................................................................................................ 16
3. Design of Mobile Cloud ................................................................................................................. 18
3.1. Introduction ............................................................................................................................... 19
3.2. Android Overview ...................................................................................................................... 19
3.3. Tools and Software requirement .............................................................................................. 20
3.4. Programming Languages ........................................................................................................... 21


3.5. Configuring the platform ........................................................................................................... 22
3.6. Design of webservice Application ............................................................................................. 24
3.6.1. JavaScript Object Notation (JSON) .................................................................................... 24
3.6.2. Comparison of JSON and XML ........................................................................................... 25
3.6.3. Architecture ....................................................................................................................... 26
3.6.4. Sequence Diagram ............................................................................................................. 27
3.7. Working of Webservice Application .......................................................................................... 29
4. Performance Optimization ............................................................................................................ 32
4.1. Introduction ............................................................................................................................... 33
4.2. Particle Swarm Optimization ..................................................................................................... 33
4.3. Performance of Single Virtual Machine based on bandwidth .................................................. 36
4.4. Challenges and Issues in the current design ............................................................................. 37
4.4.1. Scalability ....................................................................................................................... 38
4.4.2. Availability ..................................................................................................................... 38
4.4.3. Reliability ....................................................................................................................... 38
4.5. Proposed Work .......................................................................................................................... 39
4.5.1. Load Balancing based on 5 Virtual Machines .................................................................... 39
4.5.2. Handling Scalability ....................................................................................................... 39
4.6. Experimental Work .................................................................................................................... 42
4.6.1. Applying PSO Algorithm .................................................................................................... 44
5. Conclusion ..................................................................................................................................... 49
5.1. Conclusion ................................................................................................................................. 50
5.2. Future Work .............................................................................................................................. 50
References ............................................................................................................................................. 51



Resource Optimization in Mobile Cloud Environments

1


Chapter 1


1. Introduction



Resource Optimization in Mobile Cloud Environments

2

1.1. Introduction
This chapter will give some introduction about cloud computing especially in the mobile
environment and the challenges that are being faced in the current cloud computing
environment. It also explains the organization, management and structure of the report
1.1.1. Cloud Computing
Cloud Computing the name indicates having the computational powers in the cloud, means
those providing single/multiple services/resources to many users so anyone can access that
service and get benefit without using its own resources. This was the simple definition of
could computing but cloud computing is actually more than that. Figure 1 shows the logical
diagram of cloud in which many different users are accessing the resources from the cloud
and using it.

Figure 1: Cloud Computing Environment

Resource Optimization in Mobile Cloud Environments

3

Cloud computing relies on running/managing service/application remotely, allowing the
scope of dynamic scaling, remote management and diversity
[25]
.
1.1.2. Mobile Cloud Computing
The market of mobile recently has been evolving rapidly and cloud computing is spreading
into mobile as well
[2]
.
Mobile cloud computing has developed a new for IT industry because it allows the
superiority and economic of cloud computing to meet the mobility and convenience of
mobile. Also mobile computing refers to an infrastructure that data storage and data
processing is done outside mobile device by using cloud computing in the regardless of
kinds of mobile devices. Mobile devices used in the mobile environment include personal
information and enable to provide the environment that collects a variety of context-aware
information. Therefore, context-aware reasoning technique has been studied to provide a
suitable service for user by using user context and personal profile information in mobile
environment
[28]
.
1.1.3. Challenges
The biggest challenge is security. How to secure each companies data. Multi-level
authentication could be a solution to this. However, more development in this field has to
done as proper security solutions will be a key element of industrial cloud. Other challenges
consist of dealing with many versions of truth for reasoning purposes, what is result of
shared environment of data in many formats. Enabling old data to be used in the new
environment is also a challenge. It is important as companies want to use all the data they
already have. However in mobile cloud Bandwidth and network is also important to
consider.

Resource Optimization in Mobile Cloud Environments

4

1.2. Motivation
Cloud computing is a vast concept. Many of the algorithms for load balancing, optimization
etc in cloud computing have been proposed. The whole Internet can be considered as a
cloud of many connectionless and connection oriented services. Many big IT companies like
Google, Microsoft, and Amazon etc are prompting the whole world to be switched on cloud
computing by providing services like MSN sky drive, Google docs, etc. Users can upload,
view and manage their documents online without spending too much on buying expensive
hardware. The focus of this project is to develop an android application based on
virtualization technique and sharing the resources among different virtual machines in the
cloud and also to analyze the performance of single virtual machine compared with multiple
virtual machines in the cloud by using Optimization techniques such as “Particle Swarm
Optimization”.
1.3. Aims and Objectives
• To study in detail the topics of cloud computing, Mobile cloud computing and the
challenges that could be faced in this technology.
• Detailed study of research papers and writing the literature review based on these
research papers.
• Getting familiar with Virtualization technologies VMware also getting familiar with
android client server architecture.
• Understating of different programming languages and platforms like JAVA, PHP and
eclipse. Also different encoding techniques like XML and JSON to be used in this
project.
• Design of mobile cloud and developing an android client and server application to
show how a mobile client uses the server resources in the cloud.
• Resource optimization by sharing resources among virtual machines.
• Performance optimization using Particle Swarm Algorithm and load balancing based
on number of server running in the cloud.
• Comparing the performance of single virtual machine with multiple virtual machines
running in the cloud.
• Providing different solution to optimize the Virtual Server’s performance.
Resource Optimization in Mobile Cloud Environments

5

• Providing solutions to challenges that could be faced.
• Conclusion and future work.
1.4. Project Management
This project has to be accomplished in 16 weeks and in order to finish it time is important
factor. This project has been divided into different tasks based on timely manner i.e.
number of weeks is assigned to each task that is shown in the Gantt chart below:

Week numbers

Tasks 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 Discussion with supervisor


2 Literature Review


3
Learning tools and
technologies to be used in this
project


4
Designing Class Diagrams and
topologies

5
Developing android
application

6 Writing Chapter 1,2,3


7
Developing java program for
Simulating and Testing

8 Analysing


9 Conclusion


1
0
Proof Reading and Binding


1
1
Submission

Figure 2Gantt Chart
I divided this project in 11 tasks which have to be done in specific period of time as shown in
the Figure 2 above.
Resource Optimization in Mobile Cloud Environments

6

1.5. Organization of Report
This report consists of six chapters. A brief description of each chapter can be seen below:
Chapter 1:
Chapter 1 gives a brief introduction of concepts of cloud computing, mobile cloud and
challenges.
Chapter 2:
Chapter 2 is the literature review about the cloud computing, mobile cloud computing,
features and challenges that is done by the research papers studied during the project.
Chapter 3:
In chapter 3 we developed the design of mobile cloud with GUI using the programming
languages PHP and JAVA and Virtualization tool VMware workstation and explained the
classes with figures.
Chapter 4:
Chapter 4 is about the particle swarm optimization technique is used to enhance the mobile
cloud architecture and also we did load balancing based on 5 parallel running virtual
machines to enhance scalability and load sharing.
Chapter 5:
This chapter presents the conclusion about the work done in this whole project.



Resource Optimization in Mobile Cloud Environments

7


Chapter 2


2. Literature
Review

Resource Optimization in Mobile Cloud Environments

8

2.1. Introduction
In this chapter we are going to explain cloud computing, mobile clouds, Layers, and
Evaluation that we studied in the research papers and going to discuss the challenges and
benefits of cloud computing and mobile clouds.
2.2. Types of Cloud Computing
There are three types of cloud computing to be considered now a day.
1. Public Cloud
2. Private Cloud
3. Hybrid Cloud

Figure 3 Types and services of cloud computing [6]

Resource Optimization in Mobile Cloud Environments

9

2.2.1. Public Cloud
Public cloud refers to that type of cloud in which users pay for the services that they use in
this cloud, like data storage. It is based on an on demand storage scalability and isn’t
required to buy storage hardware. It’s typically based on a pay-per-use model, similar to a
prepaid electricity metering system which is flexible enough to cater for spikes in demand
for cloud optimisation. This helps cloud clients to better match their IT expenditure at an
operational level by decreasing its capital expenditure on IT infrastructure
[7].
Public clouds
are less secure than the other cloud models because it places an additional burden of
ensuring all applications and data accessed on the public cloud are not subjected to
malicious attacks. Therefore trust and privacy concerns are rife when dealing with Public
clouds with the cloud SLA at its core
[6]
.
2.2.2. Private Cloud
Private cloud is infrastructure operated solely for a single organization, whether managed
internally or by a third-party and hosted internally or externally
[8].
To deploy this type of
cloud more cost is required on the hardware. To overcome the cost many virtualization
techniques have been developed. Now the industries and companies can develop their
private cloud on the virtualization software’s like VMWARE in which the private cloud can
be deployed in a single hardware. The deployment of virtualization has reduced the cost of
hardware in private clouds.
2.2.3. Hybrid Cloud
The hybrid cloud is the combination of Private cloud and public cloud in which one or more
private clouds are connected to one or more public clouds to share their resources. The
cloud infrastructure is a composition of two or more clouds (private, community, or public)
that remain unique entities but are bound together by standardized or proprietary
technology that enables data and application portability (e.g., cloud bursting for load
balancing between clouds)
[8]
.


Resource Optimization in Mobile Cloud Environments

10

2.3. Layers of Cloud Computing
In context of cloud computing environment there are five layers that need to be considered:
1. Hardware Layer.
2. Virtualization Layer.
3. Infrastructure as a Service layer (IaaS).
4. Platform as a Service layer (Paas).
5. Software as a Service layer (SaaS).


Figure 4 Layers of Cloud Computing [9]
Note that each layer starting from the top is dependent on the layer below to it. A pyramid
above best illustrates the conceptual 'size' of each layer and it also conveys the message
that each layer is based upon the previous layer. So conceptually, you understand that the
hardware is the foundation and the widest layer. Software as a Service (SaaS) is the
capstone and consequently the lightest layer
[9]
.

Resource Optimization in Mobile Cloud Environments

11

2.3.1. Hardware Layer
The base layer in cloud computer architecture is hardware layer. In this layer we have all the
hardware installed for cloud computing environment. This layer could have many servers,
data storages, power etc. This is the base of all the layers on which whole of the cloud is
dependant.
2.3.2. Virtualization Layer
After hardware layer is the virtualization layer. This layer can have many operating systems
running in kind of pool and at the end of each operating system a cluster of hardware is
installed to perform functions. Virtualization layer is a fundamental layer of this system and
failure of system at this layer will cut off the link between the upper layers and the physical
hardware itself. This can produce disastrous results for customer oriented markets. There
have been a number of cases where goodwill of business has been adversely affected
[11]
.
2.3.3. Infrastructure as a Service (IaaS)
Infrastructure as a Service (IaaS) offerings are computing resources such as processing or
storage which can be obtained as a service. Examples are Amazon Web Services with its
Elastic Compute Cloud. IaaS providers typically offer virtualized infrastructure as a service.
Typically by virtualization, hardware level resources are abstracted and encapsulated and
can thus be exposed to upper layer and end users through a standardized and can thus be
exposed to upper layer and end users through a standardized interface as unified resources
(Foster et al. 2008) in the form of IaaS
[10]
.
2.3.4. Platform as a Service (PaaS)
Platforms are an abstraction layer between the software applications (SaaS) and the
virtualized infrastructure (IaaS). PaaS offerings are targeted at software developers.
Developers can write their applications according to the specifications of a particular
platform without needing to worry about underlying hardware infrastructure (IaaS).
Developers upload their application code to a platform, which then typically manages the
automatic up scaling when the usage of the application grows. Examples are the Google App
Engine, which allows applications to be run on Google’s infrastructure and Sales force’s
Force.com platform
[10]
.

Resource Optimization in Mobile Cloud Environments

12

2.3.5. Software as a Service (SaaS)
SaaS is the most visible layer of Cloud Computing for end-users, because it is about the
actual software applications that are accessed and used. From the perspective of the user,
obtaining software as a service is mainly motivated by cost advantages due to the utility-
based payment model. Well known examples for SaaS offerings are Salesforce.com and
Google Apps such as Google Mail and Google Docs and spreadsheets
[10]
.
2.4. Evaluation of cloud services
In order to evaluate cloud service properties a clear distinction need to be made between
the Quality of Cloud Service (QoWS/QoCS) and the Quality of Real Service (QoR). The quality
of the Cloud Service refers to implementation properties whereas the Quality of the Real
Service refers to properties of the Service itself. Here we use QoWS/QoCS for evaluating
web services suitability assessment for cloud computing
[11]
.
2.4.1. Measuring Cloud computing Properties
The properties of cloud computing can be measure using the following parameters.
1. Scalability
2. Virtualization
3. Reliability
4. Availability
5. Response Time
Virtualization is the major property, but measuring virtualization is not possible, because it
varies with load on the system and user requests, hence other means of source is taken for
consideration to make management decision
[12]
.
2.5. Challenges in Cloud Computing
Many techniques and concepts have been developed from so many years to enhance
security issues in this field.

Resource Optimization in Mobile Cloud Environments

13

Some of the challenges that the cloud environment could face are below:
Scalability:
Cloud computing environment depends upon the scale of the cloud i.e. the number of
servers involved in it. If there are more servers in the cloud then they can provide high
scalability to the users so more and more future coming users can become the part of that
cloud and the cloud would perform better. Larger is the cloud; faster is the cloud
[13]
. The
cloud provider companies have a large number of servers offering service to the user or
consumers. Many Large IT industries like Google, Amazon, IBM, and Microsoft have owned
more than 100’s of 1000’s server to provide their service to the end users.
Virtualization
Using a Virtualization technique in cloud computing enables the user to get service from
anywhere around the world either on the mobile device or laptop or PC or any kind of
terminal. Some of the major benefits of the virtualization are:
• Partitioning (Applications and Platforms supported in a Single Physical system)
• Isolation (Virtual machines are separated from the physical system and other virtual
machines there not affecting the other systems in case of failure)
• Encapsulation (Virtual machines are encapsulated in a single file that is easy to
understand which virtual machine provides which services)
[13]
.
Reliability
Cloud environment must be fault tolerant. In case of any function or system failure it should
not affect the cloud. Cloud uses data multi transcript fault tolerance. It replicates the same
data at different locations or at different machines that ensure high reliability
[13]
. Chances
of data crash become less.
Extendibility
The cloud scale should be extendible in case of increased demands. This application brings
up hundreds of virtual servers and on demand runs a parallel computation on them
[13]
.

Resource Optimization in Mobile Cloud Environments

14

On demand Service
Cloud is like a prepaid mobile service in which we can use the service according to our need.
The services are being charged according to the amount of our need. It works like pay as you
go manner simple as in homes we pay for electricity bills as how much we used. Similar in
cloud, we pay as we use the resource of the cloud provider
[13]
.
2.6. Mobile Cloud Computing
Mobile cloud computing can be thought of as infrastructure where data and processing
could happen outside of the mobile device, enabling new types of applications such as
context-aware mobile social networks. As a result, many mobile cloud applications are not
restricted to powerful smart phones, but to a broad range of less advanced mobile phones
and, therefore, to a much larger subscriber segment. From a smart phone perspective in
particular, mobile cloud computing opens up possibilities for a new class of applications by
leveraging handset centric features and network related information, such as GPS and/or
cell-based location information, etc
[17]
.
Mobile cloud computing is an emerging cloud service model following the trend to extend
the cloud to the edge of networks. It includes numerous mobile devices that are closely
associated with their users. They will be directly involved in many cloud activities that
extend the cloud boundaries into the entire cyber physical system. As predicted by Gartner,
mobile phones will overtake PCs as the most common Web access devices worldwide by
2013
[14]
. Thus, mobile devices will become more important and will be involved in almost all
aspects of our daily life
[15]
.
Mobile and cloud computing technology will dominate enterprises as these two emerge as
the most in-demand platforms for software application development and IT delivery over
the next five years, according to a survey by IBM. The survey, which was conducted online
by IBM developerWorks, provided insight into the most enterprise technology and industry
trends based on responses from 2,000 IT developers and specialists across 87 countries.

Resource Optimization in Mobile Cloud Environments

15

According to the survey, 55 percent of them expect mobile software application
development for devices such as iPhone and Android, and even tablet PCs like iPad and
Playbook will surpass application development on all other traditional computing platforms
by 2015
[16]
.
From the information above it is clearly stated that mobile cloud computing is becoming
more and more popular now a days and users are switching from Desktops/laptops to
mobile devices like Ipads, Iphone, and many android phones and tablets.
2.7. Features and Benefits of Mobile Cloud
Mobile cloud becomes a new medium to share resources and applications through mobile
channel. As users become more mobile, the applications they use will become mobile-
enabled.
With the evolving technology of mobile computing lets discuss some features and benefits
of mobile clouds:
• Mobile cloud computing extends cloud computing by providing enhanced service
availability and by exploiting information about a user’s location, context and
network intelligence, thereby considerably improving user experience. Leveraging
the mobile device storage, sensing and processing resources for optimizing cloud-
based application also adds to better user experience
[17]
.
• Create new stream of profits. Due to nature of cloud applications, mobile cloud
computing has started creating a new stream of profit for businesses and application
vendors.
• Users of Mobile Cloud can access many applications from their mobile phones
enabling them not to stick to single PC but on the go.
• Enabling cloud user to login and use many social services like facebook, twitter, orkut
and many more.
• Mobile cloud allows users to access their PC/Laptops remotely from their mobile
devices using the software’s like TeamViewer in their mobile phones.

Resource Optimization in Mobile Cloud Environments

16

• Many big IT industries like Google, Microsoft, and Yahoo etc are providing the mobile
users to save/edit their documents, images and videos directly from their mobile
phones using the tools like MSN Skydrive, Google Docs, Flicker , Youtube and many
more.
• By the use of mobile cloud computing now the mobile users do not need to worry
about their processor capacity because mobile computing provides this service by
processing the users request at the server side.
• Provides Virtualization in which users do not need to worry about what is happening
in the cloud. They just ask the cloud to process their request and the remaining is the
responsibility of the cloud to do it.
2.8. Challenges and Issues
"Mobile cloud computing is unique in its challenges," said Renaud Larsen, chief architect for
cloud at Juniper Networks. "The mobile ecosystem has to traverse many complex layers,
each of which adds network latency and transmission delay. In addition, the cloud allows
users to swap devices and retain access to information—this is a disruptive development,
and means that cloud apps need to cover the whole cross-device mobile infrastructure."
[18]
.
Major Challenges involved in mobile cloud are:
• Network Latency
• Bandwidth Capacity
The most notable problem is the lack of speedy mobile Internet access everywhere. For
example, 3G coverage is spotty outside urban areas, leading to intermittent connection
issues and slow speeds. Other markets may have it even worse. However, new technologies
like HTML5, which does local caching, could help mobile cloud apps get past those sorts of
issues. And there's even a chance that the browser could one day be replaced - at least in
some markets - with another technology altogether which provides a better way to access
the mobile web
[19]
.

Resource Optimization in Mobile Cloud Environments

17

Mobile phones are continuously increasing day by day, so these two issues Network Latency
and Bandwidth capacity should be considered. As mobile network infrastructures
continuously improve, their data transmission becomes increasingly available and
affordable, and thus they are becoming popular clients to consume any Web resources,
especially Web Services (WS). Today, mobile devices like iPhone, Blackberry, Android, have
included applications that consume WS from popular websites, such as Google, Facebook,
and Twitter. However, there are problems in connecting mobile devices to existing WS.
Firstly, WS need to provide optimization for mobile clients. For example, the size of the WS
messages needs to be reduced to fit the bandwidth of mobile clients. Secondly, mobile
clients have to adapt to different kinds of WS, for example, SOAP and JSON WS. The growing
number of mobile clients and availability of WS also drives the needs of customizing and
personalizing service mashes.









Resource Optimization in Mobile Cloud Environments

18


Chapter 3


3. Design of Mobile
Cloud



Resource Optimization in Mobile Cloud Environments

19

3.1. Introduction
In this chapter we are going to design a mobile cloud environment and develop a web
service application using programming languages like JAVA and PHP. We’ll use android
platform to accomplish this task. We’ll setup a development platform for android
application and virtual machine performing the tasks of virtual server in the cloud. Further
we’ll design the diagrams that would show how our android application is sending requests
and receiving the response from the server.
3.2. Android Overview
Android is becoming the most popular operating system in the mobile devices now a day.
This is because of its enhanced features that attract the consumers to buy android bases
devices and also it provides an excellent and easy development platform for the developers.
Below there are some of the features of android operating system.
• Open Source:
Android is an open source operating systems so any one can use it develop it according to
the needs. It is based on Linux kernel that consists of around 12 million lines of code.
• Applications:
There are around 200,000 applications have been developed for this OS which enhanced the
functionality of the mobile devices. A large community of the developers is writing
applications for android. There is is an online applications store named Android Market that
is under the control of Google from where many free and paid applications can be
downloaded from third party sites. Most of the applications are written in Java Language.
• Development Platform:
Android provides an efficient development platform using Android SDK that can be
downloaded from android website directly for Windows, Linux and MAC operating systems.
Applications can be written in open source java language by installing its SDK and plugins for
Netbeans/Eclipse.
Resource Optimization in Mobile Cloud Environments

20

• Layouts:
Android provides many smart phone and tablets layouts that are adaptable to VGA, 2D and
3D graphics.
• Connectivity:
Android supports connectivity technologies that includes GSM/EDGE, IDEN, CDMA, EV-DO,
UMTS, Bluetooth, Wi-Fi , LTE, NFC and WiMAX.
• Multitasking:
Provides multitasking through which many applications can be run and execute at the same
time providing an efficient use of resources.
• Multi-Touch:
Android supports the feature of multi-touch that was first introduced in HTC Hero.
• Tethering:
Android is only the Mobile OS that supports the feature of tethering in which the mobile
device can be used as a Wireless or Wired hotspot through which users can access the
internet on the move.
3.3. Tools and Software requirement
Tools and software’s that we need to install are:
• VMware Workstation
VMware Workstation is required to install in our operating system. We’ll install a separate
virtual server in this VMware and run this virtual server in a cloud through which android
client will interact to process its request.
• Eclipse IDE
Install eclipse IDE on windows OS in which we’ll develop and android client in java.

Resource Optimization in Mobile Cloud Environments

21


• Android ADT plugin for eclipse
To develop and android application we need to install android ADT plugin for eclipse. This
plugin is available to download from android website.
• Android SDK
Install android SDK tools for windows to run the android emulator for the testing of our
android application. We can test our android application using the emulator so no need to
worry if we don’t have the android mobile phone.
• UBUNTU LAMP Server
Download UBUNTU LAMP server from Ubuntu official website and install it in VMware
workstation. UBUNTU LAMP server comes with built in packages of LINUX, APACHE, MYSQL
and PHP. We don’t need to install these packages in Linux separately if we are using LAMP
server. To install UBUNTU LAMP server refer to
[2]
.
3.4. Programming Languages
Programming languages that we should be familiar with to develop android application are:
• JAVA
Java is a well known open source object oriented programming language which is widely
being used by most of the developers of the world. In this application JAVA is being used to
develop client side of the webservice.
• PHP
PHP is also a well known and widely used open source scripting language. What
distinguishes PHP from something like client-side JavaScript is that the code is executed on
the server, generating HTML which is then sent to the client. The client would receive the
results of running that script, but would not know what the underlying code was.

Resource Optimization in Mobile Cloud Environments

22

We can even configure our web server to process all our HTML files with PHP, and then
there's really no way that users can tell what you have up your sleeve.
3.5. Configuring the platform
We are going to create a web service for the android client. To create this service we have
to install and configure the UBUNTU LAMP server on VMware Workstation. Figure below
shows the configured virtual machine on VMware.

Figure 5 Netbeans Installed on Virtual Machine

The figure above shows that UBUNTU LAMP server has been installed on VMware
Workstation. We have installed NETBeans IDE 6.9 in virtual machine to develop the server
side code in PHP. This PHP Server will listen to the client request and response back the
queries.

Resource Optimization in Mobile Cloud Environments

23

Now setup an eclipse platform for the development of webservice. Below are the steps that
should be followed to setup android platform in Eclipse.
• Download android SDK for windows from android website.
• Install ADT plugin for Eclipse.
• Add android platform component in Android SDK.
Te see more details about installing refer to
[3]


Figure 6 Eclipse at the Client Side

Figure above explains the Eclipse development platform in which on the left side is the
project files i.e. JAVA classes, xml files, layouts etc. In the middle is the window in which all
the code has to be written. Right side shows the attributes list. Down is the console window
which shows the information about errors and warnings.


Resource Optimization in Mobile Cloud Environments

24

3.6. Design of webservice Application
In our application we are going to develop a webservice application in which an android
client request the server to process its request in the mobile cloud environment. We used
JSON technique to encode and decode the data.
3.6.1. JavaScript Object Notation (JSON)
Java Script Object Notation (JSON) is a light weight format for data interchange. The major
benefits of JSON technique are:
• Very light weight data exchange format.
• Easy for humans to read and write.
• Easy for systems to parse and generate data.
• Supports more than 21 languages.
JSON is built on two structures:
• A collection of name/value pairs with unique names (associative array).
• An ordered list of values (array).
JSON is used extensively in various AJAX frameworks and toolkits to provide easy object
serialization for remote calls. There is a growing realization that perhaps JSON should be
considered as an option when implementing SOA
[4]
.




Resource Optimization in Mobile Cloud Environments

25

3.6.2. Comparison of JSON and XML

JSON XML
Fully automated way of de-serializing/serializing
JavaScript objects, minimum to no coding
Developers have to write JavaScript code to
serialize/de-serialize to/from XML
Very good support by all browsers While XML parsers are built-in into all modern
browsers, cross-browser XML parsing can be
tricky. [5]
Concise format i.e. name/value pair -based
approach
Verbose format because of tags and
namespaces
Fast object de-serialization in Slower de-serialization in JavaScript
Supported by many AJAX toolkits and JavaScript
libraries
Not very well supported by AJAX toolkits
Simple API (available for JavaScript and many other
languages)
More complex APIs
No support for formal grammar definition, hence
interface contracts are hard to communicate and
enforce
XML Schema or DTD can be used to define
grammars
No namespace support, hence poor extensibility Good namespace support, many different
extensibility options in Schema
Limited development tools support Supported by wide array of development and
other (e.g., transformation) tools
Narrow focus, used for RPC only, primarily with
JavaScript clients (although one can argue that it's
one of the strengths)
Broad focus - can be used for RPC, EDI,
metadata, you name it
Table 1 Comparison of JSON and XML [4]

Resource Optimization in Mobile Cloud Environments

26


3.6.3. Architecture
Figure below explains the architecture of our webservice application.


Cloud Network
Android
Client
Database
PHP
JSON
Encode
Sends the
request in
Cloud Virtual Server
Process the client
request and get data
from database
Forward the request
Get data encoded in
JSON Format
Get Data in
JSON
Format

Figure 7 Architecture of Mobile Cloud

The figure above explains the scenario of using the services in mobile cloud computing. The
android client first sends the request in the cloud using HTTPPOST method and request is
forwarded to the virtual server which has registered its service in the cloud with service
registry. The service has been written in PHP which takes the clients query and finds the
records against the clients query in the database encode it in JSON format and send back to
the client using the cloud. When the data received at the client side it saves the result in
JSON object which can be achieved using the loop and the data would be shown in the
client’s android mobile.


Resource Optimization in Mobile Cloud Environments

27

3.6.4. Sequence Diagram
Sequence Diagrams basically shows the activities of the processes and events that run
within the system for a specific period of time. Sequence Diagrams are often known as
event diagrams, event Scenarios and timing Diagrams.


Figure 8 Sequence Diagram
The figure above shows the time stamp of each activity from the start to end i.e. when the
client sends the request and server sends the response in terms of web services. We can see
the whole process completed in 10 steps.

Step 1:
At the first step Virtual server connects itself with the cloud by introducing its service in the
cloud.

Resource Optimization in Mobile Cloud Environments

28


Step 2:
The client found the service and sends the request to the specific server that is registered
with this service in the cloud. In terms of programming the request sent to the server uses
HTTPPOST method.
Step 3:
At step 3 the request is being forwarded to the specific virtual server that is registered with
the service that android client wants to use.
Step 4:
At step four the virtual server receives the request and processes it.
Step 5:
Step 5 shows that the request of the client is being processed by the server and it has been
forwarded to PHP to process the clients query to get the records from database attached to
this server.
Step 6:
At step 6 data is being retrieved from database and forwarded to the PHP.
Step 7:
Step 7 shows that the data retrieved from the database is being encoded by the PHP in JSON
format.
Step 8:
At 8
th
step the encoded is sent back in the cloud to send to the client.

Resource Optimization in Mobile Cloud Environments

29

Step 9:
Step 9 ensures that the data has been successfully received in JSON format.
After 9
th
step the when the client receives the encoded data it saves the result in JSON
array. The data is retrieved from JSON array using loop and that data will be shown in the
client’s mobile device.
3.7. Working of Webservice Application
We are now going to show the demo of this mobile cloud architecture using a simple
application we developed in java and developed a simple PHP code to process the client’s
request.

Figure 9 Software’s architecture at Server and Client
The figure above explains the platforms, tools/software and languages we used in this
Resource Optimization in Mobile Cloud Environments

30

application. All the working has been done on a single PC using the virtualization software
VMWARE Workstation. We installed UBUNTU LAMP server in the VMWARE and further in
UBUNTU we installed Netbeans IDE tool to develop a PHP application at the server side. At
the client side we have windows 7 platform and installed Eclipse IDE and android SDK for
the development of android application and we used JAVA + XML languages to develop
android application. We installed android SDK for the real time testing of android
application in the android emulator.
For the testing purpose of our webservice we used sample database WORLD that is easily
available on the internet to download.

Figure 10 Demo Application 1
The figure above shows the graphical user interface for the android application. When we
press the Submit button after entering the name of country in the textbox which is showing
“Enter Name of Country”. Then the application sends the request in the cloud to the virtual
machine. The virtual server will process the client’s request finds the capital of that country

Resource Optimization in Mobile Cloud Environments

31

in the database and sends the result back to the client in JSON format. After the client
receives the data is retrieved and showed it in the textbox below the submit button. As a
demo the result is shown in the figure below.

Figure 11 Demo Application 2

The application above shows the successful working of our JSON webservice that we
developed in which user enters the country name and press the submit button. Then the
request is sent to the PHP server and there the PHP process the user request and get the
results from the database. When it gets then results i.e. Capital city of that country from the
database it encodes the data into JSON format and sent back to the cloud. The client
receives that data in JSON encoding and the results are shown into the mobile device of the
client.


Resource Optimization in Mobile Cloud Environments

32

Chapter 4


4. Performance
Optimization


Resource Optimization in Mobile Cloud Environments

33

4.1. Introduction
In this chapter we analyze our design that we developed in Chapter 3 and discuss the
possible challenges and issues that could occur in our current design and try to find the
possible solutions to these challenges. We’ll discuss and implement a well known
performance optimization technique PARTICLE SWARM OPRIMIZATION and check the
performance of single virtual machine in the cloud and compare it with 5 parallel running
virtual machines and check the performance. Then we would analyze and conclude results
using the performance parameters in both scenarios. In short we are going to enhance our
current design using particle swarm algorithm. We would perform load balancing based on
number of parallel virtual machine running at the same time.
4.2. Particle Swarm Optimization
Particle swarm optimization is a population based stochastic optimization technique
developed by Dr. Eberhart and Dr. Kennedy in 1995. They developed this technique inspired
by the social behaviour of animals such as a flock of birds finding a food source or a school
of fish protecting them from a predator. A particle in PSO is analogous to a bird or fish flying
through a search (problem) space
[20]
. The elements those are important to note in this
scenario.
1. One is the particle that refers to the bird which is the solution.
2. Each particle has a fitness value which is calculated by a fitness function to be
optimized.
PSO get initialized with a group of random particles in space and then searches for the
optimization by updating generations. For each iteration particle is updated by two best
values. The first one is calculated by the fitness value that a particle achieved and this value
is called pbest and the other value achieved by the particle itself in the space and it is called
global best value gbest.

Resource Optimization in Mobile Cloud Environments

34

After finding these two values particle updates its velocity and position by the following
equation.
V = V+ c1*randno. * (pbest-present) + c2*randno.* (gbest-present);
present = present+v;
V denotes the particle velocity, present is current particle, c1 and c2 are learning factors
usually c1=c2=2 and randno. are the random numbers to be generated between 0 and 1.
The steps involved in particle swarm optimization are:
Select the search space and initialize the particle.
For each particle calculate its fitness value, if fitness value is better than the previous
fitness value set the current value as the new pbest.
Choose the particle with the best fitness value of all the particles and set it as the
gbest.
Calculate the particle velocity and equation for each particle.

Resource Optimization in Mobile Cloud Environments

35



Figure 12 Particle Swarm Flow Chart

The Figure above shows the flow diagram for particle swarm algorithm step by step and we
can implement it in our program using the flow diagram above.


Resource Optimization in Mobile Cloud Environments

36

4.3. Performance of Single Virtual Machine based on bandwidth
Suppose the client requests the server to query 6MB of data. Total payload and header per
packet would be 256 and 8 bytes. Bandwidth is 2 Mb. Then,
ˠoˮoˬ ˚˯˭b˥r o˦ poc˫˥ˮs =
ź - ŵŴŶŸ - ŵŴŶŸ
ŶŹź
= ŶŸŹŻź poc˫˥ˮs
˖˥ˬo˳
P1
=
(ŶŹź +8) - 8
Ŷ - ŵŴ
6
- ŵ = .ŴŴŵŵ s˥conˤs
˖˥ˬo˳
Rcst
= (ŶŸŹŻź -ŵ) _
ŶŹź +8
Ŷ - ŵŴ
6
] - 8 = ŶŻ.Ŵŷ s˥conˤs
˖˥ˬo˳
totuI
= ˖˥ˬo˳
P1
+ ˖˥ˬo˳
Rcst
= ŶŻ.Ŵŷŷ +Ŵ.ŴŴŵŵ = ŶŻ.ŴŷŸ s˥conˤs
Now we’ll take 6 more samples of data to be queried by the server i.e. 7MB, 8MB, 9MB,
10MB and 11MB. The link bandwidth and payload would remain the same.
Amount of data (MB) Time (Seconds)
6MB 27.03
7MB 31.53
8MB 36.04
9MB 40.55
10MB 45.05
11MB 49.06
Table 2 Delays for a Single Virtual Machine
In the table above, the total delay is calculated for a single virtual machine for six sample
amount of data having link bandwidth of 2 Mb and. Payload and header size would be 256
bytes and 8 bytes.


Resource Optimization in Mobile Cloud Environments

37



Graph 1:

The graph above shows the delays regarding the packet size to be sent to the server.
Vertical axis shows the time units in seconds and horizontal axis shows amount of data in
MB. The graph clearly explains that by increasing the amount of data results in the increase
in delays. For 6MB the total delay is 27.03 seconds and after that when amount of data is
increased delay is increased and at 11MB it has reached to almost 50 seconds.
4.4. Challenges and Issues in the current design
In the above scenario explained in Chapter 3 we had only one single virtual machine running
that handles the requests from the android client. The major challenges that could be faced
in that design are
1. Scalability
2. Availability
3. Reliability

0
10
20
30
40
50
60
6MB 7MB 8MB 9MB 10MB 11MB
Time (Seconds)
Time (Seconds)
Resource Optimization in Mobile Cloud Environments

38

4.4.1. Scalability
The major challenge that we would face in that design is scalability. Scalability refers to how
well a hardware or software system can adapt to increased demands. For example, a
scalable network system would be one that can start with just a few nodes but can easily
expand to thousands of nodes. Scalability can be a very important feature because it means
that we can invest in a system with confidence we won't outgrow it. In our current design
we describe it with only one single user but suppose when more and more clients join the
cloud and the number counts to 100’s or 1000’s clients that send the request to the server.
The following question will arise:
Would that server be able to handle that amount request?
Would that system is capable to increase total throughput under an increased load
when resources (typically hardware) are added?
The answer is No because when more and more clients are added then at one stage the
server’s capacity of handling the requests would slow down and hence can increase the
chances of server failure.
4.4.2. Availability
The next issue is availability. When we are running a single server then we should make sure
that it should be available at all times for the nodes to send back the response and handling
the queries. Suppose if our server gets fail or it has got some problem in its hardware which
has stopped the server to run then how we are going to cope with this situation? Then
solution is to run a backup server but still there would be scalability issues.
4.4.3. Reliability
Reliability refers to as ability of a component/system to function correctly over a specified
period of time, mostly under pre-defined conditions. Fault tolerance is defined as the ability
of the system to continue operation in the event of a failure. Fault tolerance means that a
computer system or component is designed such that, in case a component fails, a backup
component or backup procedure can immediately take its place with no loss of
functionality. Reliability can be improved through fault tolerance
[21]
. Reliability can be
achieved by redundancy of the software or hardware components that run as the backup if
any system functionality fails.
Resource Optimization in Mobile Cloud Environments

39

4.5. Proposed Work
4.5.1. Load Balancing based on 5 Virtual Machines
We discussed our issues and challenges in the previous topic now we are going to find the
possible solutions. We added five Virtual Machines with different capacities in the design
that will run parallel and handle the client’s requests and process them based on their
capacities i.e. number of processors. Particle Swarm optimization technique is being used in
this case.
4.5.2. Handling Scalability
Suppose five virtual machines are VM1, VM2, VM3, VM4, and VM5. The processors assigned
to each virtual machine and the initial position of virtual machine is shown in the table
below
Virtual Machine Position Number of Processors
VM1 1 2
VM2 2 4
VM3 3 6
VM4 4 8
VM5 5 10
Table 3: Number of Processors assigned to each virtual machine
ˠoˮoˬ ˚˯˭b˥r o˦ ˜roc˥ssors = Ŷ +Ÿ +ź +8 +ŵŴ = 3û
ˠoˮoˬ ˚˯˭b˥r o˦ ˢ˩rˮ˯oˬ Hoc˨˩n˥s = Ź
Now suppose the client request to process 1000 records from database.
Solution 1
One solution could be that we divide the task equally to all virtual machines and they will
process the data for the client i.e. 1000/5 = 200 records per virtual machine but that
scenario is not the best solution because the virtual machine which has the less capacity
would have to process more than its original capacity thus will cause delay in the processing.
So this solution would not be considered as an optimize solution. To overcome this situation
we would consider the second solution explained below in which parallel running virtual
machines will process the client’s tasks based on their capacities.
Resource Optimization in Mobile Cloud Environments

40

Solution 2
The other one we can do is that the virtual machines will process the client’s request based
on their capacity. We calculate the capacity of each virtual machine. To find the capacity in
percentage we’ll use the formula.
Cͷ΀ͷ͹|ty =
NͿ.Ϳ¡ ΀΂Ϳ͹e΃΃Ϳ΂ ¡Ϳ΂ eͷ͹h Ͳͯ
tͿtͷͼ ;uͽ͸e΂ Ϳ¡ ΀΂Ϳ͹e΃΃Ϳ΂΃
- 1ûû (1)
So for VM1:
˕opoc˩ˮ˳
vM1
=
Ŷ
ŷŴ
- ŵŴŴ = ź%
For VM2:
˕opoc˩ˮ˳
vM2
=
Ÿ
ŷŴ
- ŵŴŴ = ŵŷ%
For VM3:
˕opoc˩ˮ˳
vM3
=
ź
ŷŴ
- ŵŴŴ = ŶŴ%
For VM4:
˕opoc˩ˮ˳
vM4
=
8
ŷŴ
- ŵŴŴ = ŶŻ%
For VM5:
˕opoc˩ˮ˳
vM5
=
ŵŴ
ŷŴ
- ŵŴŴ = ŷŸ%
From the above percentage for each virtual machine capacity it clearly states that virtual
machine VM1 will process 6% of total task, VM2 will process 12%, VM3 will process 20%,
VM4 will process 27% and VM5 will process 34% of the total task.

Resource Optimization in Mobile Cloud Environments

41


Virtual Machine Position Number of Processors Capacity
VM5 1 10 34%
VM4 2 8 27%
VM3 3 6 20%
VM2 4 4 13%
VM1 5 2 6%
Table 4: Position changed based on Capacity
In the table above we can see the capacity of each virtual machine according to the number
of processors assigned to them. Virtual machine VM5 has changed its position to position 1
because it is counted as best above all the virtual machines. It is sorted in descending order
Suppose if any virtual machine is modified i.e. if we increase the processors in VM3 to 15
then after VM3 would come at the top and.

Graph 2: Capacity of each virtual machine
The graph above explains the capacity of each virtual machine separately. VM5 has the
highest capacity to process the client’s tasks.
0%
5%
10%
15%
20%
25%
30%
35%
40%
VM5 VM4 VM3 VM2 VM1
Capacity of Each VM
Capacity of Each VM
Resource Optimization in Mobile Cloud Environments

42

4.6. Experimental Work
We’ll use an example and see how the client’s tasks are being processed by 5 virtual
machines running parallel in the cloud by using the solution 2 explained above.


Figure 13 Clients connected to the cloud

The figure above explains how different clients are connected with the cloud and using the
server’s (Virtual Machine) resources in that cloud. All Server are connected to one database
and processing the clients tasks in parallel based on their capacities
Suppose a mobile client wants to get 1000 records from a huge database. The formula to
calculate the task processing for each virtual machine would be

ͦͷtͷ tͿ ͸e ΀΂Ϳ͹e΃΃ed =
͹ͷ΀ͷ͹|ty-tͿtͷͼ ͷͽͿu;t Ϳ¡ dͷtͷ
1ûû
(2)


Resource Optimization in Mobile Cloud Environments

43

Virtual Machine Subdivided Task (records)
VM1 60 records
VM2 130 records
VM3 200 records
VM4 270 records
VM5 340 records
Table 5
Table above are the records calculated to be processed by each virtual machine. We divided
this task into five subdivided tasks as explained in the figure below and each sub divided
task would be assigned to the virtual machine that matches its capacity

Figure 14 Tasks Assigned to each virtual machine



Resource Optimization in Mobile Cloud Environments

44

4.6.1. Applying PSO Algorithm
One of the key issues in designing a successful PSO algorithm is the representation step
which aims at finding an appropriate mapping between problem solution and PSO particle
[25]
. We have 5 tasks assigned to 5 virtual machines having different no of processors. We’ll
use Novel Bases optimization technique
[24]
.
Particle’s Positions:
In this method solutions are encodes as m x n which is called position matrix where m
denotes the number of virtual machines at the time of scheduling and n is the number of
tasks. The position matrix of each particle has two properties:
• All the elements of the matrices have either the value of 0 or 1. In other words, if X
k

is the position matrix of kth particles, then:
ʹ
ͻ
(|, ͺ) e {û, 1] v |, ͺ , | e {1, 2, 3.. . ͽ] & ˪ e {ŵ,Ŷ,ŷ.. n] (3)
• In each column of these matrices only one element is 1 and others are 0.
In position matrix each column represents a task allocation and each row represents
allocated tasks in a virtual machine. In each column it is determined that a task should be
performed by which virtual machine.

Task 1 Task 2 Task 3 Task 4 Task 5
VM1 1 0 0 0 0
VM2 0 1 0 0 0
VM3 0 0 1 0 0
VM4 0 0 0 1 0
VM5 0 0 0 0 1
Table 6 Position Matrix
According to our scenario we can see task 1 is performed by VM1, and it will not perform
others tasks. Similar is the case with other virtual machines as table above clearly explains
which task is performed by which virtual machine if it is 1 then the virtual machine will
execute that task and if it is 0 then that task would not be executed on that virtual machine.


Resource Optimization in Mobile Cloud Environments

45

Particle’s Velocity:
To find the velocity of the particle let’s consider the following symbols that represent the
properties of the particles.
• X
i
= Current Position of the particle.
• V
i
= Current Velocity of the particle.
• P
best
is the personal best position of the particle.
• G
best
is the global best position of the particle.
• t is the current iteration.
• r1, r2 are randomly generated for every velocity update and 0 ≤ r1, r2 ≤ 1. They
should both be different each iteration.
• c1, c2 are user defined values are acceleration coefficients where 0 ≤ c1, c2 ≤ 2.
Their value depends on the problem to be optimized.
• w is the inertia weight
Particle velocity is considered as a m x n matrix in which elements are in range of
[-V
max
, V
max
]. If V
k
is the velocity matrix of kth particle,

Ͳ
ͻ
(|, ͺ) e |-Ͳ
ͽͷx
, Ͳ
ͽͷx
] v (|, ͺ), | e {1, 2, 3.ͽ], ͺ e {1, 2, 3.;] (Ÿ)

Updating Particle’s Velocity:
Equation 5 below is used for updating particles velocity and Equation 10 is used for updating
position matrix for each particle.

ˢ
k
(t+1)
(˩, ˪) = ˱. ˢ
k
t
(˩, ˪) +c
1
. r
1
(˜b˥sˮ
k
t
(˩, ˪) -X
k
t
(˩, ˪))
+ c
2
. r
2
(˙b˥sˮ
k
t
(˩, ˪) -X
k
t
(˩, ˪)) (Ź)


Resource Optimization in Mobile Cloud Environments

46


X
k
(t+1)
(˩, ˪) = ŵ ˩˦ Әˢ
k
(t+1)
(˩, ˪) = ˭o˲ Ӝˢ
k
(t+1)
(˩, ˪)ӝә v˩ e {ŵ,Ŷ,ŷ.˭] (ź.ŵ)
X
k
(t+1)
(˩, ˪) = Ŵ oˮ˨˥r ˱˩s˥ (ź.Ŷ)

In the Equation 5 above ˢ
k
t
(˩, ˪) represents the element in ith row and jth column of kth
velocity matrix in iteration t and X
k
t
(˩, ˪) represents the element in ith row and jth column
of kth position matrix in iteration t. Equations 6.1 and 6.2 shows that the position matrix
value would be 1 if the velocity matrix has the maximum value in its corresponding column
otherwise it would be 0.

Fitness Value Evaluation:
According to
[24]
makespan and flowtime are used to evaluate the performance of scheduler
simultaneously. Because makespan and flowtime values are in incomparable ranges and the
flowtime has a higher magnitude order over the makespan, the value of mean flowtime,
flowtime / m, is used to evaluate flowtime where m is the number of available nodes. The
Fitness value of each solution can be estimated using (7).

˘˩ˮn˥ss ˰oˬ˯˥ = Ӟ
ŵ
z. ˭o˫˥spon +(ŵ -z). ˭˥on
]Iowtìmc
ӟ (Ż)

In the equation 7 above z is used to regulate the effectiveness of parameters used in this
equation. The greater the, more attention is paid by the scheduler in minimizing makespan
and vice versa. The smaller makespan and flowtime in (7), the greater fitness value, and
hence a better solution it is regarded
[24]
.


Resource Optimization in Mobile Cloud Environments

47

Pseudo Code:
Now from the observations and equations above generated pseudo code of PSO algorithm
is described below

For each particle
Initialize particles with m x n dimensions
Do
For each particle i =1, 2, 3..... P
//Calculate Fitness Value
If f(X
i
) > f(pbest
i
)
pbest
i
= X
i
;
End
//Choose the particle with the best fitness value as global best
If f(pbest
i
) > f(gbest
i
)
gbest
i
= pbest
i
;
End

End
//Calculate Particle Velocity and update its position
For each particle i =1, 2, 3..... P
Update the velocity matrix using (5)
Update the position matrix using (6)
End
While maximum iterations or until stopping condition is true;


The pseudo code above shows the structure of the algorithm. We can follow this pseudo
code to develop PSO application.

Resource Optimization in Mobile Cloud Environments

48

At the initial steps first we have to generate the swarm of particles that would have m x n
dimensions where m shows the number of virtual machines and n shows the number of
tasks. Then calculate the fitness values which would be based on markspan and flowtime by
using equation 7 for each particle in the swarm and choose the best local best i.e. pbest
virtual machine. Then the best particle judged is set as global best. If in the iteration the
particle assigned locally the best i.e pbest has higher fitness value than the global best
(gbest) then the pbest is assigned to gbest and that would be the global best particle. After
it is done particle swarm algorithm updates the velocity matrix and the position matrix until
the loop iterates.





Resource Optimization in Mobile Cloud Environments

49

Chapter 5


5. Conclusion


Resource Optimization in Mobile Cloud Environments

50

5.1. Conclusion
In this project we conclude that sharing the resources among other virtual machines in a
mobile could result in fast processing of the requests sent by the clients. Furthermore the
issues we faced in topic 4.4 could be reduced down and ensures high scalability, availability
and reliability of virtual machines in a cloud by dividing the task among virtual server
running in the cloud. If there are more virtual servers in a cloud then the chances of failure
becomes less and high availability could be achieved. The cloud would be fast and secure.
For example by using the topology above if any virtual machine in the cloud fails then the
task would be divided into the other virtual machines that are running.
If we compare a cloud with five virtual machines and a cloud with single virtual machine
then the cloud with 5 virtual machines will definitely perform better because all the
resources of 5 virtual machines are shared among themselves and the chances of failure are
reduced and the cloud would be more scalable. Furthermore if we apply Particle Swarm
Optimization technique to among the server then it would become more efficient and
optimized because every job would be scheduled according to the server’s capacity and
time the server achieved to process the jobs i.e. makespan and flowtime.

5.2. Future Work
In this dissertation we optimized our mobile cloud based on server capacity and time span.
But we can consider more techniques and algorithms like bandwidth optimization, server
storage, network latency etc to enhance the performance of our cloud. We discussed only
Particle Swarm Algorithm and we optimized the cloud based on its capacity i.e. no of
processors to handle the requests. Mobile cloud is a vast concept and load balancing plays
very important to make every type of cloud efficient. However in case of mobile cloud
computing two more issues are need to be considered that is Bandwidth Capacity and
Network Latency. More and more development is being done in this field. But although
network is unpredictable so we have to consider many other parameters as well to make
the network optimized and efficient.


Resource Optimization in Mobile Cloud Environments

51

References
[1] Design of Intelligence Mobile Cloud Service Platform Based Context Aware
By Hyokyung Chang and Euiin Choi
[2] Step BY Step Ubuntu 9.04 (Jaunty) LAMP Server Setup
By Ubuntugeek.com
[3] Installing Android SDK
By developer.android.com
[4] JSON Pros and Cons
By Alexander Ananieve 2007
[5] Call SOAP Web services with Ajax, Part 1: Build the Web services client
By James Snell 2005
[6] The Management of Security in Cloud Computing
By Ramgovind S, Eloff MM, Smith E
[7] A Platform Computing Whitepaper, ‘Enterprise Cloud Computing: Transforming
IT’, By Platform Computing, March 2010.
[8] The NIST Definition of Cloud Computing (DRAFT)
By Peter Mell, Timothy Grance January 2011
[9] Understanding the Layers within Cloud Computing
By The Silicon Whisperer November 2009
[10] Grid and Cloud Computing
By Katarina Stanoevska-Slabeva, Thomas Wozniak, Santi Ristol 2009
[11] Cloud Computing System and Its Layers
By Sharathr
[12] Web service Suitability Assessment for Cloud Computing
By M.S. Nanda Kishore et al
[13] Security Issues in Cloud Computing
By Pardeep Sharma, Sandeep K.
[14] Mark Walsh. Gartner: Mobile To Outpace Desktop Web
By 2013. Online Media Daily, January 13, 2010
[15] Mobile Cloud Computing
By Dijiang Huang Arizona State University, Arizona, USA

Resource Optimization in Mobile Cloud Environments

52


[16] Mobile, cloud computing to dominate software apps, IT deliveries in next 5 yrs,
says survey
By Priyanka Banarjee October 11 2010
[17] The Mobile Cloud: Why it’s so important
By Olafur Ingthorsson on May 16, 2011
[18] Overcoming mobile cloud computing challenges with distributed apps
By Bryan Betts July 2011
[19] Why Cloud Computing is the Future of Mobile
By Sarah Perez August 2009
[20] A Particle Swarm Optimization-based Heuristic for Scheduling Workflow
Applications in Cloud Computing Environments
By Suraj Pandey, LinlinWu, Siddeswara Mayura Guru, Rajkumar Buyya
[21] Hardware Reliability
By Irene Eusgeld, Bernhard Fechner, Felix Salfner, Max Walter, Philipp Limbourg and Lijun
Zhang
[22] Validity of the single processor approach to achieving large scale computing
capabilities
By Gene M Amdahl, IBM Sunnyvale California
[23] Characterizing Network Processing Delay
By Ramaswamy, Ning Weng and Tilman Wolf
[24] A Novel Particle Swarm Optimization Approach for Grid Job Scheduling
By Hesam Izakian, Behrouz Tork Ladani, Kamran Zamanifar, Ajith Abraham
[25]. Green Cloud on the Horizon
By Mufajjul Ali
[25] Non Dominated Particle Swarm Optimization For Scheduling Independent Tasks
On Heterogeneous Distributed Environments
By G. Subashini, M.C. Bhuvaneswari
[26] Scheduling Jobs on Computational Grids Using Fuzzy Particle Swarm Algorithm
By Ajith Abraham1,3, Hongbo Liu2, Weishi Zhang3, and Tae-Gyu Chang1

Resource Optimization in Mobile Cloud Environments

53


[27] Black Box Optimization Benchmark (BBOB) applied to classical optimization
algorithms: PSO, DE-PSO and CMA.
By Maarten Belmans, Hogeschool Gent, Tim Desmet, Hogeschool Gent 2010
[28]Context Model Based on Ontology in Mobile Cloud Computing
By Changbok Jang and Euiin Choi

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer: Get 4 months of Scribd and The New York Times for just $1.87 per week!

Master Your Semester with a Special Offer from Scribd & The New York Times