0% found this document useful (0 votes)
34 views67 pages

Cloud Computing and Web Services Overview

cloud computing

Uploaded by

dramya761
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views67 pages

Cloud Computing and Web Services Overview

cloud computing

Uploaded by

dramya761
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cloud Computing and Web

Services
UNIT 1
• Cloud Computing Basics
• Web Services
• Virtulization
Chapter 1: Web Services
• Distributed Computing,
• Parallel Computing,
• WSDL structure,
• SOAP- Structure of SOAP Message (In JAX-WS),
• SOAP Messaging Architecture,
• SOAP Header,
• Client-side SOAP Handler,
• REST What is REST?
• HTTP methods,
• Java API for RESTful Web Services (JAXRS)
What are Web Services?
• A Web service is a self-describing, self-contained software module
available via a network,such as the Internet, which completes tasks,
solves problems, or conducts transactions on behalf of a user or
application.
• Web services are client and server applications that communicate
over the World Wide Web’s(www)HyperText Transfer Protocol(HTTP).
• It is a method of communication between two devices over network.
• [Link],online currency converter
• A Web Service is can be defined by following ways:
• It is a client-server application or application component for communication.
• The method of communication between two devices over the network.
• It is a software system for the interoperable machine to machine communication.
• It is a collection of standards or protocols for exchanging information between two
devices or application.
• Types of Web Services
• There are mainly two types of web services.
• SOAP web services.
• RESTful web services.
Distributed Computing Infrastructure
• A distributed system is characterized as a collection of (probably
heterogeneous) networked computers, which communicate and
coordinate their actions by passing messages.
• Distribution is transparent to the user so that the system appears as a
single integrated facility.
• This is in contrast to a network infrastructure, where the user is aware
that there are several machines, is also aware of their location,
storage replication, and load balancing, and functionality is not
transparent.
Key technologies that facilitate the development of distributed
applications for Web services:

• Internet Protocols
• The OSI Reference Model
• The TCP/IP network protocol model

• Middleware
The Open System Interconnection
(OSI)Reference Model
The OSI layers are as follows:

• Physical layer (or Layer 1): This is the lowest of seven hierarchical layers in the ISO/OSI reference model and
specifies the electrical, mechanical, procedural, and functional requirements for activating, maintaining,
and deactivating a physical link between end systems.
• Data Link layer (or Layer 2): This layer provides the means to transfer data between network entities and to
detect and possibly correct errors that may occur in the physical layer.
• Network layer (or Layer 3): This layer responds to service requests from the transport layer (its immediate
higher-level layer) and issues service requests to the datalink layer. This layer performs network routing,
flow control, segmentation/de-segmentation, and error control functions.
• Transport layer (or Layer 4): This layer responds to service requests from the session layer (its immediate
higher-level layer) and issues service requests to the network layer. Data integrity is ensured at the
transport layer by maintaining flow control and by allowing users to request reliable data transport
between systems.
• Session layer (or Layer 5): This layer provides the mechanism for managing the dialogue between end-user
application processes. The session layer is responsible for setting up, managing, and then tearing down
sessions between presentation layer entities.
• Presentation layer (or Layer 6): This layer presents data to the application layer
and is responsible for data translation and code formatting. Tasks like data
compression, decompression, encryption, and decryption are associated with this
layer.
• Application layer (or Layer 7): This is the highest layer in the ISO/OSI reference
model that gives an application program access to the OSI network. This layer
interfaces directly to and performs common application services required by the
application programs and also issues requests to the presentation layer.
The TCP/IP Network Protocol Model
The TCP/IP stack comprises the following layers:

• Data link layer: The data link layer, or simply link layer, is the lowermost layer and provides the
interface to the actual network hardware. This interface may or may not provide reliable delivery,
and may be packet or stream oriented.
• Internetwork layer: The internetwork layer, also called the Internet layer or the network layer, is the
next layer up from the data link layer. This layer is responsible for routing datagrams – a term which
basically means “blocks of data” – from one host to another. The internetwork layer provides the
“virtual network” image of an Internet IP is the most important protocol in this layer; IP is the
bedrock protocol of TCP/IP.
• Transport layer: The transport layer provides end-to-end data transfer by delivering data between
the client and server sides of an application. Multiple applications can be supported simultaneously.
The most used transport layer protocol is the TCP which provides connection-oriented reliable data
delivery, duplicate data suppression,congestion control, and flow control.
• Application layer: The application layer is responsible for supporting network applications. The
application layer is provided by the program that uses TCP/IP for communication. An application is a
user process cooperating with another process usually on a different host.
Middleware

• Middleware is connectivity software that is designed to help manage


the complexity and heterogeneity inherent in distributed systems by
building a bridge between different systems thereby enabling
communication and transfer of data.

• The role of middleware is to ease the task of designing, programming,


and managing distributed applications by providing a simple,
consistent, and integrated distributed programming environment.
Middleware Layers
• It shows that the middleware layers are interposed between
applications and internet transport protocols.
• The figure shows that the middleware abstraction comprises
two layers.

• The layer above is concerned with interprocess


communication mechanisms, while the layer above that is
concerned with non-message- and message-based forms of
middleware.
• Non-message-based forms of middleware provide
synchronous communication mechanisms designed to
support client–server communication.
• Message-based forms of middleware provide asynchronous
messaging and event notification mechanisms to exchang
messagess or react to events over electronic networks.
Client Server Architecture
• A widely applied form of distributed
processing is client–server computing.
• A client–server architecture is a
computational architecture in which
processing and storage tasks are divided
between two classes of network
members, clients and servers.
• Client–server involves client processes
(service consumers) requesting service
from server processes(service providers).
• Servers may in turn be clients of other
servers.
• The same device may function as both
client and server.
• In a client–server architecture the client machine runs software and
applications that are stored locally.
• The server also provides the data for the application.
• In a client–server architecture, the client actually has two tasks. The
client makes requests to servers and is also responsible for the user
[Link] eg: Web Browser
• The Web server must store all of the documents and must be able to
respond to requests from clients.
• Parallel Computing
• Parallel computing refers to the process of executing several processors an
application or computation simultaneously.
• Generally, it is a kind of computing architecture where the large problems
break into independent, smaller, usually similar parts that can be processed
in one go.
• Parallel computing also helps in faster application processing and task
resolution by increasing the available computation power of systems.
Types of parallel computing
• Bit-level parallelism
• Instruction-level parallelism
• Task Parallelism
• Applications of Parallel Computing
• There are various applications of Parallel Computing, which are as follows:
• One of the primary applications of parallel computing is Databases and
Data mining.
• The real-time simulation of systems is another use of parallel computing.
• The technologies, such as Networked videos and Multimedia.
• Science and Engineering.
• Collaborative work environments.
• The concept of parallel computing is used by augmented reality, advanced
graphics, and virtual reality.
• Advantages of Parallel computing
• Parallel computing advantages are discussed below:
• In parallel computing, more resources are used to complete the task that led to
decrease the time and cut possible costs. Also, cheap components are used to
construct parallel clusters.
• Comparing with Serial Computing, parallel computing can solve larger problems
in a short time.
• For simulating, modeling, and understanding complex, real-world phenomena,
parallel computing is much appropriate while comparing with serial computing.
• When the local resources are finite, it can offer benefit you over non-local
resources.
• There are multiple problems that are very large and may impractical or
impossible to solve them on a single computer; the concept of parallel
computing helps to remove these kinds of issues.
• One of the best advantages of parallel computing is that it allows you to do
several things in a time by using multiple computing resources.
• Furthermore, parallel computing is suited for hardware as serial computing
wastes the potential computing power.
• Disadvantages of Parallel Computing
• There are many limitations of parallel computing, which are as follows:
• It addresses Parallel architecture that can be difficult to achieve.
• In the case of clusters, better cooling technologies are needed in parallel
computing.
• It requires the managed algorithms, which could be handled in the parallel
mechanism.
• The multi-core architectures consume high power consumption.
• The parallel computing system needs low coupling and high cohesion,
which is difficult to create.
• The code for a parallelism-based program can be done by the most
technically skilled and expert programmers.

• Web Services in Cloud Computing
• The Internet is the worldwide connectivity of hundreds of thousands of
computers belonging to many different networks.
• A web service is a standardized method for propagating messages between client
and server applications on the World Wide Web. A web service is a software
module that aims to accomplish a specific set of tasks. Web services can be
found and implemented over a network in cloud computing.
• Web services allow programs developed in different languages to be connected
between a client and a server by exchanging data over a web service. A client
invokes a web service by submitting an XML request, to which the service
responds with an XML response.
• Web services functions
• It is possible to access it via the Internet or intranet network.
• XML messaging protocol that is standardized.
• Operating system or programming language independent.
• Using the XML standard is self-describing.
• Web Service Components
• XML and HTTP is the most fundamental web service platform. All typical web
services use the following components:
1. SOAP (Simple Object Access Protocol)
• SOAP stands for "Simple Object Access Protocol". It is a transport-independent
messaging protocol. SOAP is built on sending XML data in the form of SOAP
messages. A document known as an XML document is attached to each message.
• Only the structure of an XML document, not the content, follows a pattern. The
great thing about web services and SOAP is that everything is sent through HTTP,
the standard web protocol.
• Every SOAP document requires a root element known as an element. In an XML
document, the root element is the first element.
• The "envelope" is divided into two halves. The header comes first, followed by
the body. Routing data, or information that directs the XML document to which
client it should be sent, is contained in the header. The real message will be in
the body.
2. UDDI (Universal Description, Search, and Integration)
• UDDI is a standard for specifying, publishing and searching online service
providers.
• It provides a specification that helps in hosting the data through web
services.
• UDDI provides a repository where WSDL files can be hosted so that a client
application can search the WSDL file to learn about the various actions
provided by the web service.
• As a result, the client application will have full access to UDDI, which acts
as the database for all WSDL files.
• The UDDI Registry will keep the information needed for online services,
such as a telephone directory containing the name, address, and phone
number of a certain person so that client applications can find where it is.
3. WSDL (Web Services Description Language)
• The client implementing the web service must be aware of the location of
the web service.
• If a web service cannot be found, it cannot be used. Second, the client
application must understand what the web service does to implement the
correct web service.
• WSDL, or Web Service Description Language, is used to accomplish this.
• A WSDL file is another XML-based file that describes what a web service
does with a client application.
• The client application will understand where the web service is located and
how to access it using the WSDL document.
• How does web service work?
• The diagram shows a simplified version of how a web service would
function. The client will use requests to send a sequence of web service
calls to the server hosting the actual web service.
• WSDL structure
• Web Services Description Language (WSDL) is an XML grammar for describing network
services as collections of communication endpoints capable of exchanging messages.
The diagram below illustrates the elements that are present in a WSDL document, and
indicates their relationships.
• WSDL Document Elements
• A WSDL document has a definitions element that contains the other five elements, types, message,
portType, binding and service. The following sections describe the features of the generated client code.
• WSDL supports the XML Schemas specification (XSD) as its type system.

• definitions
• Contains the definition of one or more services. JDeveloper generates the following attribute declarations
for this section:
• name is optional.
• targetNamespace is the logical namespace for information about this service. WSDL documents can
import other WSDL documents, and setting targetNamespace to a unique value ensures that the
namespaces do not clash.
• xmlns is the default namespace of the WSDL document, and it is set to
[Link]
• All the WSDL elements, such as <definitions>, <types> and <message> reside in this namespace.
• xmlns:xsd and xmlns:soap are standard namespace definitions that are used for specifying SOAP-specific
information as well as data types.
• xmlns:tns stands for this namespace.
• xmlns:ns1 is set to the value of the schema targetNamespace, in the <types> section.
• types
• Provides information about any complex data types used in the WSDL document. When simple types are
used the document does not need to have a types section.
• message
• An abstract definition of the data being communicated. In the example, the message contains just one part,
response, which is of type string, where string is defined by the XML Schema.
• operation
• An abstract description of the action supported by the service.
• portType
• An abstract set of operations supported by one or more endpoints.
• binding
• Describes how the operation is invoked by specifying concrete protocol and data format specifications for
the operations and messages.
• port
• Specifies a single endpoint as an address for the binding, thus defining a single communication endpoint.
• service
• Specifies the port address(es) of the binding. The service is a collection of network endpoints or ports.
• SOAP- Structure of SOAP Message (In JAX-WS)
• A SOAP message is encoded as an XML document, consisting of an <Envelope> element,
which contains an optional <Header> element, and a mandatory <Body> element. The
<Fault> element, contained in <Body>, is used for reporting errors.

• The SOAP envelope


• <Envelope> is the root element in every SOAP message, and contains two child
elements, an optional <Header> element, and a mandatory <Body> element.
• The SOAP header
• <Header> is an optional subelement of the SOAP envelope, and is used to pass
application-related information that is to be processed by SOAP nodes along the
message path.
• The SOAP body
• <Body> is a mandatory subelement of the SOAP envelope, which contains information
intended for the ultimate recipient of the message.
• The SOAP fault
• <Fault> is a subelement of the SOAP body, which is used for reporting errors.
• XML elements in <Header> and <Body> are defined by the applications
that make use of them, although the SOAP specification imposes some
constraints on their structure. The following diagram shows the structure
of a SOAP message.
• SOAP Messaging Architecture
• SOAP is a protocol for the exchange of information in a distributed environment.
SOAP messages are encoded as XML documents and can be exchanged using
various underlying protocols.
• The SOAP specifications describe a distributed processing model in which a SOAP
message is passed between SOAP nodes. The message originates at a SOAP
sender and is sent to a SOAP receiver. Between the sender and the receiver, the
message might be processed by one or more SOAP intermediaries.
• A SOAP message is a one-way transmission between SOAP nodes, from a SOAP
sender to a SOAP receiver, but messages can be combined to construct more
complex interactions, such as request and response, and peer-to-peer
conversations.
• The specification also includes this information:A set of encoding rules for
expressing instances of application-defined data types.
• A convention for representing remote procedure calls and responses.
• SOAP Header
• The optional Header element offers a flexible framework for specifying additional
application-level requirements. For example, the Header element can be used to
specify a digital signature for password-protected services. Likewise, it can be
used to specify an account number for pay-per-use SOAP services.
• Important pts:
• It is an optional part of a SOAP message.
• Header elements can occur multiple times.
• Headers are intended to add new features and functionality.
• The SOAP header contains header entries defined in a namespace.
• The header is encoded as the first immediate child element of the SOAP
envelope.
• When multiple headers are defined, all immediate child elements of the SOAP
header are interpreted as SOAP header blocks.
• SOAP Header Attributes
• A SOAP Header can have the following two attributes −
• Actor attribute
• The SOAP protocol defines a message path as a list of SOAP service nodes.
Each of these intermediate nodes can perform some processing and then
forward the message to the next node in the chain. By setting the Actor
attribute, the client can specify the recipient of the SOAP header.
• MustUnderstand attribute
• It indicates whether a Header element is optional or mandatory. If set to
true, the recipient must understand and process the Header attribute
according to its defined semantics, or return a fault.
• Client-side SOAP Handler
• A SOAP message handler provides a mechanism for intercepting the SOAP
message in both the request and response of the Web Service.
• A simple example of using handlers is to access information in the header part of
the SOAP message.
• SOAP message handlers are a part of the JAX-RPC standard.
• A SOAP message handler can be tied to a web service endpoint either on the
client side or on the server side.
• It is used simply to provide additional logic for handling the SOAP messages.
• Each SOAP handler in the chain intercepts the request and response SOAP
messages, and processes the SOAP message before passing it on to the next
member in the chain.
• Each message handler has access to the SOAP message and can transform the
incoming request or outgoing response before passing it on to the next SOAP
handler.
• For this reason, SOAP handlers are best suited to implement a number of useful
add-on features such as logging, encryption and decryption, and caching.
• REST-What is REST?
• REST, or REpresentational State Transfer, is an architectural style for
providing standards between computer systems on the web, making it
easier for systems to communicate with each other.
• REST-compliant systems, often called RESTful systems, are characterized by
how they are stateless and separate the concerns of client and server.
• Separation of Client and Server
• In the REST architectural style, the implementation of the client and the
implementation of the server can be done independently without each
knowing about the other.
• This means that the code on the client side can be changed at any time
without affecting the operation of the server, and the code on the server
side can be changed without affecting the operation of the client.
• By using a REST interface, different clients hit the same REST endpoints,
perform the same actions, and receive the same responses.
• Statelessness
• Systems that follow the REST paradigm are stateless, meaning that the
server does not need to know anything about what state the client is in and
vice versa. In this way, both the server and the client can understand any
message received, even without seeing previous messages.
• Because REST systems interact through standard operations on resources,
they do not rely on the implementation of interfaces.
• These constraints help RESTful applications achieve reliability, quick
performance, and scalability, as components that can be managed,
updated, and reused without affecting the system as a whole, even during
operation of the system.
• REpresentational State Transfer (REST) is a software architectural style that
defines the constraints to create web services. The web services that
follows the REST architectural style is called RESTful Web Services. It
differentiates between the computer system and web services. The REST
architectural style describes the six barriers.
• 1. Uniform Interface
• The Uniform Interface defines the interface between client and server. It
simplifies and decomposes the architecture which enables every part to be
developed. The Uniform Interface has four guiding principles:
• Resource-based: Individual resources are identified using the URI as a resource
identifier. The resources themselves are different from the representations
returned to the customer. For example, the server cannot send the database but
represents some database records expressed to HTML, XML or JSON depending
on the server request and the implementation details.
• Manipulation of resources by representation: When a client represents a
resource associated with metadata, there is information on the server to modify
or delete it.
• Self-Descriptive Message: Each message contains enough information to describe
how the message is processed. For example, the parser can be specified by the
Internet media type (known as the MIME type).
• As the engine of Hypermedia Application State (HATEOAS): Customers provide
states by query-string parameters, body content, request headers, and requested
URIs. The services provide customers with the state by response codes, response
headers and body content. It is called hypermedia (hyperlink within hypertext).
• 2. Client-server
• A client-server interface separates the client from the server. For Example,
the separation of concerns not having an internal relationship with internal
storage for each server to improve the portability of customer's data codes.
Servers are not connected with the user interface or user status to make
the server simpler and scalable. Servers and clients are independently
replaced and developed until the interface is changed.

• 3. Stateless
• Stateless means the state of the service doesn't persist between
subsequent requests and response. It means that the request itself
contains the state required to handle the request. It can be a query-string
parameter, entity, or header as a part of the URI. The URI identifies the
resource and state (or state change) of that resource in the unit. After the
server performs the appropriate state or status piece (s) that matters are
sent back to the client through the header, status, and response body.
• 4. Layered system
• It is directly connected to the end server or by any intermediary whether a client cannot
tell. Intermediate servers improve the system scalability by enabling load-balancing and
providing a shared cache. Layers can enforce security policies.

• 5. Cacheable
• On the World Wide Web, customers can cache responses. Therefore, responses clearly
define themselves as unacceptable or prevent customers from reusing stale or
inappropriate data to further requests. Well-managed caching eliminates some client-
server interactions to improving scalability and performance.

• 6. Code on Demand (optional)


• The server temporarily moves or optimizes the functionality of a client by logic that it
executes. Examples of compiled components are Java applets and client-side scripts.

• Compliance with the constraints will enable any distributed hypermedia system with
desirable contingency properties such as performance, scalability, variability, visibility,
portability, and reliability.
• HTTP methods
• 5 Essential HTTP Methods in RESTful API Development
• 1. GET
• The GET method is used to ‘retrieve’ a record or a collection of records from the
server.
• 2. POST
• The POST method sends data to create a ‘new record‘ on the server.
• 3. PUT
• The PUT method sends data to update an ‘existing record‘ on the server.
• 4. PATCH
• Like the PUT method, PATCH is also used to send data to update an ‘existing
record’ on the server. But the important difference between PUT and PATCH is
that PATCH only applies partial modifications to the record instead of replacing
the whole record.
• 5. DELETE
• The DELETE method is used to delete record(s) from the server.
• Java API for RESTful Web Services (JAX-RS)
• JAX-RS stands for JAVA API for RESTful Web Services. JAX-RS is a JAVA based
programming language API and specification to provide support for created
RESTful Web Services.
• Its 2.0 version was released on the 24th May 2013. JAX-RS uses annotations
available from Java SE 5 to simplify the development of JAVA based web services
creation and deployment. It also provides supports for creating clients for
RESTful Web Services.
• RESTful web services are designed to expose APIs on the web.
• It aims to provide better performance, scalability, and flexibility than traditinoal
web services, by allowing clients to access data and resources using predictable
URLs. Many well-known public web services expose RESTful APIs.
• The Java 6 Enterprise Edition specification for RESTful services is JAX-RS. In the
REST model, the server exposes APIs through specific URIs (typically URLs), and
clients access those URIs to query or modify data. REST uses a stateless
communication protocol. Typically, this is HTTP.
• The following is a summary of RESTful design principles:
• A URL is tied to a resource using the @Path annotation. Clients access the
resource using the URL.
• Create, Read, Update, and Delete (CRUD) operations are accessed via PUT, GET,
POST, and DELETE requests in the HTTP protocol.
• PUT creates a new resource.
• DELETE deletes a resource.
• GET retrieves the current state of a resource.
• POST updates a resources's state.

• Resources are decoupled from their representation, so that clients can request
the data in a variety of different formats.

• Stateful interactions require explicit state transfer, in the form of URL rewriting,
cookies, and hidden form fields. State can also be embedded in response
messages.
• Chapter 2 - Virtualization
• Characteristics of Virtualized Environments..
• Pros and Cons of Virtualization.
• Virtualization using KVM,
• Creating virtual machines,
• oVirt - management tool for virtualization environment.
Virtualization
• Virtualization technology is one of the fundamental components of cloud
computing, especially in regard to infrastructure-based services.
• Virtualization allows the creation of a secure, customizable, and isolated
execution environment for running applications, even if they are untrusted,
without affecting other users’ applications.
• The basis of this technology is the ability of a computer pro- gram—or a
combination of software and hardware—to emulate an executing
environment separate from the one that hosts such programs.
• Virtualization provides a great opportunity to build elastically scalable
systems that can provision additional capability with minimum costs.
• Therefore, virtualization is widely used to deliver customizable computing
environments on demand.
Introduction
• Virtualization is a large umbrella of technologies and concepts that are meant to provide
an abstract environment—whether virtual hardware or an operating system—to run
applications.
• The term virtualization is often synonymous with hardware virtualization, which plays a
fundamental role in efficiently delivering Infrastructure-as-a-Service (IaaS) solutions for
cloud computing.
• virtualization technologies provide a virtual environ- ment for not only executing
applications but also for storage, memory, and networking.
• Virtualization technologies have gained renewed interested recently due to the
confluence of several phenomena:
• Increased performance and computing capacity : Nowadays, the average end-user
desktop PC is powerful enough to meet almost all the needs of everyday computing, with
extra capacity that is rarely used.
• Almost all these PCs have resources enough to host a virtual machine manager and
execute a virtual machine with by far acceptable performance.
• The same consideration applies to the high-end side of the PC market, where
supercomputers can provide immense compute power that can accommodate the
execution of hundreds or thousands of virtual machines.
• Underutilized hardware and software resources: Hardware and software underutilization
is occurring due to (1) increased performance and computing capacity, and (2) the effect
of limited or irregular use of resources.
• Lack of space: The continuous need for additional capacity, whether storage or compute
power, makes data centers grow quickly.
• Companies such as Google and Microsoft expand their infrastructures by building large
data centers which are able to host thousands of nodes.
• Greening initiatives: Recently, companies are increasingly looking for ways to reduce the
amount of energy they consume and to reduce their carbon footprint.
• Data centers are one of the major power consumers; they contribute consistently to the
impact that a company has on the environment.
• Maintaining a data center operation not only involves keeping servers on, but a great deal
of energy is also consumed in keeping them cool.
• Infrastructures for cooling have a significant impact on the carbon footprint of a data
center.
• Hence, reducing the number of servers through server consolidation will definitely reduce
the impact of cooling and power consumption of a data center. Virtualization technologies
can provide an efficient way of consolidating servers.
• Rise of administrative costs: Power consumption and cooling costs have now
become higher than the cost of IT equipment.
• Moreover, the increased demand for additional capacity, which translates
into more servers in a data center, is also responsible for a significant
increment in administrative costs.
• Common system administration tasks include hardware monitoring, defective
hardware replacement, server setup and updates, server resources
monitoring, and backups.
• These are labor-intensive operations, and the higher the number of servers
that have to be managed, the higher the administrative costs.
• Virtualization can help reduce the number of required servers for a given
workload, thus reducing the cost of the administrative personnel.
Characteristics of virtualized environments
• Virtualization is a broad concept that refers to the creation of a virtual
version of something, whether hardware, a software environment, storage,
or a network.
• In a virtualized environment there are three major components: guest, host,
and virtualization layer.
• The guest represents the system component that interacts with the
virtualization layer rather than with the host.
• The host represents the original environment where the guest is supposed to
be managed.
• The virtualization layer is responsible for recreating the same or a different
environment where the guest will operate.
• As shown in the figure below:
• Such a general abstraction finds different applications and then implementations of the
virtualization technology.
• The most intuitive and popular is represented by hardware virtualization .
• In the case of hardware virtualization, the guest is represented by a system image
comprising an operating system and installed applications.
• These are installed on top of virtual hardware that is controlled and managed by the
virtualization layer, also called the virtual machine manager.
• The host is instead represented by the physical hardware, and in some cases the operating
system, that defines the environment where the virtual machine manager is running.
• In the case of virtual storage, the guest might be cli- ent applications or users that interact
with the virtual storage management software deployed on top of the real storage system.
• The case of virtual networking is also similar: The guest— applications and users—
interacts with a virtual network, such as a virtual private network(VPN), which is managed
by specific software(VPN client) using the physical network available on the node.
• The main common characteristic of all these different implementations is the fact that the
virtual environment is created by means of a software program.
• The ability to use software to emulate such a wide variety of environments creates a lot of
opportunities, previously less attractive because of excessive overhead introduced by the
virtualization layer.
• Such advantages have always been characteristics of virtualized solutions.
• Increased security
• Managed execution
• Portability
Increased Security
• The ability to control the execution of a guest in a completely transparent manner opens new possibilities
for delivering a secure, controlled execution environment.
• The virtual machine represents an emulated environment in which the guest is executed.
• All the operations of the guest are generally performed against the virtual machine, which then translates
and applies them to the host.
• This level of indirection allows the virtual machine manager to control and filter the activity of the guest,
thus preventing some harmful operations from being performed.
• Resources exposed by the host can then be hidden or simply protected from the guest.
• Sensitive information that is contained in the host can be naturally hidden without the need to install
complex security policies.
• Increased security is a requirement when dealing with untrusted code.
• By default, the file system exposed by the virtual computer is completely separated from the one of the host
machine.
• This becomes the perfect environment for running applications without affecting other users in the
environment.
Managed execution
• Virtualization of the execution environment not only allows increased
security, but a wider range of features also can be implemented.
• In particular, sharing, aggregation, emulation, and isolation are the most
relevant features are shown in the diagram.
• Sharing: Virtualization allows the creation of a separate computing
environments within the same host.
• In this way it is possible to fully exploit the capabilities of a powerful guest,
which would otherwise be underutilized.
• Aggregation: Not only is it possible to share physical resource among several
guests, but virtualization also allows aggregation, which is the opposite
process.
• A group of separate hosts can be tied together and represented to guests as
a single virtual host.
• This function is naturally implemented in middleware for distributed
computing, with a example represented by cluster management software,
which equipment the physical resources of a homogeneous group of
machines and represents them as a single resource.
• Emulation: Guest programs are executed within an environment that is controlled
by the virtualization layer, which ultimately is a program.
• This allows for controlling and tuning the environment that is exposed to guests.
• a completely different environment with respect to the host can be emulated, thus
allowing the execution of guest programs requiring specific characteristics that are
not present in the physical host.
• This feature becomes very useful for testing purposes, where a specific guest has to
be validated against different platforms or architectures and the wide range of
options is not easily accessible during development.
• Isolation: Virtualization allows providing guests—whether they are operating
systems, applications, or other entities—with a completely separate environment,
in which they are executed.
• The guest program performs its activity by interacting with an abstraction layer,
which provides access to the underlying resources.
• Isolation brings several benefits;
• it allows multiple guests to run on the same host without interfering with each other.
• Second, it provides a separation between the host and the guest.
• The virtual machine can filter the activity of the guest and prevent harmful operations against
the host.
• Besides these characteristics, another important capability enabled by virtualization is
performance tuning.
• It becomes easier to control the performance of the guest by finely tuning the properties
of the resources exposed through the virtual environment.
Portability
• The concept of portability applies in different ways according to the specific type of
virtualization considered.
• In the case of a hardware virtualization solution, the guest is packaged into a virtual image
that, can be safely moved and executed on top of different virtual machines.
• Except for the file size, this happens with the same simplicity with which we can display a
picture image in different computers.
• In the case of programming-level virtualization, as implemented by the JVM or the .NET
runtime, the binary code representing application components (jars or assemblies) can be
run without any recompilation on any implementation of the corresponding virtual
machine.
• This makes the application development cycle more flexible and application deployment
very straight forward: One version of the application, is able to run on different platforms
with no changes.
• Finally, portability allows the system always be ready to use as long as the required virtual
machine manager is available.
Pros and cons of virtualization
• Virtualization has now become extremely popular and widely used, especially
in cloud computing.
• The primary reason for its wide success is the elimination of technology
barriers that prevented virtualization from being an effective and viable
solution in the past.
• The most relevant barrier has been performance.
• The Internet connection and the advancements in computing technology
have made virtualization an interesting opportunity to deliver on-demand IT
infrastructure and services.
• Despite its renewed popularity, this technology has benefits and also
drawbacks.
Advantages of virtualization
• Managed execution and isolation are the most important advantages of virtualization.
• In the case of techniques supporting the creation of virtualized execution environments,
these two characteristics allow building secure and controllable computing environments.
• A virtual execution environment can be configured as a sandbox, thus preventing any
harmful operation to cross the borders of the virtual host.
• allocation of resources and their partitioning among different guests is simplified, being
the virtual host controlled by a program.
• This enables fine-tuning of resources, which is very important in a server consolidation
scenario and is also a requirement for effective quality of service.
• Portability is another advantage of virtualization, especially for execution virtualization
techniques.
• Virtual machine instances are normally represented by one or more files that can be easily
transported with respect to physical systems.
• they also tend to be self-contained since they do not have other dependencies besides the
virtual machine manager for their use.
• Portability and self-containment simplify their administration.
• Portability and self-containment also contribute to reducing the costs of
maintenance, since the number of hosts is expected to be lower than the
number of virtual machine instances.
• Since the guest program is executed in a virtual environment, there is very
limited opportunity for the guest program to damage the underlying
hardware.
• it is expected that there will be fewer virtual machine managers with respect
to the number of virtual machine instances managed.
• Finally, by means of virtualization it is possible to achieve a more efficient use
of resources.
• Multiple systems can securely coexist and share the resources of the
underlying host, without interfering with each other.
• This is a prerequisite for server consolidation, which allows adjusting the
number of active physical resources dynamically according to the current
load of the system, thus creating the opportunity to save in terms of energy
consumption and to be less impacting on the environment.
Disadvantages
1. Performance degradation
• Performance is definitely one of the major concerns in using virtualization technology. Since
virtualization interposes an abstraction layer between the guest and the host, the guest can
experience increased latencies.
• For example, in the case of hardware virtualization the causes of performance degradation are:
• Maintaining the status of virtual processors
• Support of privileged instructions
• Support of paging within VM
• Console functions
2. Inefficiency and degraded user experience
• Virtualization can sometime lead to an inefficient use of the host.
• some of the specific features of the host cannot be exposed by the abstraction layer and then
become inaccessible.
• In the case of hardware virtualization, this could happen for device drivers: The virtual machine
can sometime simply provide a default graphic card that maps only a subset of the features
available in the host.
• In the case of programming-level virtual machines, some of the features of the underlying
operating systems may become inaccessible unless specific libraries are used.
3. Security holes and new threats
• Virtualization opens the door to a new and unexpected form of phishing.
• The capability of emulating a host in a completely transparent manner led
the way to malicious programs that are designed to extract sensitive
information from the guest.
• In the case of hardware virtualization, malicious programs can preload
themselves before the operating system and act as a thin virtual machine
manager toward it.
• The operating system is then controlled and can be manipulated to extract
sensitive information of interest to third parties.
• The same considerations can be made for programming-level virtual
machines: Modified versions of the runtime environment can access sensitive
information or monitor the memory locations utilized by guest applications
while these are executed.
Virtualization using KVM
• The default virtualization technology supported in Ubuntu is KVM. For Intel and AMD hardware
KVM requires virtualization extensions. But KVM is also available for IBM Z and LinuxONE, IBM
POWER as well as for ARM64.
• Xen is also supported on Ubuntu, but not for all architecture, for example not for IBM Z and
LinuxONE. Xen can take advantage of virtualization extensions, when available, but can also be
used on hardware without virtualization extensions. Qemu is another popular solution for
hardware without virtualization extensions.
• KVM stands for Kernel-based Virtual Machine, and currently it has developed one of the most
popular virtual machines in the world. KVM is a full virtualization solution for Linux on x86
hardware containing virtualization extensions(Intel VT or AMD-V).
• It consists of a loadable kernel module, [Link] that provides the core virtualization infrastructure
and a processor specific module, [Link] or [Link]. KVM also requires a modified
QEMU although work is underway to get the required changes upstream.
• Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images.
Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.
with KVM, multiple virtual machines can run under the unmodified Linux or Windows images.
Every single virtual machine has its own virtualized hardware, containing network card(NIC),
storage devices, graphical user interface(GUI) etc.
• Compared with VMware and Hyper-V, KVM is open source. The kernel component of KVM is
included in mainline Linux, as of 2.6.20 and has since been fixed as a part of the kernel.
Benefits of using KVM:
• It support for any kind of guest OS.
• Efficient code
• KVM is open source and flexible
• User doesn’t have to pay for license.
oVirt - management tool for virtualization environment
• It is a complete virtualization management platform, licensed and developed as
open source software.
• It builds on the powerful KVM hypervisor and on the RHEV-M management server
released by Red Hat to the open source community.
• It is a large scale, centralized management for server and desktop virtualization.
• Provide an open source alternative to vCenter/vSphere. Two key components of
oVirt are:
• Hypervisor – oVirt Node
• Management Server – oVirt Engine
oVirt Node:
• It computes virtualization units that directly runs the virtual machine.
• oVirt nodes are servers using Linux x86_64 with the installed libvirt daemon
and VDSM(Virtual Desktop and Server Management) services.
• These are the set of packages and support services that are required for rapid
deployment of virtualization.
• The most preferred distribution to build the nodes is Red Hat Linux.
oVirt Engine:
• It is a control unit used for administrative tasks related to the management of
the global configuration of the entire virtualization infrastructure, the
management of virtual machines, storage and network settings.
• oVirt Engine is a set of software and services that implements the
functionality of the central control infrastructure.
• Using oVirt Engine interfaces, the administrator can run the whole setup
inside the oVirt.
Goals of the oVirt
• Build a community around all levels of the virtualization stack- hypservisor,
manager, GUI, API etc.
• To deliver both a cohesive complete stack and discretely reusable
components for open virtualization management.
• Provide a release of the project on a well defined schedule.
• Focus on management of the KVM hypervisor with exceptional guest support
beyond Linux.
• Provide a venue for user and developer communication and coordination.

You might also like