Unblocking The Main Thread Solving ANRs and Frozen Frames
Cloud computing
1. CLOUD COMPUTING
grow—simultaneously—they realize that it’s
not possible to succeed simply by doing the
same thingsbetter. They know they have to do
new things that produce better results.
Cloud computing enables innovation. It
alleviates the need of innovators to find
1.Abstract
1.Abstract resources to
This paper describes cloud computing, a develop, test, and make their innovations
computing platform for the next generation of available to the user community. Innovators
the Internet. The paper defines clouds, are free to
explains the business benefits of cloud focus on the innovation rather than the
computing, and logistics of finding and managing resources
outlines cloud architecture and its major that enable the
components. Readers will discover how a innovation. Cloud computing helps leverage
business can use innovation as early as possible to deliver
cloud computing to foster innovation and businessvalue to IBM and its customers.
reduce IT costs. Fostering innovation requires unprecedented
IntroductionEnterprises strive to reduce flexibility and responsiveness. The enterprise
computing costs. Many start by consolidating should provide an ecosystem where innovators
their IT operations and are not hindered by excessive processes, rules,
later introducing virtualization technologies. and resource constraints. In this context, a
Cloud computing takes these steps to a new cloud computing service is a necessity. It
leveland allows an organization to further comprises
reduce costs through improved utilization, an automated framework that can deliver
reduced standardized services quickly and cheaply.
administration and infrastructure costs, and Cloud computing is a term used to describe
faster deployment cycles. The cloud is a next both a platform and type of application. A
generation platform that provides dynamic cloud
resource pools, virtualization, and high computing platform dynamically provisions,
availability. configures, reconfigures, and deprovisions
Cloud computing describes both a platform servers as
and a type of application. A cloud computing needed. Servers in the cloud can be physical
platform dynamically provisions, configures, machines or virtual machines. Advanced
reconfigures, and deprovisions servers as clouds
needed. typically include other computing resources
Cloud applications are applications that are such as storage area networks (SANs),
extended to be accessible through the Internet. network
These equipment, firewall and other security devices.
cloud applications use large data centers and Cloud computing also describes applications
powerful servers that host Web applications that are extended to be accessible through the
andWeb services. Internet. These cloud applications use large
data centers and powerful servers that host
2.Introduction Webapplications and Web services. Anyone
with a suitable Internet connection and a
standardbrowser can access a cloud
Cloud computing infrastructure accelerates application.
and fosters the adoption of innovations
Enterprises are increasingly making 3.Definition
innovation their highest priority. They realize A cloud is a pool of virtualized computer
they need to resources. A cloud can:
seek new ideas and unlock new sources of
value. Driven by the pressure to cut costs and
2. Host a variety of different workloads, The Cloud makes it possible to launch Web
including batch-style back-end jobs and 2.0 applications quickly and to scale up
interactive,user-facing applications applicationsas much as needed when needed.
Allow workloads to be deployed and scaled- The platform supports traditional Java™ and
out quickly through the rapid provisioning of Linux, Apache,
virtual machines or physical machines MySQL, PHP (LAMP) stack-based
Support redundant, self-recovering, highly applications as well as new architectures such
scalable programming models that allow as MapReduceand the Google File System,
workloads to recover from many unavoidable which provide a means to scale applications
hardware/software failures across thousands ofservers instantly
Monitor resource use in real time to enable architecture
rebalancing of allocations when needed
Cloud computing environments support grid
computing by quickly providing physical and
virtualservers on which the grid applications
can run. Cloud computing should not be
confused with
grid computing. Grid computing involves
dividing a large task into many smaller tasks
that runin parallel on separate servers. Grids
require many computers, typically in the 4. Enabling
thousands, andcommonly use servers,
desktops, and laptops. Technologies
Clouds also support nongrid environments, 4.1. Cloud Computing Application
such as a three-tier Web architecture running
standardor Web 2.0 applications. A cloud is
Architecture
more than a collection of computer resources
because acloud provides a mechanism to
manage those resources. Management includes
provisioning,
change requests, reimaging, workload
rebalancing, deprovisioning, and monitoring.
• Benefits
Cloud computing infrastructures can allow
enterprises to achieve more efficient use of
their IThardware and software investments.
They do this by breaking down the physical
This gives the basic architecture of a cloud
barriers inherentin isolated systems, and
computing application. We know
automating the management of the group of
systems as a single entity. that cloud computing is the shift of
Cloud computing is an example of an computing to a host of hardware
ultimately virtualized system, and a natural infrastructure thatis distributed in the cloud.
evolution for The commodity hardware infrastructure
data centers that employ automated systems consists of thevarious low cost data servers
management, workload balancing, and that are connected to the system and provide
virtualizationtechnologies. theirstorage and processing and other
A cloud infrastructure can be a cost efficient computing resources to the application.
model for delivering information services, Cloudcomputing involves running
reducingIT management complexity, applications on virtual servers that are
promoting innovation, and increasing allocated on thisdistributed hardware
responsiveness through realtime infrastructure available in the cloud. These
workload balancing. virtual servers are
Page 2 of 9
3. made in such a way that the different service resources by these virtual server instances.
level agreements and reliability issues One of these is the Xen hypervisor which
are met. provides an abstraction layer between the
There may be multiple instances of the hardware and the virtual OS so that the
same virtual server accessing the distribution of the resources and the
different parts of the hardware infrastructure processing is well managed.
available. This is to make sure that there Another application
are multiple copies of the applications which that is widely used is the Enomalism server
are ready to take over on another one’s management system which is used for
failure. management of the infrastructure platform.
The virtual server distributes the processing When Xen is used for virtualization of the
between the infrastructure and the servers over the infrastructure, a
computing is done and the result returned. thin software layer known as the Xen
There will be a workload distribution hypervisor is inserted between the server's
management system, also known as the grid hardware and the operating system. This
engine, for managing the different provides an abstraction layer that allows
requests coming to the virtual servers. This each physical server to run one or more
engine will take care of the creation of "virtual servers," effectively decoupling the
multiple copies and also the preservation of operating system and its applications from
integrity of the data that is stored in the the underlying physical server.
infrastructure. This will also adjust itself The Xen
such that even on heavier load, the hypervisor is a unique open source
processing is completed as per the technology, developed collaboratively by the
requirements. Xen
The different workload management community and engineers at over 20 of the
systems are hidden from the users. For the most innovative data center solution
user, the processing is done and the result vendors, including AMD, Cisco, Dell, HP,
is obtained. There is no question of where it IBM, Intel, Mellanox, Network Appliance,
was done and how it was done. The users Novell, Red Hat, SGI, Sun, Unisys, Veritas,
are billed based on the usage of the system - Voltaire, and Citrix. Xen is licensed
as said before - the commodity is now under the GNU General Public License
cycles and bytes. The billing is usually on (GPL2) and is available at no charge in both
the basis of usage per CPU per hour or GB source and object format.
data transfer per hour. The Xen hypervisor is also exceptionally
4.2. Server Architecture lean-- less than
50,000 lines of code. That translates to
extremely low overhead and near-native
performance for guests. Xen re-uses existing
device drivers (both closed and open
source) from Linux, making device
management easy. Moreover Xen is robust
to
device driver failure and protects both guests
and the hypervisor from faulty or
Cloud computing makes use of a large malicious drivers
physical resource pool in the cloud. As The Enomalism virtualized server
said above, cloud computing services and management system is a complete virtual
applications make use of virtual server server infrastructure platform. Enomalism
instances built upon this resource pool. helps in an effective management of the
There are two applications which help in resources. Enomalism can be used to tap into
managing the server instances, the resources the cloud just as you would into a
and also the management of the
Page 3 of 9
4. remote server. It brings together all the output key/value pairs. The user of the
features such as deployment planning, load MapReduce library expresses the
balancing, resource monitoring, etc. computation
Enomalism is an open source application. It as two functions: Map and Reduce.
has avery simple and easy to use web based Map, written by the user, takes an input pair
user interface. It has a module architecture and produces a set of
which allows for the creation of additional intermediate key/value pairs. The
system add-ons and plugins. It supports MapReduce library groups together all
one click deployment of distributed or intermediate
replicated applications on a global basis. It values associated with the same intermediate
supports the management of various virtual key I and passes them to the Reduce
environments including KVM/Qemu,
Amazon EC2 and Xen, OpenVZ, Linux
Containers, VirtualBox. It has fine grai
ned
user permissions and access privileges.
4.3. Map Reduce
Map Reduce is a software framework
developed at Google in 2003 to support
parallel computations over large (multiple
petabyte) data sets on clusters of
commodity computers. This framework is
The Reduce function, also written by the
largely taken from ‘map’ and ‘reduce’
user, accepts an intermediate key I
functions commonly used in functional
and a set of values for that key. It merges
programming, although the actual semantics
together these values to form a possibly
of the framework are not the same. It is a
smaller set of values. Typically just zero or
programming model and an associated
one output value is produced per Reduce
implementation for processing and
invocation. The intermediate values are
generating large data sets. Many of the real
supplied to the user's reduce function via an
world
iterator. This allows us to handle lists of
tasks are expressible in this model.
values that are too large to fit in memory.
MapReduce implementations have been
written in
C++, Java and other languages.
Programs written in this functional style are
automatically parallelized and
executed on the cloud. The run-time system
takes care of the details of partitioning
the input data, scheduling the program’s
execution across a set of machines, handling
machine failures, and managing the required
MapReduce achieves reliability by parceling
inter-machine communication. This
out a number of operations on
allows programmers without any experience
the set of data to each node in the network;
with parallel and distributed systems to
each node is expected to report back
easily utilize the resources of a largely
periodically with completed work and status
distributed system.
updates. If a node falls silent for longer
The computation takes a set of input
than that interval, the master node records
key/value pairs, and produces a set of
the node as dead, and sends out the node's
assigned work to other nodes. Individual
operations use atomic operations for naming
Page 4 of 9
5. file outputs as a double check to ensure that what processes are reading or writing to a
there are not parallel conflicting threads particular chunk, or taking a "snapshot" of
running; when files are renamed, it is the chunk pursuant to replicating it (usually
possible to also copy them to another name at the instigation of the Master server,
in when, due to node failures, the number of
addition to the name of the task (allowing copies of a chunk has fallen beneath the set
for side-effects). number). All this metadata is kept current by
4.4. Google File System the Master server periodically receiving
Google File System (GFS) is a scalable updates from each chunk server ("Heart-beat
distributed file system developed by messages").
Google for data intensive applications. It is Permissions for modifications are handled
designed to provide efficient, reliable by a system of time-limited, expiring
access to data using large clusters of "leases", where the Master server grants
commodity hardware. permission to a process for a finite period of
It provides fault tolerance time during which no other process will be
while running on inexpensive commodity granted permission by the Master server to
hardware, and it delivers high aggregate modify the chunk.
performance to a large number of clients. The modified chunkserver, which is always
Files are divided into chunks of 64 the primary chunk
megabytes, which are only extremely rarely holder, then propagates the changes to the
overwritten, or shrunk; files are usually chunkservers with the backup copies. The
appended to or read. changes are not saved until all chunkservers
It is also designed and acknowledge, thus guaranteeing the
optimized to run on computing clusters, the completion and atomicity of the operation.
nodes of which consist of cheap, Programs access the chunks by first
"commodity" computers, which means querying the Master server for the locations
precautions must be taken against the high of the desired chunks; if the chunks are not
failure rate of individual nodes and the being operated on (if there are no
subsequent data loss. Other design decisions outstanding leases), the Master replies with
select for high data throughputs, even when the locations, and the program then
it comes at the cost of latency. contacts and receives the data from the
The nodes are divided into two types: chunkserver directly. As opposed to many
one Master node and a large number of file
Chunkservers. Chunkservers store the data systems, it's not implemented in the kernel
files, with each individual file broken up of an Operating System but accessed
into fixed size chunks (hence the name) of through a library to avoid overhead.
about 64 megabytes, similar to clusters or 4.5. Hadoop
sectors in regular file systems. Each chunk is Hadoop is a framework for running
assigned a unique 64-bit label, and applications on large cluster built of
logical mappings of files to constituent commodity hardware. The Hadoop
chunks are maintained. Each chunk is framework transparently provides
replicated several times throughout the applications
network, with the minimum being three, but both reliability and data motion. Hadoop
even more for files that have high demand or implements the computation paradigm
need more redundancy. named MapReduce which was explained
The Master server doesn't usually store the above. The application is divided into many
actual chunks, but rather all the small fragments of work, each of which may
metadata associated with the chunks, such as be executed or re-executed on any node
the tables mapping the 64-bit labels to in the cluster. In addition, it provides a
chunk locations and the files they make up, distributed file system that stores data on the
the locations of the copies of the chunks,
Page 5 of 9
6. compute nodes, providing very high Facebook uses Hadoop to store copies of
aggregate bandwidth across the cluster. internal logs and dimension data sources a
Both use it as a source for reporting/analytics and
MapReduce and the distributed file system machine learning. The New York Times
are designed so that the node failures are made use of Hadoop for large scale image
automatically handled by the framework. conversions. Yahoo uses Hadoop to
Hadoop has been implemented making use support research for advertisement systems
of Java. In Hadoop, the combination of the and web searching tools. They also use it
entire JAR files and classed needed to run to do scaling tests to support development of
a MapReduce program is called a job. All of Hadoop
these components are themselves
collected into a JAR which is usually
5. Cloud Computing
referred to as the job file. To execute a job, it Services
is Even though cloud computing is a pretty
submitted to a jobTracker and then executed. new technology, there are many
Tasks in each phase are executed in a fault- companies offering cloud computing
tolerant manner. If node(s) fail in services. Different companies like Amazon,
the middle of a computation the tasks Google, Yahoo, IBM and Microsoft are all
assigned to them are re-distributed among players in the cloud computing services
the industry. But Amazon is the pioneer in the
remaining nodes. Since we are using cloud computing industry with services
MapReduce, having many map and reduce like EC2 (Elastic Compute Cloud) and S3
tasksenables good load balancing and allows (Simple Storage Service) dominating the
failed tasks to be re-run with smaller runtime industry. Amazon has an expertise in this
overhead. industry and has a small advantage over the
The Hadoop MapReduce framework has others because of this. Microsoft has good
master/slave architecture. It has a knowledge of the fundamentals of cloud
single master server or a jobTracker and science and is building massive data centers.
several slave servers or taskTrackers, one IBM, the king of business computing
per and traditional supercomputers, teams up
node in the cluster. The jobTracker is the with Google to get a foothold in the clouds.
point of interaction between the users and Google is far and away the leader in cloud
the framework. Users submit jobs to the computing with the company itself built
jobTracker, which puts them in a queue of from the ground up on hardware.
pending jobs and executes them on a first-
come first-serve basis. The jobTracker 5.1. Amazon Web Services
manages the assignment of MapReduce jobs The ‘Amazon Web Services’ is the set of
to the taskTrackers. The taskTrackers cloud computing services offered by
execute tasks upon instruction from the Amazon. It involves four different services.
jobTracker and also handle data motion They are Elastic Compute Cloud (EC2),
between the ‘map’ and ‘reduce’ phases of Simple Storage Service (S3), Simple Queue
the MapReduce job. Service (SQS) and Simple Database
Hadoop is a framework which has received a Service (SDB).
wide industry adoption. Hadoop 1. Elastic Compute Cloud (EC2)
is used along with other cloud computing Amazon Elastic Compute Cloud (Amazon
technologies like the Amazon services so as EC2) is a web service that
to make better use of the resources. There provides resizable compute capacity in the
are many instances where Hadoop has been cloud. It is designed to make webscale
used. Amazon makes use of Hadoop for computing easier for developers. It provides
processing millions of sessions which it uses on-demand processing
for analytics. This is made use of in a cluster power.
which has about 1 to 100 nodes.
Page 6 of 9
7. Amazon EC2's simple web service interface CPU, and instance storage that is optimal for
allows you to obtain and your application. Amazon EC2
configure capacity with minimal friction. It offers a highly reliable environment where
provides you with complete replacement instances can be
control of your computing resources and lets rapidly and reliably commissioned. Amazon
you run on Amazon's proven EC2 provides web service
computing environment. Amazon EC2 interfaces to configure firewall settings that
reduces the time required to obtain and control network access to and
boot new server instances to minutes, between groups of instances. You will be
allowing you to quickly scale capacity, charged at the end of each month for
both up and down, as your computing your EC2 resources actually consumed. So
requirements change. Amazon EC2 charging will be based on the
changes the economics of computing by actual usage of the resources.
allowing you to pay only for capacity 2. Simple Storage Service (S3)
that you actually use. Amazon EC2 provides S3 or Simple Storage Service offers cloud
developers the tools to build computing storage service.
failure resilient applications and isolate It offers services for storage of data in the
themselves from common failure cloud. It provides a high-availability
scenarios. large-store database. It provides a simple
Amazon EC2 presents a true virtual SQL-like language. It has been
computing environment, allowing designed for interactive online use. S3 is
you to use web service interfaces to storage for the Internet. It is designed
requisition machines for use, load them to make web-scale computing easier for
with your custom application environment, developers. S3 provides a simple web
manage your network's access services interface that can be used to store
permissions, and run your image using as and retrieve any amount of data, at
many or few systems as you desire. any time, from anywhere on the web. It
To set up an Amazon EC2 node we have to gives any developer access to the
create an EC2 node same highly scalable, reliable, fast,
configuration which consists of all our inexpensive data storage infrastructure that
applications, libraries, data and Amazon uses to run its own global network
associated configuration settings. This of web sites.
configuration is then saved as an AMI Amazon S3 allows write, read and delete of
(Amazon Machine Image). There are also objects containing from 1
several stock instances of Amazon byte to 5 gigabytes of data each. The number
AMIs available which can be customized of objects that you can store is
and used. We can then start, unlimited. Each object is stored in a bucket
terminate and monitor as many instances of and retrieved via a unique
the AMI as needed. developer-assigned key. A bucket can be
Amazon EC2 enables you to increase or located anywhere in Europe or the
decrease capacity within Americas but can be accessed from
minutes. You can commission one, hundreds anywhere. Authentication mechanisms are
or even thousands of server provided to ensure that the data is kept
instances simultaneously. Thus the secure from unauthorized access.
applications can automatically scale itself Objects can be made private or public, and
up and down depending on its needs. You rights can be granted to specific
have root access to each one, and users for particular objects. Also the S3
you can interact with them as you would any service also works with a pay only for
machine. You have the choice of what you use method of payment.
several instance types, allowing you to select 3. Simple Queue Service (SQS)
a configuration of memory, Amazon Simple Queue Service (SQS) offers
a reliable, highly
Page 7 of 9
8. scalable, hosted queue for storing messages infrastructure. App Engine applications are
as they travel between computers. easy to build, easy to maintain, and easy
By using SQS, developers can simply move to scale as your traffic and data storage
data between distributed needs grow. You can serve your app using a
components of their applications that free domain name on the appspot.com
perform different tasks, without losing domain, or use Google Apps to serve it from
messages or requiring each component to be your own domain. You can share your
always available application with the world, or limit access to
members of your organization. App Engine
costs nothing to get started. Sign up for a
free account, and you can develop and
publish your application at no charge and
with
no obligation. A free account can use up to
500MB of persistent storage and enough
CPU and bandwidth for about 5 million page
With SQS, developers can create an views a month.
unlimited number of SQS queues, Google App Engine makes it easy to build
each of which can send and receive an an application that runs reliably,
unlimited number of messages even under heavy load and with large
Messages can be retained in a queue for up amounts of data. The environment includes
to 4 days. It is simple, reliable, the
secure and scalable. following features:
4. Simple Database Service (SDB) • dynamic web serving, with full support for
Amazon SimpleDB is a web service for common web technologies
running queries on structured data • persistent storage with queries, sorting and
in real time. This service works in close transactions
conjunction with the Amazon S3 and • automatic scaling and load balancing
EC2, collectively providing the ability to • APIs for authenticating users and sending
store, process and query data sets in email using Google Accounts
the cloud. These services are designed to • a fully featured local development
make web-scale computing easier
environment that simulates Google App
and more cost-effective to developers.
Engine on your computer
Traditionally, this type of functionality
Google App Engine applications are
is accomplished with a clustered relational implemented using the Python
database, which requires a sizable
programming language. The runtime
upfront investment and often requires a
environment includes the full Python
DBA to maintain and administer them.
language
Amazon SDB provides all these without the
and most of the Python standard library.
operational complexity. It Applications run in a secure environment
requires no schema, automatically indexes
that
your data and provides a simple
provides limited access to the underlying
API for storage and access. Developers gain
operating system. These limitations allow
access to the different
App Engine to distribute web requests for
functionalities from within the Amazon’s the application across multiple servers, and
proven computing environment and
start and stop servers to meet traffic
are able to scale instantly and need to pay
demands.
only for what they use.
App Engine includes a service API for
5.2. Google App Engine integrating with Google Accounts.
Google App Engine lets you run your web Your application can allow a user to sign in
applications on Google's with a Google account, and access the
Page 8 of 9
9. email address and displayable name
associated with the account. Using Google
8. References
Accounts lets the user start using your 1.http://www.infoworld.com/article/08/04/07
application faster, because the user may not /15FE-cloud-computing-reality_1.html,
need to create a new account. It also saves “What Cloud Computing Really Means”
you the effort of implementing a user 2.
account system just for your application http://www.spinnakerlabs.com/CloudCompu
App Engine provides a variety of services ting.pdf
that enable you to perform common “Welcome to the new era of cloud
operations when managing your application. computing PPT”
The following APIs are provided to 3. http://www.johnmwillis.com/
access these services: Applications can “Demystifying Clouds” - discusses many
access resources on the Internet, such as web players in the cloud space
services or other data, using App Engine's 4 refer all the HiPODS white papers at
URL fetch service. Applications can send www.ibm.com/developerworks/websphere/zon
es/hipods/library.html
email messages using App Engine's mail
service. The mail service uses Google
infrastructure to send email messages. The
Image service lets your application
manipulate images. With this API, you can
resize, crop, rotate and flip images in
JPEG and PNG formats.
In theory, Google claims App Engine can
scale nicely. But Google currently
places a limit of 5 million hits per month on
each application. This limit nullifies App
Engine's scalability, because any small,
dedicated server can have this performance.
Google will eventually allow webmasters to
go beyond this limit (if they pay).
7. Conclusion
Cloud computing is a powerful new
abstraction for large scale data processing
systems which is scalable, reliable and
available. In cloud computing, there are
large
self-managed server pools available which
reduces the overhead and eliminates
management headache. Cloud computing
services can also grow and shrink according
to need. Cloud computing is particularly
valuable to small and medium businesses,
where effective and affordable IT tools are
critical to helping them become more
productive without spending lots of money
on in-house resources and technical
equipment. Also it is a new emerging
architecture needed to expand the Internet to
become the computing platform of the
future.
Page 9 of 9