You are on page 1of 266

LOYOLA INSTITUTE OF TECHNOLOGY

INFORMATION TECHNOLOGY/7th SEM

CS8791
CLOUD COMPUTING
-D.PRABHU AP/IT
Unit 1
 Introduction to Cloud Computing
 Definition of Cloud
 Evolution of Cloud Computing
 Underlying Principles of Parallel and Distributed
Computing
 Cloud Characteristics
 Elasticity in Cloud
 On-demand Provisioning
INTRODUCTION

 Cloud Computing provides us a means by which we can


access the applications as utilities, over the Internet. It allows
us to create, configure, and customize applications online.
 With Cloud Computing users can access database resources
via the internet from anywhere for as long as they need
without worrying about any maintenance or management of
actual resources.
What is Cloud?

The term Cloud refers to a Network or Internet. In other words, we

can say that Cloud is something, which is present at remote location.

Cloud can provide services over network, i.e., on public networks

or on private networks, i.e., LAN, MAN, WAN or VPN.

Applications such as e-mail, web conferencing, customer

relationship management (CRM), all run in cloud.


What is Cloud Computing?

Cloud Computing refers to manipulating, configuring, and


accessing the applications online.
It offers online data storage, infrastructure and application.

Cloud Computing is both a combination of software and hardware


based computing resources delivered as a network service.
CLOUD COMPUTING ARCHITECTURE
BASIC CONCEPTS

There are certain services and models working behind the scene
making the cloud computing feasible and accessible to end users.
Following are the working models for cloud computing:

1. Deployment Models
2. Service Models
DEPLOYMENT MODELS

Deployment models define the type of access to the

cloud, i.e., how the cloud is located? Cloud can have any

of the four types of access: Public, Private, Hybrid and

Community.
PUBLIC CLOUD : The Public Cloud allows systems and services to be
easily accessible to the general public. Public cloud may be less secure because of
its openness, e.g., e-mail.

PRIVATE CLOUD : The Private Cloud allows systems and services to be


accessible within an organization. It offers increased security because of its
private nature.

COMMUNITY CLOUD : The Community Cloud allows systems and


services to be accessible by group of organizations.

HYBRID CLOUD : The Hybrid Cloud is mixture of public and private


cloud. However, the critical activities are performed using private cloud while
the non-critical activities are performed using public cloud.
SERVICE MODELS

Service Models are the reference models on which the Cloud


Computing is based. These can be categorized into three basic
service models as listed below:
1.Infrastructure as a Service (IaaS)

2. Platform as a Service (PaaS)

3. Software as a Service (SaaS)


Infrastructure as a Service (IaaS)

IaaS is the delivery of technology infrastructure as an on demand


scalable service.
IaaS provides access to fundamental resources such as physical
machines, virtual machines, virtual storage, etc.

• Usually billed based on usage


• Usually multi tenant virtualized environment
•Can be coupled with Managed Services for OS and application
support
IaaS Examples
Platform as a Service (PaaS)

PaaS provides the runtime environment for applications,


development & deployment tools, etc.
PaaS provides all of the facilities required to support the complete
life cycle of building and delivering web applications and services
entirely from the Internet.
Typically applications must be developed with a particular platform
in mind
•Multi tenant environments
•Highly scalable multi tier architecture
PaaS Examples
Software as a Service (SaaS)
SaaS model allows to use software applications as a service
to end users.
SaaS is a software delivery methodology that provides
licensed multi-tenant access to software and its functions
remotely as a Web-based service.

 Usually billed based on usage


 Usually multi tenant environment
 Highly scalable architecture
SaaS
Examples
Do you Use the
Cloud?
ADVANTAGES

 Lower computer costs Improved


performance:
 Reduced software costs Instant software
updates
 Improved document format compatibility Unlimited storage
capacity
 Increased data reliability Universal document
access Latest version availability Easier group
collaboration Device independence
DISADVANTAGES

 Requires a constant Internet connection


 Does not work well with low-speed connections Features
might be limited
 Can be slow
 Stored data can be lost
 Stored data might not be secure
Cloud Storage

Create an Account User name


and password.

Content lives with the


account in the cloud.

Log onto any computer with


Wi-Fi to find your content
DOWNLOAD FOR STORAGE

 Download a cloud based app to on your computer


 The app lives on your Computer Save
files to the app
 When connected to the Internet it will sync with the cloud The
Cloud can be accessed from any Internet connection
M

J
Roughly every decade a new, lower priced computer class forms

based on a new programming platform, network, and interface

resulting in new usage and the establishment of a new industry.


r
■\
Request Resources

Negotiate Resource
Configurations i

NO
Resource
Availability

Resource Provisioning

IT Environment
A

Waste of 85% 85% 85% 85%


Resources
Maximum
Utilization 15% 15% 15% 15%
|^
App App App |App
OS OS OS OS
(Linux) (Linux) (Windows) (Windows)

H/W H/W H/W |^^H/W

HR Marketing Finance IT

Total 100% 100% 100 100%


Capacity %
T Capacity Utilization
W
60%

15% 15% 15% 15%


App ^App App App
OS OS
os os
VMs (Windows) (Windows)
(Linux) (Linux)
H/W
H/W H/W H/W
IT
HR Marketing Finance

Virtual Machine Monitor (VMM) / Hypervisor

Hardware

Total Capacity 100%

Virtualization
Dev ■ Test ■ Prod
99% Availability 99% Availability 99.99% Availability, Site Failover options,

| Virtualization |

Compute
Storage
?-. i

Virtualization
4

2
Cloud Computing

1
Virtualization

Server
Consolidation
Introduction to Parallel
Computing
What is Parallel Computing? (2)
 In the simplest sense, parallel computing is the simultaneous use of multiple
compute resources to solve a computational problem.
 To be run using multiple CPUs
 A problem is broken into discrete parts that can be solved concurrently
 Each part is further broken down to a series of instructions
 Instructions from each part execute simultaneously on different CPUs
What is Parallel Computing? (1)
 Traditionally, software has been written for serial
computation:
 To be run on a single computer having a single
Central Processing Unit (CPU);
 A problem is broken into a discrete series of
instructions.
 Instructions are executed one after another.
 Only one instruction may execute at any moment in
time.
Parallel Computing: The
computational problem

 The computational problem usually demonstrates


characteristics such as the ability to be:
 Broken apart into discrete pieces of work that can be
solved simultaneously;
 Execute multiple program instructions at any moment in
time;
 Solved in less time with multiple compute resources
than with a single compute resource.
Parallel Computing: what for? (1)
 Parallel computing is an evolution of serial computing that
attempts to emulate what has always been the state of affairs in
the natural world: many complex, interrelated events happening
at the same time, yet within a sequence.
 Some examples:
 Planetary and galactic orbits
 Weather and ocean patterns
 Tectonic plate drift
 Rush hour traffic in India
 Automobile assembly line
 Daily operations within a business
 Building a shopping mall
 Ordering a pizza at the drive through.
Parallel Computing: what for? (2)

 Traditionally, parallel computing has been considered to be


"the high end of computing" and has been motivated by
numerical simulations of complex systems and "Grand
Challenge Problems" such as:
 weather and climate
 chemical and nuclear reactions
 biological, human genome
 geological, seismic activity
 mechanical devices - from motor cycle to spacecraft
 electronic circuits
 manufacturing processes
Parallel Computing: what for? (3)
 Today, commercial applications are providing an equal or greater
driving force in the development of faster computers. These
applications require the processing of large amounts of data in
sophisticated ways. Example applications include:
 parallel databases, data mining
 oil exploration
 web search engines, web based business services
 computer-aided diagnosis in medicine
 management of national and multi-national corporations
 advanced graphics and virtual reality, particularly in the entertainment
industry
 networked video and multi-media technologies
 collaborative work environments
 Ultimately, parallel computing is an attempt to maximize the infinite
but seemingly scarce commodity called time.
Why Parallel Computing? (1)

 This is a legitime question! Parallel computing is


complex on any aspect!

 The primary reasons for using parallel computing:


 Save time - wall clock time
 Solve larger problems
 Provide concurrency (do multiple things at the same
time)
Why Parallel Computing? (2)

 Other reasons might include:


 Taking advantage of non-local resources - using available
compute resources on a wide area network, or even the
Internet when local compute resources are scarce.
 Cost savings - using multiple "cheap" computing
resources instead of paying for time on a
supercomputer.
 Overcoming memory constraints - single computers
have very finite memory resources. For large problems,
using the memories of multiple computers may
overcome this obstacle.
Who do Parallel Computing? (2)
Concepts and Terminology
Basic Design
 Basic design
 Memory is used to store both
program and data instructions
 Program instructions are coded data
which tell the computer to do
something
 Data is simply information to be used
by the program
 A central processing unit (CPU) gets
instructions and/or data from
memory, decodes the instructions
and then sequentially performs
them.
Flynn's Classical Taxonomy

 There are different ways to classify parallel


computers. One of the more widely used
classifications, in use since 1966, is called Flynn's
Taxonomy.
 Flynn's taxonomy distinguishes multi-processor
computer architectures according to how they can be
classified along the two independent dimensions of
Instruction and Data. Each of these dimensions can
have only one of two possible states: Single or
Multiple.
Flynn Matrix

 The matrix below defines the 4 possible classifications


according to Flynn
Single Instruction, Single Data (SISD)

 A serial (non-parallel) computer


 Single instruction: only one instruction
stream is being acted on by the CPU during
any one clock cycle
 Single data: only one data stream is being
used as input during any one clock cycle
 Deterministic execution
 This is the oldest and until recently, the
most prevalent form of computer
 Examples: most PCs, single CPU
workstations and mainframes
Single Instruction, Multiple Data
 A type of parallel computer (SIMD)
 Single instruction: All processing units execute the same instruction at any given
clock cycle
 Multiple data: Each processing unit can operate on a different data element
 This type of machine typically has an instruction dispatcher, a very high-bandwidth
internal network, and a very large array of very small-capacity instruction units.
 Best suited for specialized problems characterized by a high degree of
regularity,such as image processing.
 Synchronous (lockstep) and deterministic execution
 Two varieties: Processor Arrays and Vector Pipelines
 Examples:
 Processor Arrays: Connection Machine CM-2, Maspar MP-1, MP-2
 Vector Pipelines: IBM 9000, Cray C90, Fujitsu VP, NEC SX-2, Hitachi S820
Multiple Instruction, Single Data
(MISD)
 A single data stream is fed into multiple processing units.
 Each processing unit operates on the data independently via
independent instruction streams.
 Few actual examples of this class of parallel computer have ever
existed. One is the experimental Carnegie-Mellon C.mmp computer
(1971).
 Some conceivable uses might be:
 multiple frequency filters operating on a single signal stream
 multiple cryptography algorithms attempting to crack a single coded
message.
Multiple Instruction, Multiple Data
(MIMD)
 Currently, the most common type of parallel computer. Most
modern computers fall into this category.
 Multiple Instruction: every processor may be executing a different
instruction stream
 Multiple Data: every processor may be working with a different
data stream
 Execution can be synchronous or asynchronous, deterministic or
non-deterministic
 Examples: most current supercomputers, networked parallel
computer "grids" and multi-processor SMP computers - including
some types of PCs.
Parallel Computer Memory
Architectures
Memory architectures

 Shared Memory
 Distributed Memory
 Hybrid Distributed-Shared Memory
Shared Memory
 Shared memory parallel computers vary widely, but generally have
in common the ability for all processors to access all memory as
global address space.
 Multiple processors can operate independently but share the same
memory resources.
 Changes in a memory location effected by one processor are visible
to all other processors.
 Shared memory machines can be divided into two main classes
based upon memory access times: UMA and NUMA.
Shared Memory : UMA vs. NUMA

 Uniform Memory Access (UMA):


 Most commonly represented today by Symmetric Multiprocessor (SMP)
machines
 Identical processors
 Equal access and access times to memory
 Sometimes called CC-UMA - Cache Coherent UMA. Cache coherent means if
one processor updates a location in shared memory, all the other processors
know about the update. Cache coherency is accomplished at the hardware
level.
 Non-Uniform Memory Access (NUMA):
 Often made by physically linking two or more SMPs
 One SMP can directly access memory of another SMP
 Not all processors have equal access time to all memories
 Memory access across link is slower
 If cache coherency is maintained, then may also be called CC-NUMA - Cache
Coherent NUMA
Shared Memory: Adv. & Disadv.

 Advantages
 Global address space provides a user-friendly programming
perspective to memory
 Data sharing between tasks is both fast and uniform due to the
proximity of memory to CPUs
 Disadvantages:
 Primary disadvantage is the lack of scalability between memory and
CPUs. Adding more CPUs can geometrically increases traffic on the
shared memory-CPU path, and for cache coherent systems,
geometrically increase traffic associated with cache/memory
management.
 Programmer responsibility for synchronization constructs that insure
"correct" access of global memory.
 Expense: it becomes increasingly difficult and expensive to design and
produce shared memory machines with ever increasing numbers of
processors.
Distributed Memory
 Like shared memory systems, distributed memory systems vary widely but share a
common characteristic. Distributed memory systems require a communication
network to connect inter-processor memory.
 Processors have their own local memory. Memory addresses in one processor do not
map to another processor, so there is no concept of global address space across all
processors.
 Because each processor has its own local memory, it operates independently.
Changes it makes to its local memory have no effect on the memory of other
processors. Hence, the concept of cache coherency does not apply.
 When a processor needs access to data in another processor, it is usually the task of
the programmer to explicitly define how and when data is communicated.
Synchronization between tasks is likewise the programmer's responsibility.
 The network "fabric" used for data transfer varies widely, though it can can be as
simple as Ethernet.
Distributed Memory: Adv.& Disadv.

 Advantages
 Memory is scalable with number of processors. Increase the number of
processors and the size of memory increases proportionately.
 Each processor can rapidly access its own memory without interference
and without the overhead incurred with trying to maintain cache
coherency.
 Cost effectiveness: can use commodity, off-the-shelf processors and
networking.
 Disadvantages
 The programmer is responsible for many of the details associated with
data communication between processors.
 It may be difficult to map existing data structures, based on global
memory, to this memory organization.
 Non-uniform memory access (NUMA) times
Hybrid Distributed-Shared Memory
 The largest and fastest computers in the world today employ both shared and
distributed memory architectures.
 The shared memory component is usually a cache coherent SMP machine.
Processors on a given SMP can address that machine's memory as global.
 The distributed memory component is the networking of multiple SMPs. SMPs
know only about their own memory - not the memory on another SMP. Therefore,
network communications are required to move data from one SMP to another.
 Current trends seem to indicate that this type of memory architecture will continue to
prevail and increase at the high end of computing for the foreseeable future.
 Advantages and Disadvantages: whatever is common to both shared and distributed
memory architectures.
Fine-grain Parallelism
 Relatively small amounts of computational work
are done between communication events
 Low computation to communication ratio
 Facilitates load balancing
 Implies high communication overhead and less
opportunity for performance enhancement
 If granularity is too fine it is possible that the
overhead required for communications and
synchronization between tasks takes longer than
the computation.
Coarse-grain Parallelism
 Relatively large amounts of
computational work are done between
communication/synchronization events
 High computation to communication ratio
 Implies more opportunity for
performance increase
 Harder to load balance efficiently
Which is Best?
 The most efficient granularity is dependent on the
algorithm and the hardware environment in which it
runs.
 In most cases the overhead associated with
communications and synchronization is high relative
to execution speed so it is advantageous to have
coarse granularity.
 Fine-grain parallelism can help reduce overheads due
to load imbalance.
Amdahl's Law
Amdahl's Law states that potential program speedup is defined by
the fraction of code (P) that can be parallelized:

1
speedup = ------
1 - P

 If none of the code can be parallelized, P = 0 and the


speedup = 1 (no speedup). If all of the code is
parallelized, P = 1 and the speedup is infinite (in theory).
 If 50% of the code can be parallelized, maximum
speedup = 2, meaning the code will run twice as fast.
Amdahl's Law

 Introducing the number of processors performing the


parallel fraction of work, the relationship can be
modeled by
1
speedup = ------------
P + S
---
N

 where P = parallel fraction, N = number of processors


and S = serial fraction
Amdahl's Law

 It soon becomes obvious that there are limits to the


scalability of parallelism. For example, at P = .50, .90
and .99 (50%, 90% and 99% of the code is
parallelizable)
speedup
--------------------------------
N P = .50 P = .90 P = .99
----- ------- ------- -------
10 1.82 5.26 9.17
100 1.98 9.17 50.25
1000 1.99 9.91 90.99
10000 1.99 9.91 99.02
Distributed Computing
Introduction
• The numbers of real applications are still somewhat limited,
and the challenges--particularly standardization--are still
significant.

• But there's a new energy in the market, as well as some actual


paying customers, so it's about time to take a look at where
distributed processing fits and how it works.
How It Works

 A distributed computing architecture consists of


very lightweight software agents installed on a
number of client systems, and one or more
dedicated distributed computing management
servers.
 There may also be requesting clients with software
that allows them to submit jobs along with lists of
their required resources.
How It Works…
Distributed Computing
Management Server

• The servers have several roles.


• They take distributed computing requests and divide their
large processing tasks into smaller tasks that can run on
individual desktop systems (though sometimes this is done by
a requesting system).
• They send application packages and some client management
software to the idle client machines that request them.
• They monitor the status of the jobs being run by the clients.
Distributed vs. Other Trends
Application Characteristics

• Obviously not all applications are suitable for distributed


computing. The closer an application gets to running in real
time, the less appropriate it is.
• Even processing tasks that normally take an hour are two may
not derive much benefit if the communications among
distributed systems and the constantly changing availability of
processing clients becomes a bottleneck.
• Instead you should think in terms of tasks that take hours,
days, weeks, and months.
Types of Distributed Computing
Applications
Security and Standards
Challenges

• The major challenges come with increasing scale. As soon as


you move outside of a corporate firewall, security and
standardization challenges become quite significant.
• Most of today's vendors currently specialize in applications
that stop at the corporate firewall, though Avaki, in particular,
is staking out the global grid territory.
• Beyond spanning firewalls with a single platform, lies the
challenge of spanning multiple firewalls and platforms, which
means standards.
Advantages
• Economics:-
– Computers harnessed together give a better price/performance ratio
than mainframes.
• Speed:-
– A distributed system may have more total computing power than a
mainframe.
• Inherent distribution of applications:-
– Some applications are inherently distributed. E.g., an ATM-banking
application.
• Reliability:-
– If one machine crashes, the system as a whole can still survive if you
have multiple server machines and multiple storage devices
(redundancy).
Disadvantages
• Complexity :-
– Lack of experience in designing, and implementing a distributed
system. E.g. which platform (hardware and OS) to use, which language
to use etc.
• Network problem:-
– If the network underlying a distributed system saturates or goes down,
then the distributed system will be effectively disabled thus negating
most of the advantages of the distributed system.
• Security:-
– Security is a major hazard since easy access to data means easy access
to secret data as well.
Conclusion

• The advantages of this type of architecture for the right kinds


of applications are impressive.
• The most obvious is the ability to provide access to
supercomputer level processing power or better for a fraction
of the cost of a typical supercomputer.
Elasticity in
Cloud Computing
Elasticity in cloud computing
 In cloud computing, elasticity is defined as "the degree to which a system

is able to adapt to workload changes by provisioning and de-provisioning

resources in an autonomic manner, such that at each point in time the

available resources match the current demand as closely as possible".

 Elasticity is a defining characteristic that differentiates cloud computing

from previously proposed computing paradigms, such as grid computing.

The dynamic adaptation of capacity, e.g., by altering the use of computing

resources, to meet a varying workload is called "elastic computing".



Elasticity -Definition
What is elasticity?
The focus for many applications is scalability, which means the ability to scale
up. The idea of scalability is that your application can handle bursts of traffic or
resource-heavy jobs. This is handled by scaling up your architecture. A rule of
thumb is that if you provision more resources then you can handle more traffic.
There are two ways to scale:
Vertical – Adding resources to existing infrastructure. With cloud providers like
AWS, this usually means upgrading to higher plans with more computing
resources.
Horizontal – Provisioning more infrastructure and distributing workloads
across multiple instances. This method is generally more efficient for large
applications but requires more planning upfront.
An example of this situation is if your web application gets featured on a site
like Hacker News or Product Hunt. When this happens, you’re likely to get a
sudden rush of traffic. if you cannot scale up, then your application is likely to
cripple under the load. The results can be incredibly damaging to your
reputation – if people can’t use your site, they can’t see what you have to offer
Keep in mind
Static Scaling Vs Elastic Scaling
Scalability versus Elasticity
 Elasticity covers the ability to scale up but also the ability to scale down. The idea
is that you can quickly provision new infrastructure to handle a high load of traffic,
like the example above. But what happens after that rush? If you leave all of these
new instances running, your bill will skyrocket as you will be paying for unused
resources. In the worst case scenario, these resources can even cancel out revenue
from the sudden rush.
 An elastic system prevents this from happening. After a scaled up period, your
infrastructure can scale back down, meaning you will only be paying for your usual
resource usage and some extra for the high traffic period.
The key is that this all happens automatically. When resource needs meet a certain
threshold (usually measured by traffic), the system “knows” that it needs to de-
provision a certain amount of infrastructure, and does so.
What can elasticity do for you?
Elasticity offers a few key benefits:
 Ability to scale up and handle high volumes of traffic
 Ability to scale down and use less resources when needed
 Keeps your users happy and your reputation good (scaling up)
 Saves you money (scaling down)
All of these principles are related to a central problem – avoiding both
over-provisioning and under-provisioning. There is a fine line between
not having the resources to run your application and wasting money on
infrastructure you don’t need. Elasticity is all about smart, efficient
architecture that finds a balance between “not enough” and “too much.”
Big deal! How much could a couple extra
servers cost?

 If you run a small e-commerce store or personal side project,

your application is probably not big enough to require more than

a few servers. Part of what makes cloud services like AWS so

great is the low cost – you can run an EC2 instance for just a

few dollars per month. Having an extra server or two might not

seem like a big deal, and at that scale, it really isn’t.


The million server example

But what about giant companies like Microsoft, who have well over a million

servers? It’s a bit of an apples-to-oranges comparison since Microsoft owns their

own datacenters, but let’s ignore that for the sake of example

In a one million server environment, even a 1% margin of error (10,000 servers)

could be incredibly costly. Large companies often run dozens or even hundreds of

different applications. When a number of servers are dedicated to one application,

others can only scale up by creating entirely new instances.


The million server example
Let’s imagine a large company has application A, which runs on 1,000 servers, and
application B, which runs on another 1,000. So that’s a total of 2,000 instances. Now
suppose application A only needs 500 servers to perform its function efficiently, but
application B needs to scale up to 1,500 servers. In an elastic system, application A will
scale down, and the 500 under-utilized servers will be available for application B to use
when scaling up. Overall, the number of servers remains the same.
If the system was not designed with elasticity in mind, application B would simply
provision 500 new servers. Overall, this would increase the number of servers to 2,500.
The company is now paying for 500 servers they don’t need – even if each one only
costs a few dollars a month, that’s several thousand dollars wasted.
The million server example

 Now imagine this example at the scale of tens of


thousands of servers. Elasticity is absolutely critical to
not only performance but managing business costs. As
more and more companies move to the cloud, costs will
continue to grow. It’s easy to see the role of elasticity in
making this transition as smooth as possible.
How can you make your
application more elastic?
Apart from the benefits of being able to quickly scale up to handle
bursts of traffic or quickly scale down and save money on
resources, it’s important to know about elasticity as a concept. Not
many services offer the flexibility that AWS does with their
products. When choosing a cloud provider, it’s important to take
into consideration if they have some sort of ‘elasticity’ service.
Can you imagine spending your entire budget on a cloud provider
and spending weeks configuring your application and
infrastructure to work with their services to only find out that you
are stuck with the hardware you chose at the beginning of your
contract?
Elasticity on Amazon Web
Services
 Elasticity is at the core of many AWS products. Many of the services even have the word in their name:

 Elastic Compute Cloud

 Elastic Load Balancing

 Elastic Beanstalk

 AWS offers a feature called Auto Scaling, which is used with the Elastic Compute Cloud (EC2) service. Auto
scaling allows your EC2 instances to easily scale up or down depending on your requirements. Here are just a few
Auto Scaling features:

 Scale up automatically when demand increases

 Scale down automatically when demand subsides

 Replace unreachable or stalled EC2 instances to maintain high availability

 Receive SNS notifications when Auto Scaling initiates or completes an action

 AWS offers many ways to help make your application elastic. The Elastic Load Balancer scales automatically on
demand with the traffic it receives for your application. It can also integrate with the Auto Scaling on your back-end
services to offer an end to end scaling layer to handle different levels of traffic.


Purpose of Elasticity
 Elasticity aims at matching the amount of resource allocated to a service with
the amount of resource it actually requires, avoiding over- or under-
provisioning.
 Over-provisioning, i.e., allocating more resources than required, should be
avoided as the service provider often has to pay for the resources that are
allocated to the service. For example, an Amazon EC2 M4 extra-large
instance costs US$0.239/hour. If a service has allocated two virtual machines
when only one is required, the service provider wastes $2,095 every year.
Hence, the service provider's expenses are higher than optimal and
their profit is reduced.
 Under-provisioning, i.e., allocating fewer resources than required, must be
avoided, otherwise the service cannot serve its users with a good service. In
the above example, under-provisioning the website may make it seem slow or
unreachable. Web users eventually give up on accessing it, thus, the service
provider loses customers. On the long term, the provider's income will
decrease, which also reduces their profit.
Architecture of Elasticity
Cloud Characteristics
 On-demand self-service: A consumer can unilaterally provision
computing capabilities, such as server time and network storage,
as needed automatically without requiring human interaction with
each service provider.

 Broad network access: Capabilities are available over the


network and accessed through standard mechanisms that promote
use by heterogeneous thin or thick client platforms
(e.g., mobile phones, tablets, laptops and workstations).

94/2
Cloud Charecteristics
 Resource pooling: The provider's computing resources are pooled
to serve multiple consumers using a multi-tenant model, with
different physical and virtual resources dynamically assigned and
reassigned according to consumer demand. There is a sense of
location independence in that the customer generally has no
control or knowledge over the exact location of the provided
resources but may be able to specify location at a higher level of
abstraction (e.g., country, state or datacenter). Examples of
resources include storage, processing, memory and network
bandwidth.

 Rapid elasticity: Capabilities can be elastically provisioned and


released, in some cases automatically, to scale rapidly outward
and inward commensurate with demand. To the consumer, the
capabilities available for provisioning often appear to be unlimited
and can be appropriated in any quantity at any time.
95/2
Cloud Charecteristics
 Measured service: Cloud systems automatically control and
optimize resource use by leveraging a metering capability at some
level of abstraction appropriate to the type of service (e.g.,
storage, processing, bandwidth and active user accounts).
Resource usage can be monitored, controlled and reported,
providing transparency for the provider and consumer.

96/2
Cloud Computing for on-Demand Resource
Provisioning

97/2
On Demand Provisioning

Definition - What does Cloud Provisioning mean?


Cloud provisioning refers to the processes for the deployment
and integration of cloud computing services within an
enterprise IT infrastructure. This is a broad term that
incorporates the policies, procedures and an enterprise’s
objective in sourcing cloud services and solutions from a cloud
service provider.

98/2
Cloud provisioning
Cloud provisioning primarily defines how, what and when an organization
will provision cloud services. These services can be internal, public or
hybrid cloud products and solutions. There are three different delivery
models:
 Dynamic/On-Demand Provisioning: The customer or requesting
application is provided with resources on run time.
 User Provisioning: The user/customer adds a cloud device or device
themselves.
 Post-Sales/Advanced Provisioning: The customer is provided with the
resource upon contract/service signup.
From a provider’s standpoint, cloud provisioning can include the supply
and assignment of required cloud resources to the customer. For example,
the creation of virtual machines, the allocation of storage capacity and/or
granting access to cloud software.
1. Local on-Demand Resource
Provisioning
1. The Engine for the Virtual Infrastructure
The OpenNEbula Virtual Infrastructure Engine
• OpenNEbula creates a distributed virtualization layer
• Extend the benefits of VM Monitors from one to multiple resources
• Decouple the VM (service) from the physical location
• Transform a distributed physical infrastructure into a flexible and elastic virtual
infrastructure, which adapts to the changing demands of the VM (service) workloads
Any service, not only
cluster working nodes

100/
1. Local on-Demand Resource
Provisioning
Dedicated SGE working physical nodes
1.2. Virtualization of Cluster and HPC Systems
Separation of Resource Provisioning from Job Management
New virtualization layer between the service and the infrastructure layers
Seamless integration with the existing middleware stacks.
Completely transparent to the computing service and so end users
SGE Frontend
Virtualized SGE nodes

Dedicated SGE working physical nodes


VMM VMM VMM VMM

101/
1. Local on-Demand Resource
Provisioning
User Requests
SGE Frontend • SGE interface
• Virtualization overhead

Virtualized SGE nodes

OpenNebula
VMM VMM VMM

Dedicated SGE nodes Cluster Nodes

102/23
1. Local on-Demand Resource Provisioning
Cluster Consolidation
•Heuristics for dynamic capacity provision
leveraging VMM functionality (e.g. live migration)
•Reduce space, administration effort, power and
SGE Frontend cooling requirements or support the shutdown of
systems without interfering workload

Virtualized SGE nodes

OpenNebula
VMM VMM VMM

Dedicated SGE nodes Cluster Nodes

103/23
1. Local on-Demand Resource Provisioning
Cluster Partitioning
• Dynamic partition of the infrastructure
• Isolate workloads (several computing clusters)
SGE Frontend
• Dedicated HA partitions

Virtualized SGE nodes

OpenNebula
VMM VMM VMM

Dedicated SGE nodes Cluster Nodes

104/23
1. Local on-Demand Resource
Provisioning
Support of Heterogeneous Workloads
• Custom worker-node configurations (queues)
• Dynamic provision of cluster configurations
SGE Frontend Virtualized SGE nodes
• Example: on-demand VO worker nodes in Grids

OpenNebula
VMM VMM VMM

105/23
1. Local on-Demand Resource
Provisioning
On-demand resource provisioning
SGE Frontend

VIRTUAL INFRASTRUCTURE
Virtualized SGE nodes Virtualized Web server

OpenNebula
VMM VMM VMM

Dedicated SGE nodes Cluster Nodes

106/23
1. Local on-Demand Resource
Provisioning
Integration of Job Execution Managers with Virtualization
• VMs to Provide pre-Created Software Environments for Jobs
• Extensions of job execution managers to create per-job basis VMs so as to
provide a pre-defined environment for job execution
• Those approaches still manage jobs
• The VMs are bounded to a given PM and only exist during job execution
• Condor, SGE, MOAB, Globus GridWay…

• Job Execution Managers for the Management of VMs


• Job execution managers enhanced to allow submission of VMs
• Those approaches manage VMs as jobs
• Condor, “pilot” backend in Globus VWS…

107/23
1. Local on-Demand Resource
Provisioning
Differences between Job and VM Management
• Differences between VMs and Jobs as basic Management Entities
• VM structure: Images with fixed and variable parts for migration…
• VM life-cycle: Fixed and transient states for contextualization, live
migration…
• VM duration: Long time periods (“forever”)
• VM groups (services): Deploy ordering, affinity, rollback management…
• VM elasticity: Changing of capacity requirements and number of VMs

• Different Metrics in the Allocation of Physical Resources


• Capacity provisioning: Probability of SLA violation for a given cost of
provisioning including support for server consolidation, partitioning…
• HPC scheduling: Turnaround time, wait time, throughput…
108/23
1. Local on-Demand Resource
Provisioning
Other Tools for VM Management
• VMware DRS, Platform Orchestrator, IBM Director, Novell ZENworks,
Enomalism, Xenoserver…
• Advantages:
• Open-source (Apache license v2.0)
• Open and flexible architecture to integrate new virtualization technologies
• Support for the definition of any scheduling policy (consolidation, workload
balance, affinity, SLA…)
• LRM-like CLI and API for the integration of third-party tools

109/23
2. Remote on-Demand Resource
Provisioning
What is Cloud Computing?

• Provision of virtualized resources as a service

VM Management Interfaces
• Submission
• Control
• Monitoring

Infrastructure Cloud Computing Solutions

• Commercial Cloud: Amazon EC2


• Scientific Cloud: Nimbus (University of Chicago)
• Open-source Technologies
• Globus VWS (Globus interfaces)
• Eucalyptus (Interfaces compatible with Amazon EC2)
• OpenNEbula (Engine for the Virtual Infrastructure)
110/23
2. Remote on-Demand Resource
Provisioning
On-demand Access to Cloud Resources
• Supplement local resources with cloud resources to satisfy peak or fluctuating
demands

SGE Frontend

Virtualized SGE nodes

OpenNebula
VMM VMM VMM

Dedicated SGE nodes Cluster Nodes


111/23
2. Remote on-Demand Resource
Provisioning
Grid and Cloud are Complementary
• Grid interfaces and protocols enable the interoperability between the clouds
or infrastructure providers
• Grid as technology for federation of administrative domains (not as
infrastructure for job computing)

• Grid infrastructures for computing are one of the service use cases that could
run on top of the cloud

112/23
2. Remote on-Demand Resource
Who? Provisioning
• IBM (coordinator), Sun, SAP, ED, TID, UCM, UNIME, UMEA, UCL, USI, CETIC,
Thales and OGF-Europe
• 17-million and 3-year project partially funded by the European Commission
(NESSI Strategic Project)
What?
• The Next Generation Infrastructure for Service Delivery, where resources and
services can be transparently and dynamically managed, provisioned and
relocated like utilities – virtually “without borders”

How?
• Integration of virtualization technologies with grid computing driven by new
techniques for business service management

Virtualization - Aware Grid Grid - Aware Virtualization BSM


e.g., VM as management unit
for metering and billing
+ e.g., live migration across
administrative domains
+ e.g., policy- based manag.
of service -level agreement
= SOI

113/23
2. Remote on-Demand Resource
Provisioning
A Project Driven by Business Use Cases
• Scenario 1: SAP business application (SAP)
• Business application oriented use cases and the opportunities to execute
them on a flexible infrastructure.
• Scenario 2: Telco application (TID)
• Hosting web sites that deals with massive access (e.g., the Olympics
games)
• Scenario 3: Utility computing (Sun)
• Deploy arbitrary operating system and application stacks on remote
resources
• Scenario 4: eGov application (Thales)
• Automatic adjustment of resources and domains cooperation

114/23
2. Remote on-Demand Resource Provisioning
The Architecture, main Components and Interfaces
Organize the placement of VEEs to
Monitor service and enforce SLA
meet optimization policies and
compliance by managing number
constraints
and capacity of service
components (VEEs)

Support advanced new functionality


for performance and relocation
optimization

115/23
2. Remote on-Demand Resource
Provisioning
The VEE Manager (OpenNEbula based)
• Generic and independent of the underlying virtualization technology
• Open source and based on standards (Grid & Virtualization OGF WG)
• Automatic provision of VEEs to meet pre-defined infrastructure site policies for
SLA commitment
• VEE groups (forming a single service) with affinity rules, deployment ordering
rules, rollback policies, elasticity management…
• Access to remote grid sites, supporting on-demand access and federation of
data-centers (GT4 Interfaces are being evaluated)

116/23
Unit 2
 Service Oriented Architecture
 REST and Systems of Systems
 Web Services
 Basics of Virtualization
 Types of Virtualization
 Implementation Levels of Virtualization
 Virtualization Structures / Tools and Mechanisms
 Virtualization of CPU –Memory – I/O Devices
 Virtualization Support and Disaster Recovery
Cloud Computing and SOA
What is Service Oriented Architecture
(SOA)?

The Service Oriented Architecture is an architectural design


which includes collection of services in a network which
communicate with each other. The complication of each service is
not noticeable to other service. The service is a kind of operation
which is well defined, self contained that provides separate
functionality such as checking customer account details, printing
bank statements etc and does not depend on the sate of other
services.
Why to use Service Oriented Architecture
(SOA)?

 SOA is widely used in market which responds quickly and


makes effective changes according to market situations.
 The SOA keep secret the implementation details of the
subsystems.
 It allows interaction of new channels with customers,
partners and suppliers.
 It authorizes the companies to select software or hardware
of their choice as it acts as platform independence
Service Oriented Architecture (SOA)
Features
 SOA uses interfaces which solves the difficult integration
problems in large systems.
 SOA communicates customers, providers and suppliers with
messages by using the XML schema.
 It uses the message monitoring to improve the performance
measurement and detects the security attacks.
 As it reuses the service, there will be lower software
development and management costs.
Service Oriented Architecture (SOA)
Advantages
 SOA allows reuse the service of an existing system alternately
building the new system.
 It allows plugging in new services or upgrading existing
services to place the new business requirements.
 It can enhance the performance, functionality of a service and
easily makes the system upgrade.
 SOA has capability to adjust or modify the different external
environments and large applications can be managed easily.
 The companies can develop applications without replacing the
existing applications.
 It provides reliable applications in which you can test and
debug the independent services easily as compared to large
number of code.
Service Oriented Architecture (SOA)
Disadvantages
 SOA requires high investment cost (means large investment
on technology, development and human resource).
 There is greater overhead when a service interacts with
another service which increases the response time and
machine load while validating the input parameters.
 SOA is not suitable for GUI (graphical user interface)
applications which will become more complex when the SOA
requires the heavy data exchange.
SOA - Service Categories
SOA - Service Categories
Entity Service
The entity services include entities of customer such as purchase
order, insurance policy, invoice of order, ordered date etc in which
you can perform CRUD operations such as Create, Read, Delete and
Update on the entities. These services provide information of the
business process stored in the databases and handle the business
entities.
Task Service
The task service adds the business logic to other services and due to
its focus on business entity, it contains low amount of reusability.
Task services provide operations on more than one entity such as
customer purchase order, creating purchase order number, validating
customer details etc. A service is called as task service when it needs
to access the multiple entities.
SOA - Service Categories
Utility Service
The utility services are technology oriented services which are used
to build larger and higher level services and provides other
capabilities which are unrelated to the message transfer. The utility
services provide reusable functions such as event logging, creating
unique number and notification etc to the other functional domains.
These services contain small, closely packed services which are used
as building blocks in service oriented system.
Proxy Service
The proxy services contain the services which act as connection
between members of the service oriented system and conflict
subsystem. The device and process services lie under this type of
services. Sometimes services which are defined under proxy services
are called as gateway services.
SOA - Service Categories
Device Service
The device service is a kind of proxy service which is referred as hardware
device and used to communicate between other services. The device service
does not include the API which is not well suited with the service oriented
system.
Process Service
The device service is also a kind of process service which acts as interpreter
between application and service oriented system members. This service
creates and arranges the application services to implement the business
processes.
Business Service
Business services are also known as controller service which provides
business functions for the completion of the business process and are
flexible services that changes the business needs. These services develop
the business applications that automate the business process such as
managing the customer service, shipping the customer product etc.
SOA Blueprint
SOA Concepts in Cloud Computing
SOA Concepts in Cloud Computing

 Infrastructure-as-a-Service (IaaS): It provides a hardware as a


service.
 Platform-as-a-Service (PaaS): It provides end-users an application
development environment delivered over the internet.
 Software-as-a-Service (SaaS): It provides end-users a standardized,
network-delivered IT applications.
SOA Concepts in Cloud Computing
 The distinctions are made according to availability and the
location of installation in the deployment models. Private clouds
are internal company services whereas public clouds are the
services that are available to the public on internet.
 In the large companies where IT plays an important role, internal
company cloud solutions are often built in their own data centers.
Small and medium companies often use public cloud services.
Cloud Computing provides a very flexible and scalable platform
through processing external services and also has the ability to
connect with customers, suppliers etc.
The Evolution of IT and IT
 IT in Business Infrastructure
 Past
 Operation support
 Individual project based decision
 Ad hoc and technology driven implementation
 Current Trend
 Involved into business strategies and decisions (the agility of business
depends heavily on the flexibility of IT for automation)
 Have long-term blueprint and big pictures as guidance (strategic plan and
EA)
 IT Infrastructure
 Past
 Hardware, software, network components
 Infrastructure silos
 Current Trend
 IT infrastructure is a line of business; is a segment in Enterprise
Architecture
 Service Oriented Infrastructure (infrastructure as a commodity service)
 Cloud Computing (promoted by Federal CIO, facilitated by industries)
Business Evolution Associated with IT
1 2 3
Business Online Integrated Business Business On Demand

 Backend IT system  Flexible IT infrastructure


 Web access via integration (SOI, IPv6, mobility,
static web pages (interoperation across virtualization, cloud
Systems, e.g. EAI) computing)

 Web access with  Dynamic and adaptive


 Business integration
web applications business processes
(EA efforts across
 Online transactions organizational (EDA, service on
with connections to demand)
stove pipes, SOA)
backend applications

Integration of both Collaborative and


Online presentation
business and IT dynamic business

The Evolution Path

Enhanced IT Role in Business


Concepts: EA, SOA, SOEA, SOI, SOE,
Cloud Computing
 Enterprise Architecture (EA): is an established discipline that deals with
architectures in enterprise scope. It’s a subject domain that is independent of
approaches and methodologies for its development and presentation
 Service Oriented Architecture (SOA): is an architecture style and approach that
emphasizes well-defined, loosely coupled, and sharable services
 Service Oriented Enterprise Architecture (SOEA): EA modeling with service-
oriented style and approach
 EA provides SOA with an enterprise view
 SOA as a practical modeling approach for appropriate part of EA development,
which enables solution architectures and implementation by layered service
components across business, application, and technology.
 Service Oriented Infrastructure (SOI): apply service orientation to IT infrastructure
 Service Oriented Enterprise (SOE): is an enterprise that applies service
orientation to its full scope business management and operations where
appropriate.
 Cloud Computing: is a computing model in which dynamically scalable and on-
demand resources are provided as services from location independent resource
pool via shared network.
Service Oriented Domain in Service Oriented Enterprise

SOE
Domain

Enterprise Service Enterprise Service


Planning Portfolio
& Architectures Management

Enterprise Service Enterprise Service


Lifecycle Programs
& Governance & Projects

Service Oriented
Domain
Service Oriented Infrastructure
Framework
Service Service Service Service
Planning Systems Management Stakeholders

• External and Internal • System operation


• Business processes • Business decision
drivers management
and services makers
• Strategies and • IT service
• Application services • Service providers
objectives management (ITIL)
• Data services • Service consumers
• Economics and • Service Lifecycle
• Infrastructure • Elected officials and
business cases • Business
services regulatory bodies
• Business plan and transformation and
• Servers, storages, • Industry associations
models change
networks and standards groups
• Segment Enterprise
management
• Data center facilities • Contractual
Architectures
management
• Performance
measurement model
Security
Governance
REST (REpresentational State Transfer)

REST (REpresentational State Transfer) is an architectural style


for developing web services. REST is popular due to its simplicity
and the fact that it builds upon existing systems and features of the
internet's Hypertext Transfer Protocol (HTTP) in order to achieve
its objectives, as opposed to creating new standards, frameworks
and technologies.
Advantages of REST

 A primary benefit of using REST, both from a client and


server's perspective, is REST-based interactions happen using
constructs that are familiar to anyone who is accustomed to
using the internet's HTTP.
 An example of this arrangement is REST-based interactions all
communicate their status using standard HTTP status codes. So,
a 404 means a requested resource wasn't found; a 401 code
means the request wasn't authorized; a 200 code means
everything is OK; and a 500 means there was an unrecoverable
application error on the server
Advantages of REST
 Similarly, details such as encryption and data transport integrity are
solved not by adding new frameworks or technologies, but instead
by relying on well-known Secure Sockets Layer (SSL) encryption
and Transport Layer Security (TLS). So, the entire REST
architecture is built upon concepts with which most developers are
already familiar.
 REST is also a language-independent architectural style. REST-
based applications can be written using any language, be it Java,
Kotlin, .NET, AngularJS or JavaScript. As long as a programming
language can make web-based requests using HTTP, it is possible
for that language to be used to invoke a RESTful API or web
service. Similarly, RESTful web services can be written using any
language, so developers tasked with implementing such services
can choose technologies that work best for their situation.
Advantages of REST

 The other benefit of using REST is its pervasiveness. On the server


side, there are a variety of REST-based frameworks for helping
developers create RESTful web services, including RESTlet and
Apache CXF. From the client side, all of the new JavaScript
frameworks, such as JQuery, Node.js, Angular and EmberJS, all
have standard libraries built into their APIs that make invoking
RESTful web services and consuming the XML- or JSON-based
data they return a relatively straightforward endeavor.
Disadvantages of REST
 The benefit of REST using HTTP constructs also creates
restrictions, however. Many of the limitations of HTTP likewise
turn into shortcomings of the REST architectural style. For
example, HTTP does not store state-based information between
request-response cycles, which means REST-based applications
must be stateless and any state management tasks must be
performed by the client.
 Similarly, since HTTP doesn't have any mechanism to send push
notifications from the server to the client, it is difficult to implement
any type of services where the server updates the client without the
use of client-side polling of the server or some other type of web
hook.
Disadvantages of REST

 From an implementation standpoint, a common problem with REST


is the fact that developers disagree with exactly what it means to be
REST-based. Some software developers incorrectly consider
anything that isn't SOAP-based to be RESTful. Driving this
common misconception about REST is the fact that it is an
architectural style, so there is no reference implementation
or definitive standard that will confirm whether a given design is
RESTful. As a result, there is discourse as to whether a given API
conforms to REST-based principles.
Alternatives to REST

 Alternate technologies for creating SOA-based systems or


creating APIs for invoking remote microservices include XML
over HTTP (XML-RPC), CORBA, RMI over IIOP and the Simple
Object Access Protocol (SOAP).
 Each technology has its own set of benefits and drawbacks, but
the compelling feature of REST that sets it apart is the fact that,
rather than asking a developer to work with a set of custom
protocols or to create a special data format for exchanging
messages between a client and a server, REST insists the best
way to implement a network-based web service is to simply use
the basic construct of the network protocol itself, which in the
case of the internet is HTTP.
Alternatives to REST

 This is an important point, as REST is not intended to apply just


to the internet; rather, its principles are intended to apply to all
protocols, including WEBDAV and FTP.
History of REST

 REST was first coined by computer scientist Roy Fielding in his


year-2000 Ph.D. dissertation at the University of California,
titled Architectural Styles and the Design of Network-based
Software Architectures.
 Chapter 5 of the dissertation, "Representational State Transfer
(REST)," described Fielding's beliefs about how best to architect
distributed hypermedia systems. Fielding noted a number of
boundary conditions that describe how REST-based systems should
behave. These conditions are referred to as REST constraints, with
four of the key constraints described below:
History of REST

 Use of a uniform interface (UI). As stated earlier, resources in


REST-based systems should be uniquely identifiable through a
single URL, and only by using the underlying methods of the
network protocol, such as DELETE, PUT and GET with HTTP,
should it be possible to manipulate a resource.
 Client-server based. In a REST-based system, there should be a
clear delineation between the client and the server. UI and request-
generating concerns are the domain of the client. Meanwhile, data
access, workload management and security are the domain of the
server. This separation allows loose coupling between the client and
the server, and each can be developed and enhanced independent of
the other.
History of REST

 Stateless operations.All client-server operations should be


stateless, and any state management that is required should happen
on the client, not the server.
 RESTful resource caching. The ability to cache resources between
client invocations is a priority in order to reduce latency and
improve performance. As a result, all resources should allow
caching unless an explicit indication is made that it is not possible.
What is REST architecture?

 REST stands for REpresentational State Transfer. REST is web


standards based architecture and uses HTTP Protocol. It
revolves around resource where every component is a resource
and a resource is accessed by a common interface using HTTP
standard methods. REST was first introduced by Roy Fielding in
2000.
 In REST architecture, a REST Server simply provides access to
resources and REST client accesses and modifies the resources.
Here each resource is identified by URIs/ global IDs. REST uses
various representation to represent a resource like text, JSON,
XML. JSON is the most popular one.
What is REST architecture?

 HTTP methods
 Following four HTTP methods are commonly used in REST
based architecture.
 GET − Provides a read only access to a resource.
 POST − Used to create a new resource.
 DELETE − Used to remove a resource.
 PUT − Used to update a existing resource or create a new
resource.
Introduction to RESTFul web services
 A web service is a collection of open protocols and standards
used for exchanging data between applications or systems.
Software applications written in various programming languages
and running on various platforms can use web services to
exchange data over computer networks like the Internet in a
manner similar to inter-process communication on a single
computer. This interoperability (e.g., between Java and Python, or
Windows and Linux applications) is due to the use of open
standards.
 Web services based on REST Architecture are known as RESTful
web services. These webservices uses HTTP methods to
implement the concept of REST architecture. A RESTful web
service usually defines a URI, Uniform Resource Identifier a
service, provides resource representation such as JSON and set of
HTTP Methods.
Introduction to RESTFul web services
 setup JDK, Tomcat and Eclipse on your machine before you
the Jersey Framework is setup.
WEB SERVICES
12/04/09 / © 2007 Netsoft USA / Proprie

vices
Introduction and Testing

Prepared by Marine Yegoryan


2008
Introduction to Web
Services
Today, companies rely on thousands of different software
applications each with their own role to play in running a
business. These different software applications run on a wide
range of different platforms and operating systems, and they are
implemented in different programming languages. As a result, it is
very difficult for different applications to communicate with one
another and share their resources in a coordinated way.

12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netso


What are Web Services?

 Web services are application components

 Web services communicate using open protocols

 Web services are self-contained and self-describing

 Web services can be used by other applications XML is

the basis for Web services

15
12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netsoft-usa.com
4
Why Web Services?
Interoperability has highest priority.
 When all major platforms could access the Web using Web
browsers, different platforms could interact. For these
platforms to work together, Web applications were developed.
 Web applications are simple applications run on the web.
These are built around the Web browser standards and can
mostly be used by any browser on any platform.

Web services take Web applications to the next level.


 Using Web services your application can publish its function
or message to the rest of the world.
 Web services uses XML to code and decode your data and
SOAP to transport it using open protocols.
12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netsoft-ua.
Why Web Services?
Web services have two types of uses.
 Reusable application components. Ideally, there will
only be one type of each application component, and
anyone can use it in their application.

Connect existing software


 Web services help solve the interoperability problem by giving
different applications a way to link their data.
 Using Web services you can exchange data between
different applications and different platforms.

12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential\


The base of WS
 The basic Web services platform is XML + HTTP.
 The HTTP protocol is the most used Internet protocol.
 XML provides a language which can be used between
different platforms and programming languages and still
express complex messages and functions.
Web services platform elements

SOAP (Simple Object Access Protocol) WSDL (Web


Services Description Language)

15
12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netsoft-usa.com
7
What is SOAP?
The basic Web services platform is XML plus HTTP.

 SOAP stands for Simple Object Access Protocol


 SOAP is a communication protocol
 SOAP is for communication between applications
 SOAP is a format for sending messages
 SOAP is designed to communicate via Internet
 SOAP is platform independent
 SOAP is language independent
 SOAP is based on XML
 SOAP is simple and extensible
 SOAP allows you to get around firewalls
 SOAP will be developed as a W3C standard
12/04/09 / © 2007 Netsoft USA / Proprietary and
What is WSDL?
WSDL is an XML-based language for describing Web services
and how to access them.

 WSDL stands for Web Services Description


Language WSDL is written in XML
 WSDL is an XML document
 WSDL is used to describe Web services
 WSDL is also used to locate Web
services
 WSDL is not yet a W3C standard

15
12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netsoft-usa.com
9
Web Service Architecture
How to test a web service?

As a web service is something that has no user interface, we


can’t interact with it without a special tool. That tool should
allow composing XML requests via its own user interface.
Commonly such user interfaces are text editors where you
write your XML requests and controls for posting requests to
the server.

16
12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netsoft-usa.com
1
How to test a web service?
Project structure. As in every well-established testing activity, We
start with test specification. The main part of a test specification is
test cases divided into test areas. Visual Studio allows structuring
your test project into test suites (the same as test areas in our test
specification) that contain test cases, which can contain test steps,
you can add, modify, delete and change order of every item in the
structure.

12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netsoft-usa.com 162


How to test a web service?

Test cases. Visual Sdudio provides enough convenient tools to


manage and run our test cases, and view result in test requests.

Load Testing. You can perform Load Testing.

12/04/09 / © 2007 Netsoft USA / Proprietary and Confidential / www.netsoft-usa.com 163


How to test a web service?
Automation. But what if your web service contains too many
methods with too many input and output parameters? It may take
several days for each complete test of your web service if your tool
does not provide functionality to automate your testing. You can
automate validation of your web service’s response against you
input. You can automate the output of validation results into a file
(which could be just a text file of HTML depending on your
choice).
12/04/09 / © 2007 Netsoft USA / Proprietary and
Relationship between SOA,
Web Services, Cloud omputing

12/04/09 / © 2007 Netsoft USA / Proprietary and


Amazon History

2014:
2005: Amazon
Amazon Prime
1994: Jeff Bezos 2007: 2012: Amazon Now
Incorporated the Publishing Kindle Game Studios
Launched Launched
Company Launched Launched

1995: 2006: 2011: 2013: 2015:


Amazon.com Amazon Amazon Amazon Amazon
Launched Web Fresh Art Home
Online Services Launched Launched Services &
Bookstore (AWS) Amazon
Launched Echo
Launched

1
6
© 2016 Amazon Web Services, Inc. or its affiliates. All rights 6
What is cloud computing?

Cloud computing is on-demand delivery of IT resources and


applications via the Internet with pay-as-you-go pricing.

1
6
© 2016 Amazon Web Services, Inc. or its affiliates. All rights 7
Measured Service
Pay for services as you go.

Electrical services
analogy

1
6
© 2016 Amazon Web Services, Inc. or its affiliates. All rights 8
Amazon Web Services (AWS)
Enable businesses and developers to use web services to build
scalable, sophisticated applications.

Storage
Development and
Management Tools
Analytics Content Delivery
Messaging Compute
App Services
Database Payments
Mobile
Networking
On-Demand Workforce
VPC

1
6
© 2016 Amazon Web Services, Inc. or its affiliates. All rights 9
AWS Core Infrastructure and Services
Traditional Infrastructure Amazon Web Services
Security Security
Security

Firewalls ACLs Administrators Security Groups NACLs AWS IAM


Security Groups NACLs Access Mgmt

Network Network
Networking
VPC
“Public
Router Network Pipeline Switch ELB

Provision EC2 “Classic”
VPC
ELB
On-Demand
Servers

On-Premises Servers AMI Amazon EC2 Instances

Storage
and
DAS SAN NAS RDBMS Database Amazon Amazon Amazon Amazon
EBS EFS S3
AW© S Tech nical E ssentials 3.8 ILT
2016 Amazon W eb Services, Inc. or its affiliates . All rights reserved. RDS 8
On-Demand Self Services & Broad
Network Access
 User provisions computing resources as needed.
 User interacts with cloud service provider through an
online control panel.
 Clear solutions are available through a variety of network-
connected devices and over varying platforms.

client mobile client Internet

© 2016 Amazon Web Services, Inc. or its affiliates. All rights 12


AWS Global Infrastructure

© 2016 Amazon Web Services, Inc. or its affiliates. All rights 13


AWS Global Infrastructure

Regions
 Geographic locations
 Consists of at least two Availability Zones(AZs)

Availability Zones
 Clusters of data centers
 Isolated from failures in other Availability Zones

© 2016 Amazon Web Services, Inc. or its affiliates. All rights 14


Achieving High Availability Using
Multi-AZ

Region

Availability
Zone - A
Availability Zone -
B

Availability Zone -
C

© 2016 Amazon Web Services, Inc. or its affiliates. All rights 15


AWS Global Infrastructure
At least 2 AZs per region.
Examples:
 US East (N. Virginia)
• us-east-1a  Asia Pacific (Tokyo)
• us-east-1b • ap-northeast-1a
• ap-northeast-1b
• ap-northeast-1c
US East (VA) Asia Pacific
• us-east-1c (Tokyo)

• us-east-1d
AZ - A AZ - B
• us-east-1e AZ - A AZ - B

AZ - C AZ - D
AZ - C

AZ - E

Note: Conceptual drawing only. The number of Availability Zones (AZ) may vary.

© 2016 Amazon Web Services, Inc. or its affiliates. All rights 16


AWS Customers
Enterprise Customers Startup Customers Public Sector Customers

© 2016 Amazon Web Services, Inc. or its affiliates. All rights 17


What Is Virtualization ?

 Virtualization is a Technology that


transforms hardware into software.
 Virtualization allows to run multiple
operating systems as virtual
machines.
 Each copy of an operating
system is installed in to a
virtual machine.
How Does Virtualization Work ?
 A Virtualization layer is installed.
 Uses Bare-metal or Hosted Hypervisor architecture.
 A bare-metal hypervisor system does not require
operating system.
 Hypervisor is operating system.
 Host based Virtualization requires operating system(windows or
linux) installed on the computer.
 Virtualization layer installed as application on operating
system.
 VMWare Server is free application supported by
windows or linux.
What Is A Virtual Machine ?
 Isolated guest operating system
installation within a normal host
operating system.
 From the user perspective, virtual
machine is software platform
like physical computer that runs
operating systems and apps.
 Virtual machines posses
hardware virtually.
Full Virtualization
Full virtualization uses a special
kind of software called a
hypervisor. The hypervisor
interacts directly with the
physical server's CPU and disk
space. It serves as a platform
for the virtual servers' operating
systems.
Para Virtualization

The para- virtualization


approach is a little
different than the full
virtualization technique,
the guest servers in a para-
virtualization system are
aware of one another.
OS Level Virtualization

An OS-level virtualization
approach doesn't use a
hypervisor at all.
Instead, the virtualization
capability is part of the
host OS, which performs
all the functions of a fully
virtualized hypervisor
Virtualization Allows
Transformation of a Server for
Multiple Applications
Server virtualization
 Creating multiple logical server OS instances on one
physical piece of hardware
 Hypervisor is installed on one physical server
 Multiple instances of server OS are installed.
Server Virtualization
Server Virtualization
 The VMs created on one physical server can be run
another physical server.
 Failure in one physical server will not effect the VMs
installed on that.
 Virtual Desktop Infrastructure (VDI) is a desktop delivery model
which allows client desktop workloads (operating system,
application, user data) to be hosted and executed on servers in the
data center
 Users can communicate with their virtual desktops through a
client device that supports remote desktop protocols such as RDP
 This allows you to virtualize Windows desktops in the datacenter and
deliver them on demand to any user — anywhere
Storage Virtualization is the
next frontier in Storage
Advances that aims to provide
a layer of abstraction to
reduce complexity
Software virtualization is the
virtualization of applications or
computer programs
Computer hardware
virtualization is the virtualization
of computers or operating
systems.

It hides the physical


characteristics of a computing
platform from users, instead
showing another abstract
computing platform
Conclusion
Abstraction of computer resources, include reduced operating and
capital costs, improved utilization of computing resources and
greater IT staff productivity

Supportability of Multiple Company products running as


Guest Programs on a non-certified virtualization engine.

Managing load on virtualized systems can be more art than science.


Levels of Virtualization Implementation

 This is an important point, as REST is not intended to apply just


to the internet; rather, its principles are intended to apply to all
protocols, including WEBDAV and FTP.
Instruction Set Architecture Level
At the ISA level, virtualization is performed by emulating a given ISA by the ISA of
the host machine. For example, MIPS binary code can run on an x86-based host
machine with the help of ISA emulation. With this approach, it is possible to run a
large amount of legacy binary code writ-ten for various processors on any given
new hardware host machine. Instruction set emulation leads to virtual ISAs
created on any hardware machine.

The basic emulation method is through code interpretation. An interpreter


program interprets the source instructions to target instructions one by one.
One source instruction may require tens or hundreds of native target
instructions to perform its function. Obviously, this process is relatively slow. For
better performance, dynamic binary translation is desired. This approach
translates basic blocks of dynamic source instructions to target instructions. The
basic blocks can also be extended to program traces or super blocks to increase
translation efficiency. Instruction set emulation requires binary translation and
optimization. A virtual instruction set architecture (V-ISA) thus requires adding a
processor-specific software translation layer to the compiler.
2.Hardware Abstraction Level

Hardware-level virtualization is performed right on top of the bare hardware. On


the one hand, this approach generates a virtual hardware environment for a VM.
On the other hand, the process manages the underlying hardware through
virtualization. The idea is to virtualize a computer’s resources, such as its
processors, memory, and I/O devices. The intention is to upgrade the hardware
utilization rate by multiple users concurrently. The idea was implemented in the
IBM VM/370 in the 1960s. More recently, the Xen hypervisor has been applied to
virtualize x86-based machines to run Linux or other guest OS applications.
3.Operating System Level

This refers to an abstraction layer between traditional OS and user applications.


OS-level virtualiza-tion creates isolated containers on a single physical server and
the OS instances to utilize the hard-ware and software in data centers. The
containers behave like real servers. OS-level virtualization is commonly used in
creating virtual hosting environments to allocate hardware resources among a
large number of mutually distrusting users. It is also used, to a lesser extent, in
consolidating server hardware by moving services on separate hosts into
containers or VMs on one server.
4.Library Support Level

Most applications use APIs exported by user-level libraries rather than using
lengthy system calls by the OS. Since most systems provide well-documented
APIs, such an interface becomes another candidate for virtualization.
Virtualization with library interfaces is possible by controlling the communication
link between applications and the rest of a system through API hooks. The
software tool WINE has implemented this approach to support Windows
applications on top of UNIX hosts. Another example is the vCUDA which allows
applications executing within VMs to leverage GPU hardware acceleration.
5.User-Application Level
 Virtualization at the application level virtualizes an application as a VM. On a
traditional OS, an application often runs as a process. Therefore, application-
level virtualization is also known as process-level virtualization. The most
popular approach is to deploy high level language (HLL)
 VMs. In this scenario, the virtualization layer sits as an application program on
top of the operating system, and the layer exports an abstraction of a VM that
can run programs written and compiled to a particular abstract machine
definition. Any program written in the HLL and compiled for this VM will be
able to run on it. The Microsoft .NET CLR and Java Virtual Machine (JVM) are
two good examples of this class of VM.
 Other forms of application-level virtualization are known as application
isolation, application sandboxing, or application streaming. The process
involves wrapping the application in a layer that is isolated from the host OS
and other applications. The result is an application that is much easier to
distribute and remove from user workstations. An example is the LANDesk
application virtuali-zation platform which deploys software applications as
self-contained, executable files in an isolated environment without requiring
installation, system modifications, or elevated security privileges.
6.Relative Merits of Different Approaches

 The column headings correspond to four technical merits. “Higher


Performance” and “Application Flexibility” are self-
explanatory. “Implementation Complexity” implies the cost to implement that
particular vir-tualization level. “Application Isolation” refers to the effort
required to isolate resources committed to different VMs. Each row
corresponds to a particular level of virtualization.
 The number of X’s in the table cells reflects the advantage points of each
implementation level. Five X’s implies the best case and one X implies the
worst case. Overall, hardware and OS support will yield the highest
performance. However, the hardware and application levels are also the most
expensive to implement. User isolation is the most difficult to achieve. ISA
implementation offers the best application flexibility.
VIRTUALIZATION
STRUCTURES/TOOLS AND
MECHANISMS
Before virtualization, the operating system manages the
hardware. After virtualization, a virtualization layer is inserted
between the hardware and the operat-ing system. In such a case,
the virtualization layer is responsible for converting portions of
the real hardware into virtual hardware. Therefore, different
operating systems such as Linux and Windows can run on the
same physical machine, simultaneously. Depending on the
position of the virtualiza-tion layer, there are several classes of
VM architectures, namely the hypervisor architecture, para
virtualization, and host-based virtualization. The hypervisor is
also known as the VMM (Virtual Machine Monitor). They both
perform the same virtualization operations.
1. Hypervisor and Xen Architecture
 The hypervisor supports hardware-level virtualization on bare metal devices
like CPU, memory, disk and network interfaces. The hypervisor software sits
directly between the physi-cal hardware and its OS. This virtualization layer is
referred to as either the VMM or the hypervisor. The hypervisor
provides hypercalls for the guest OSes and applications. Depending on the
functional-ity, a hypervisor can assume a micro-kernel architecture like the
Microsoft Hyper-V. Or it can assume a monolithic hypervisor architecture like
the VMware ESX for server virtualization.
 A micro-kernel hypervisor includes only the basic and unchanging functions
(such as physical memory management and processor scheduling). The device
drivers and other changeable components are outside the hypervisor. A
monolithic hypervisor implements all the aforementioned functions, including
those of the device drivers. Therefore, the size of the hypervisor code of a
micro-kernel hyper-visor is smaller than that of a monolithic hypervisor.
Essentially, a hypervisor must be able to convert physical devices into virtual
resources dedicated for the deployed VM to use.
1.1 The Xen Architecture
 Xen is an open source hypervisor program developed by Cambridge
University. Xen is a micro-kernel hypervisor, which separates the policy from
the mechanism.resources dedicated for the deployed VM to use.
 The core components of a Xen system are the hypervisor, kernel, and
applications. The organi-zation of the three components is important. Like
other virtualization systems, many guest OSes can run on top of the
hypervisor. However, not all guest OSes are created equal, and one in
particular controls the others. The guest OS, which has control ability, is
called Domain 0, and the others are called Domain U. Domain 0 is a
privileged guest OS of Xen. It is first loaded when Xen boots without any file
system drivers being available. Domain 0 is designed to access hardware
directly and manage devices. Therefore, one of the responsibilities of
Domain 0 is to allocate and map hardware resources for the guest domains
(the Domain U domains).
1.1 The Xen Architecture
1.1 The Xen Architecture
 For example, Xen is based on Linux and its security level is C2. Its
management VM is named Domain 0, which has the privilege to manage
other VMs implemented on the same host. If Domain 0 is compromised, the
hacker can control the entire system. So, in the VM system, security policies
are needed to improve the security of Domain 0. Domain 0, behaving as a
VMM, allows users to create, copy, save, read, modify, share, migrate, and
roll back VMs as easily as manipulating a file, which flexibly provides
tremendous benefits for users. Unfortunately, it also brings a series of
security problems during the software life cycle and data lifetime.
 Traditionally, a machine’s lifetime can be envisioned as a straight line where
the current state of the machine is a point that progresses monotonically as
the software executes. During this time, con-figuration changes are made,
software is installed, and patches are applied. In such an environment, the
VM state is akin to a tree: At any point, execution can go into N different
branches where multiple instances of a VM can exist at any point in this tree
at any given time. VMs are allowed to roll back to previous states in their
execution (e.g., to fix configuration errors) or rerun from the same point
many times (e.g., as a means of distributing dynamic content or circulating
a “live” system image).
2. Binary Translation with Full
Virtualization

 Depending on implementation technologies, hardware


virtualization can be classified into two cate-gories: full
virtualization and host-based virtualization. Full virtualization
does not need to modify the host OS. It relies on binary
translation to trap and to virtualize the execution of certain
sensitive, nonvirtualizable instructions.
2.1 Full Virtualization
2.1 Full Virtualization
With full virtualization, noncritical instructions run on the hardware
directly while critical instructions are discovered and replaced with
traps into the VMM to be emulated by software. Both the
hypervisor and VMM approaches are considered full virtualization.
Why are only critical instructions trapped into the VMM? This is
because binary translation can incur a large performance overhead.
Noncritical instructions do not control hardware or threaten the
security of the system, but critical instructions do. Therefore,
running noncritical instructions on hardware not only can promote
efficiency, but also can ensure system security.
2.2 Binary Translation of Guest OS
Requests Using a VMM

2.2 Binary Translation of Guest OS Requests Using a VMM


 This approach was implemented by VMware and many other software
companies.VMware puts the VMM at Ring 0 and the guest OS at Ring 1.
The VMM scans the instruction stream and identifies the privileged, control-
and behavior-sensitive instructions. When these instructions are identified,
they are trapped into the VMM, which emulates the behavior of these
instructions. The method used in this emulation is called binary translation.
Therefore, full vir-tualization combines binary translation and direct
execution. The guest OS is completely decoupled from the underlying
hardware. Consequently, the guest OS is unaware that it is being virtualized.
 The performance of full virtualization may not be ideal, because it involves
binary translation which is rather time-consuming. In particular, the full
virtualization of I/O-intensive applications is a really a big challenge. Binary
translation employs a code cache to store translated hot instructions to
improve performance, but it increases the cost of memory usage. At the time
of this writing, the performance of full virtualization on the x86 architecture
is typically 80 percent to 97 percent that of the host machine.
2.3 Host-Based Virtualization
 2.3 Host-Based Virtualization
 An alternative VM architecture is to install a virtualization layer on top of
the host OS. This host OS is still responsible for managing the hardware. The
guest OSes are installed and run on top of the virtualization layer. Dedicated
applications may run on the VMs. Certainly, some other applications can
also run with the host OS directly. This host-based architecture has some
distinct advantages, as enumerated next. First, the user can install this VM
architecture without modifying the host OS. The virtualizing software can
rely on the host OS to provide device drivers and other low-level services.
This will simplify the VM design and ease its deployment.
 Second, the host-based approach appeals to many host machine
configurations. Compared to the hypervisor/VMM architecture, the
performance of the host-based architecture may also be low. When an
application requests hardware access, it involves four layers of mapping
which downgrades performance significantly. When the ISA of a guest OS is
different from the ISA of the underlying hardware, binary translation must be
adopted. Although the host-based architecture has flexibility, the
performance is too low to be useful in practice.
2.3 Host-Based Virtualization
3. Para-Virtualization with Compiler
Support
 Para-virtualization needs to modify the guest operating systems. A para-
virtualized VM provides special APIs requiring substantial OS modifications in
user applications. Performance degradation is a critical issue of a virtualized
system. No one wants to use a VM if it is much slower than using a physical
machine. The virtualization layer can be inserted at different positions in a
machine soft-ware stack. However, para-virtualization attempts to reduce the
virtualization overhead, and thus improve performance by modifying only the
guest OS kernel.
 Figure 3.7 illustrates the concept of a paravirtualized VM architecture. The
guest operating systems are para-virtualized. They are assisted by an intelligent
compiler to replace the nonvirtualizable OS instructions by hypercalls as
illustrated in Figure 3.8. The traditional x86 processor offers four instruction
execution rings: Rings 0, 1, 2, and 3. The lower the ring number, the higher the
privilege of instruction being executed. The OS is responsible for managing the
hardware and the privileged instructions to execute at Ring 0, while user-level
applications run at Ring 3. The best example of para-virtualization is the KVM
to be described below.
3.1 Para-Virtualization Architecture
 When the x86 processor is virtualized, a virtualization layer is inserted between
the hardware and the OS. According to the x86 ring definition, the virtualization
layer should also be installed at Ring 0. Different instructions at Ring 0 may
cause some problems. In Figure 3.8, we show that para-virtualization replaces
nonvirtualizable instructions with hypercalls that communicate directly with the
hypervisor or VMM. However, when the guest OS kernel is modified for
virtualization, it can no longer run on the hardware directly.
 Although para-virtualization reduces the overhead, it has incurred other
problems. First, its compatibility and portability may be in doubt, because it
must support the unmodified OS as well. Second, the cost of maintaining para-
virtualized OSes is high, because they may require deep OS kernel
modifications. Finally, the performance advantage of para-virtualization varies
greatly due to workload variations. Compared with full virtualization, para-
virtualization is relatively easy and more practical. The main problem in full
virtualization is its low performance in binary translation. To speed up binary
translation is difficult. Therefore, many virtualization products employ the para-
virtualization architecture. The popular Xen, KVM, and VMware ESX are good
examples.
3.1 Para-Virtualization Architecture
3.2 KVM (Kernel-Based VM)
 3.2 KVM (Kernel-Based VM)

This is a Linux para-virtualization system—a part of the Linux


version 2.6.20 kernel. Memory management and scheduling
activities are carried out by the existing Linux kernel. The KVM
does the rest, which makes it simpler than the hypervisor that
controls the entire machine. KVM is a hardware-assisted para-
virtualization tool, which improves performance and supports
unmodified guest OSes such as Windows, Linux, Solaris, and
other UNIX variants
3.3 Para-Virtualization with Compiler
Support
 3.3 Para-Virtualization with Compiler Support

 Unlike the full virtualization architecture which intercepts and emulates


privileged and sensitive instructions at runtime, para-virtualization handles
these instructions at compile time. The guest OS kernel is modified to
replace the privileged and sensitive instructions with hypercalls to the
hypervi-sor or VMM. Xen assumes such a para-virtualization architecture.

 The guest OS running in a guest domain may run at Ring 1 instead of at


Ring 0. This implies that the guest OS may not be able to execute some
privileged and sensitive instructions. The privileged instructions are
implemented by hypercalls to the hypervisor. After replacing the
instructions with hypercalls, the modified guest OS emulates the behavior
of the original guest OS. On an UNIX system, a system call involves an
interrupt or service routine. The hypercalls apply a dedicated service
routine in Xen.
VIRTUALIZATION OF CPU, MEMORY,
AND I/O DEVICES

To support virtualization, processors such as the x86 employ


a special running mode and instructions, known as hardware-
assisted virtualization. In this way, the VMM and guest OS
run in different modes and all sensitive instructions of the
guest OS and its applications are trapped in the VMM. To
save processor states, mode switching is completed by
hardware. For the x86 architecture, Intel and AMD have
proprietary technologies for hardware-assisted virtualization.
1. Hardware Support for
Virtualization
1. Hardware Support for Virtualization
Modern operating systems and processors permit multiple
processes to run simultaneously. If there is no protection
mechanism in a processor, all instructions from different processes
will access the hardware directly and cause a system crash.
Therefore, all processors have at least two modes, user mode and
supervisor mode, to ensure controlled access of critical hardware.
Instructions running in supervisor mode are called privileged
instructions. Other instructions are unprivileged instructions. In a
virtualized environment, it is more difficult to make OSes and
applications run correctly because there are more layers in the
machine stack. Example 3.4 discusses Intel’s hardware support
approach.
1. Hardware Support for
Virtualization
At the time of this writing, many hardware virtualization products were
available. The VMware Workstation is a VM software suite for x86 and
x86-64 computers. This software suite allows users to set up multiple x86
and x86-64 virtual computers and to use one or more of these VMs
simultaneously with the host operating system. The VMware Workstation
assumes the host-based virtualization. Xen is a hypervisor for use in IA-
32, x86-64, Itanium, and PowerPC 970 hosts. Actually, Xen modifies
Linux as the lowest and most privileged layer, or a hypervisor.
One or more guest OS can run on top of the hypervisor. KVM (Kernel-
based Virtual Machine) is a Linux kernel virtualization infrastructure.
KVM can support hardware-assisted virtualization and paravirtualization
by using the Intel VT-x or AMD-v and VirtIO framework, respectively.
The VirtIO framework includes a paravirtual Ethernet card, a disk I/O
controller, a balloon device for adjusting guest memory usage, and a
VGA graphics interface using VMware drivers.
1. Hardware Support for
Virtualization (Example)

Since software-based virtualization techniques are complicated and incur performance overhead,
Intel provides a hardware-assist technique to make virtualization easy and improve performance.
Figure 3.10 provides an overview of Intel’s full virtualization techniques. For processor
virtualization, Intel offers the VT-x or VT-i technique. VT-x adds a privileged mode (VMX Root
Mode) and some instructions to processors. This enhancement traps all sensitive instructions in
the VMM automatically. For memory virtualization, Intel offers the EPT, which translates the
virtual address to the machine’s physical addresses to improve performance. For I/O
virtualization, Intel implements VT-d and VT-c to support this.
2. CPU Virtualization
A VM is a duplicate of an existing computer system in which a
majority of the VM instructions are executed on the host processor
in native mode. Thus, unprivileged instructions of VMs run
directly on the host machine for higher efficiency. Other critical
instructions should be handled carefully for correctness and
stability. The critical instructions are divided into three
categories: privileged instructions, control-sensitive instructions,
and behavior-sensitive instructions. Privileged instructions execute
in a privileged mode and will be trapped if executed outside this
mode. Control-sensitive instructions attempt to change the
configuration of resources used. Behavior-sensitive instructions
have different behaviors depending on the configuration of
resources, including the load and store operations over the virtual
memory.
2. CPU Virtualization
A CPU architecture is virtualizable if it supports the ability to run
the VM’s privileged and unprivileged instructions in the CPU’s
user mode while the VMM runs in supervisor mode. When the
privileged instructions including control- and behavior-sensitive
instructions of a VM are exe-cuted, they are trapped in the VMM.
In this case, the VMM acts as a unified mediator for hardware
access from different VMs to guarantee the correctness and
stability of the whole system. However, not all CPU architectures
are virtualizable. RISC CPU architectures can be naturally
virtualized because all control- and behavior-sensitive instructions
are privileged instructions. On the contrary, x86 CPU architectures
are not primarily designed to support virtualization. This is
because about 10 sensitive instructions, such as SGDT and SMSW,
are not privileged instructions. When these instruc-tions execute in
virtualization, they cannot be trapped in the VMM.
2.1 Hardware-Assisted CPU
Virtualization
2.1 Hardware-Assisted CPU Virtualization
This technique attempts to simplify virtualization because full or
paravirtualization is complicated. Intel and AMD add an
additional mode called privilege mode level (some people call it
Ring-1) to x86 processors. Therefore, operating systems can still
run at Ring 0 and the hypervisor can run at Ring -1. All the
privileged and sensitive instructions are trapped in the hypervisor
automatically. This technique removes the difficulty of
implementing binary translation of full virtualization. It also lets
the operating system run in VMs without modification.
2.1 Hardware-Assisted CPU
Virtualization (Example)

Although x86 processors are not virtualizable primarily, great effort is taken to virtualize them.
They are used widely in comparing RISC processors that the bulk of x86-based legacy systems
cannot discard easily. Virtuali-zation of x86 processors is detailed in the following sections. Intel’s
VT-x technology is an example of hardware-assisted virtualization, as shown in Figure 3.11. Intel
calls the privilege level of x86 processors the VMX Root Mode. In order to control the start and
stop of a VM and allocate a memory page to maintain the CPU state for VMs, a set of additional
instructions is added. At the time of this writing, Xen, VMware, and the Microsoft Virtual PC all
implement their hypervisors by using the VT-x technology.
3. Memory Virtualization
Virtual memory virtualization is similar to the virtual memory
support provided by modern operat-ing systems. In a traditional
execution environment, the operating system maintains mappings
of virtual memory to machine memory using page tables, which is
a one-stage mapping from virtual memory to machine memory. All
modern x86 CPUs include a memory management unit
(MMU) and a translation lookaside buffer (TLB) to optimize
virtual memory performance. However, in a virtual execution
environment, virtual memory virtualization involves sharing the
physical system memory in RAM and dynamically allocating it to
the physical memory of the VMs.
3. Memory Virtualization
That means a two-stage mapping process should be maintained by
the guest OS and the VMM, respectively: virtual memory to
physical memory and physical memory to machine memory.
Furthermore, MMU virtualization should be supported, which is
transparent to the guest OS. The guest OS continues to control the
mapping of virtual addresses to the physical memory addresses of
VMs. But the guest OS cannot directly access the actual machine
memory. The VMM is responsible for mapping the guest physical
memory to the actual machine memory. Figure 3.12 shows the
two-level memory mapping procedure.
3. Memory Virtualization
4. I/O Virtualization
I/O virtualization involves managing the routing of I/O requests
between virtual devices and the shared physical hardware. At the
time of this writing, there are three ways to implement I/O
virtualization: full device emulation, para-virtualization, and direct
I/O. Full device emulation is the first approach for I/O
virtualization. Generally, this approach emulates well-known, real-
world devices.
All the functions of a device or bus infrastructure, such as device
enumeration, identification, interrupts, and DMA, are replicated in
software. This software is located in the VMM and acts as a virtual
device. The I/O access requests of the guest OS are trapped in the
VMM which interacts with the I/O devices. The full device
emulation approach is shown in Figure 3.14.
4. I/O Virtualization
A single hardware device can be shared by multiple VMs that run
concurrently. However, software emulation runs much slower than
the hardware it emulates [10,15]. The para-virtualization method of I/O
virtualization is typically used in Xen. It is also known as the split driver
model consisting of a frontend driver and a backend driver. The
frontend driver is running in Domain U and the backend dri-ver is
running in Domain 0. They interact with each other via a block of
shared memory. The frontend driver manages the I/O requests of the
guest OSes and the backend driver is responsible for managing the
real I/O devices and multiplexing the I/O data of different VMs.
Although para-I/O-virtualization achieves better device performance
than full device emulation, it comes with a higher CPU overhead.
4. I/O Virtualization
Direct I/O virtualization lets the VM access devices directly. It can
achieve close-to-native performance without high CPU costs.
However, current direct I/O virtualization implementations focus on
networking for mainframes. There are a lot of challenges for
commodity hardware devices. For example, when a physical device is
reclaimed (required by workload migration) for later reassign-ment, it
may have been set to an arbitrary state (e.g., DMA to some arbitrary
memory locations) that can function incorrectly or even crash the
whole system. Since software-based I/O virtualization requires a very
high overhead of device emulation, hardware-assisted I/O
virtualization is critical. Intel VT-d supports the remapping of I/O DMA
transfers and device-generated interrupts. The architecture of VT-d
provides the flexibility to support multiple usage models that may run
unmodified, special-purpose, or “virtualization-aware” guest OSes.
4. I/O Virtualization
Another way to help I/O virtualization is via self-virtualized I/O (SV-IO)
[47]. The key idea of SV-IO is to harness the rich resources of a
multicore processor. All tasks associated with virtualizing an I/O device
are encapsulated in SV-IO. It provides virtual devices and an associated
access API to VMs and a management API to the VMM. SV-IO defines
one virtual interface (VIF) for every kind of virtua-lized I/O device, such
as virtual network interfaces, virtual block devices (disk), virtual
camera devices, and others. The guest OS interacts with the VIFs via
VIF device drivers. Each VIF consists of two mes-sage queues. One is
for outgoing messages to the devices and the other is for incoming
messages from the devices. In addition, each VIF has a unique ID for
identifying it in SV-IO
4. I/O Virtualization
5. Virtualization in Multi-Core
Processors
Virtualizing a multi-core processor is relatively more complicated
than virtualizing a uni-core processor. Though multicore processors
are claimed to have higher performance by integrating multiple
processor cores in a single chip, muti-core virtualiuzation has
raised some new challenges to computer architects, compiler
constructors, system designers, and application programmers.
There are mainly two difficulties: Application programs must be
parallelized to use all cores fully, and software must explicitly
assign tasks to the cores, which is a very complex problem.
5. Virtualization in Multi-Core
Processors
Concerning the first challenge, new programming models,
languages, and libraries are needed to make parallel programming
easier. The second challenge has spawned research involving
scheduling algorithms and resource management policies. Yet these
efforts cannot balance well among performance, complexity, and
other issues. What is worse, as technology scales, a new challenge
called dynamic heterogeneity is emerging to mix the fat CPU core
and thin GPU cores on the same chip, which further complicates
the multi-core or many-core resource management. The dynamic
heterogeneity of hardware infrastructure mainly comes from less
reliable transistors and increased complexity in using the
transistors
Disaster Recovery and the Cloud
Agenda
The need for disaster recovery (DR)

Cloud computing overview

Virtualization and disaster recovery

PlateSpin Protect and PlateSpin Forge


® ®

2 © 2011 NetIQ Corporation. All rights reserved.


The Need for Disaster Recovery
Why Downtime Matters
$41.3 Billion
Total economic damage from disaster in 2009*

$10.8 Billion
Economic impact felt in the U.S. from disasters
in 2009*
*September 2, 2010 , Business Continuity and Disaster Recovery are top IT Priorities for 2010
and 2011 - Forrester

2 © 2011 NetIQ Corporation. All rights reserved.


3
Becoming a Priority
of enterprises have indicated that
78% improving disaster recovery capabilities
is a high priority*

• Better able to identify and quantify risk


• Better understanding of economic impact
• Less tolerance for downtime and data loss

*Jan. 25, 2010 – The State of Enterprise IT: 2009 to 2010 - Forrester

2 © 2011 NetIQ Corporation. All rights reserved.


4
Define Your Objectives
Recovery Time • Time between declaration and service
availability
Objective (RTO) • Time to restore services to useable state

Recovery Point • Data in system lost at disaster time


• Amount of data entered since last backup
Objective (RPO)

• Time required to test recovery plans


Test Time • Resources used for testing
Objective (TTO)

2 © 2011 NetIQ Corporation. All rights reserved.


4
Cloud Computing Overview
From a Big Box to a Big Cloud

24 © 2011 NetIQ Corporation. All rights reserved.


3
Defining Cloud
Characterstics

24 © 2011 NetIQ Corporation. All rights reserved.


4
The Cloud Stack

24 © 2011 NetIQ Corporation. All rights reserved.


5
Your cloud, my cloud
• Public
 Scalable and elastic computing services offered to external
customers via the Internet.
 Typically multi-tenant, where multiple customers are able
to share a single set of resources.

• Private
 Dynamic and scalable computer services offered to internal
customers using equipment the customer owns and
delivered over a private network.

24 © 2011 NetIQ Corporation. All rights reserved.


6
Traditional Approaches to DR
Backup Your Data
• Focus is on protecting data
– Tape backup
– Imaging

• Poor performance
– Slow RTO, RPO (days)
• Hidden costs
– How do we get the data back
in to a useable state?
– How long to rebuild server?

24
© 2011 NetIQ Corporation. All rights reserved.
8
Double Infrastructure
• Focus is on protecting
application
– Clustering
– Like-for-like infrastructure
• Performance, but at what
price?
– Near-zero RTO, RPO
• High cost
– Duplicate infrastructure
– Management complexity

24
© 2011 NetIQ Corporation. All rights reserved.
9
Virtualize Disaster Recovery
Bridging the Gap
Duplication Backup

• Fast RTO and RPO • Slow RTO and RPO


• Duplicate resources • Over commitment of
• Costly and complex recovery resources

25
© 2011 NetIQ Corporation. All rights reserved.
1
Consolidated Recovery
Virtual production servers

Solution
 Replicate workload into an
offline virtual machine
 One-click failover
Physical production servers
 One-click test restore
Virtual recovery hosts
 Flexible failback

Physical production servers


Protect to the Cloud
Virtual production servers

Wide Area
Network

Physical production servers

25
© 2011 NetIQ Corporation. All rights reserved.
3
PlateSpin DR Products
®
PlateSpin ® Protect
Whole-workload protection for all server workloads.

Physical
servers

Image Virtual
archives hosts

Blade
servers Workload decoupled
from hardware

Backup to Incremental One-click


Easy to test
virtual machines replication failover

25
© 2011 NetIQ Corporation. All rights reserved.
5
PlateSpin Forge ®

World’s first disaster recovery hardware appliance with virtualization

Protects up to 25 workloads

Plug-in and protect solution for : PlateSpin Forge includes:


• Medium enterprises • Storage
• Branch use for large enterprises • Replication software
• Hypervisor

25
© 2011 NetIQ Corporation. All rights reserved.
6
Building a Protection Cloud
Build a Recovery Cloud
= PlateSpin Protect + Virtual Resources

PlateSpin Protect

Recovery
Cloud
Virtual Resources

Site A Site B Site C


25
© 2011 NetIQ Corporation. All rights reserved.
8
Setup Workload
Replications
Scheduled replications: Workload changes are
automatically replicated into virtual machines inside
the Recovery Cloud

Replicate every hour (1h RPO)

Recovery Cloud

25
© 2011 NetIQ Corporation. All rights reserved.
9
Easy Test Failover
Test Failover: recover workloads in isolated
virtual networks to avoid production disruptions

Users connect to running


workloads to test their Isolated Virtual Network
applications
Recovery Cloud

26
© 2011 NetIQ Corporation. All rights reserved.
0
Recover Workloads In Minutes

Offline Detection: PlateSpin


Protect sends out notification when
the protected workload goes offline

Failover: Workloads are recovered in


minutes inside the Recovery Cloud

Recovery Cloud
Users connect to workloads
running in the Recovery
Cloud

26
© 2011 NetIQ Corporation. All rights reserved.
1
Restore the Production Environment

Failback: move the workload back into


production to the same or a different host

Virtual or Physical Host


Recovery Cloud

26
© 2011 NetIQ Corporation. All rights reserved.
2
Solution Flexibility
On-Premise
Production Service
Data Center Provider
Data Center

Recovery Resources

Protected Workloads
WAN
Protect Node
Protect Management
Console

Administrator

26
© 2011 NetIQ Corporation. All rights reserved.
4
Virtual Private Cloud
Service
Customer Provider
Data Center
Data Center

Protect Node

Protected Workloads

WAN Recovery Resources

Protect Management
Console
Administrator

26
© 2011 NetIQ Corporation. All rights reserved.
5
Hybrid Model
Service
Customer Provider
Data Center
Data Center

Recovery Resources
Recovery Resources

Protect Node
WAN
Protect Node

Protected Workloads Protected Workloads

Administrator Protect Management


Console
26
© 2011 NetIQ Corporation. All rights reserved.
6

You might also like