Professional Documents
Culture Documents
Objective
To appreciate the evolution of cloud from the existing technologies
Outcome
Learn the key and enabling technologies that help in the development of cloud
Service Oriented Architecture
• In grids/web services, Java, and CORBA, an entity is,
respectively, a service, a Java object, and a CORBA
distributed object in a variety of languages.
■ higher performance
Logical view
Message orientation
Description orientation
The semantics of a service should be documented, either directly or indirectly, by its description
Granularity Services tend to use a small number of operations with relatively large and complex
messages.
Granularity Services tend to use a small number of operations with relatively large and complex
messages.
★ In a web services language, REST has minimal information in the header, and the
message body (that is opaque to generic message processing) carries all the needed
information.
★ REST can use XML schemas but not those that are part of SOAP; “XML over HTTP” is a
popular design choice in this regard
REST and Systems of Systems
• REST is a software architecture style for distributed systems,
particularly distributed hypermedia systems, such as the World Wide
Web.
• It has recently gained popularity among enterprises such as Google,
Amazon, Yahoo!, and especially social networks such as Facebook and
Twitter because of its simplicity, and its ease of being published and
consumed by clients.
• The REST architectural style is based on four principles:
• Resource Identification through URIs
• Uniform, Constrained Interface
• Self-Descriptive Message
• Stateless Interactions
APIs What is a REST API?
An API, or application programming interface, is a set REST APIs provide a flexible, lightweight way to integrate
of rules that define how applications or devices can applications, and have emerged as the most common
connect to and communicate with each other. method for connecting components in microservices
architectures.
At the most basic level, an API is a mechanism that enables an application or service to
access a resource within another application or service. The application or service doing
the accessing is called the client, and the application or service containing the resource is
called the server.
Some APIs, such as SOAP or XML-RPC, impose a strict framework on developers. But
REST APIs can be developed using virtually any programming language and support a
variety of data formats. The only requirement is that they align to the following six REST
design principles - also known as architectural constraints:
1.Uniform interface. All API requests for the same resource should look the same, no matter where the request comes
from. The REST API should ensure that the same piece of data, such as the name or email address of a user, belongs to
only one uniform resource identifier (URI). Resources shouldn’t be too large but should contain every piece of
information that the client might need.
2.Client-server decoupling. In REST API design, client and server applications must be completely independent of
each other. The only information the client application should know is the URI of the requested resource; it can't
interact with the server application in any other ways. Similarly, a server application shouldn't modify the client
application other than passing it to the requested data via HTTP.
3.Statelessness. REST APIs are stateless, meaning that each request needs to include all the information necessary for
processing it. In other words, REST APIs do not require any server-side sessions. Server applications aren’t allowed to
store any data related to a client request.
4.Cacheability. When possible, resources should be cacheable on the client or server side. Server responses also need
to contain information about whether caching is allowed for the delivered resource. The goal is to improve
performance on the client side, while increasing scalability on the server side.
5.Layered system architecture. In REST APIs, the calls and responses go through different layers. As a rule of thumb,
don’t assume that the client and server applications connect directly to each other. There may be a number of different
intermediaries in the communication loop. REST APIs need to be designed so that neither the client nor the server can
tell whether it communicates with the end application or an intermediary.
6.Code on demand (optional). REST APIs usually send static resources, but in certain cases, responses can also
contain executable code (such as Java applets). In these cases, the code should only run on-demand.
How REST APIs work
REST APIs communicate via HTTP requests to perform standard database functions like
creating, reading, updating, and deleting records (also known as CRUD) within a resource.
For example, a REST API would use a GET request to retrieve a record, a POST request to
create one, a PUT request to update a record, and a DELETE request to delete one. All HTTP
methods can be used in API calls. A well-designed REST API is similar to a website running in
a web browser with built-in HTTP functionality.
The state of a resource at any particular instant, or timestamp, is known as the resource
representation. This information can be delivered to a client in virtually any format including
JavaScript Object Notation (JSON), HTML, XML, Python, PHP, or plain text. JSON is popular
because it’s readable by both humans and machines—and it is programming language-
agnostic.
Request headers and parameters are also important in REST API calls because they include
important identifier information such as metadata, authorizations, uniform resource
identifiers (URIs), caching, cookies and more. Request headers and response headers, along
with conventional HTTP status codes, are used within well-designed REST APIs.
Working of REST API
Example: RESTful Web Service in Amazon S3 Interface
• A good example of RESTful web service application in high-
performance computing systems is the Amazon Simple Storage
Service (S3) interface.
• Amazon S3 is data storage for Internet applications. It provides simple
web services to store and retrieve data from anywhere at any time
via the web.
• S3 keeps fundamental entities, “objects,” which are named pieces of
data accompanied by some metadata to be stored in containers
called “buckets,” each identified by a unique key.
• Buckets serve several purposes: They organize the Amazon S3
namespace at the highest level, identify the account responsible for
storage and data transfer charges, play a role in access control, and
serve as the unit of aggregation for usage reporting.
• Amazon S3 provides three types of resources: a list of user buckets, a
particular bucket, and a particular S3 object, accessible through
https://s3.amazonaws.com/{name-of-bucket}/{name-of-object}
<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV
="http://www.w3.org/2001/12/soap-envelope"
SOAP-ENV:encodingStyle {"city":"Mumbai","state":"Maharastra"}
=" http://www.w3.org/2001/12/soap-encoding">
<soap:Body>
<Demo.guru99WebService
xmlns="http://tempuri.org/">
<EmployeeID>int</EmployeeID>
</Demo.guru99WebService>
</soap:Body>
</SOAP-ENV:Envelope>
Quiz on Service Oriented Architecture - Intro
https://forms.gle/MW3YbtfSV8SsVCx9A
Virtualization
• Virtualization is a computer architecture technology by which multiple virtual machines
(VMs) are multiplexed in the same hardware machine.
• The purpose of a VM is to enhance resource sharing by many users and improve
computer performance in terms of resource utilization and application flexibility.
• Hardware resources (CPU, memory, I/O devices, etc.) or software resources (operating
system and software libraries) can be virtualized in various functional layers.
• This virtualization technology has been revitalized as the demand for distributed and
cloud computing increased sharply in recent years
• The idea is to separate the hardware from the software to yield better system efficiency.
For example, computer users gained access to much enlarged memory space when the
concept of virtual memory was introduced.
• Similarly, virtualization techniques can be applied to enhance the use of compute
engines, networks, and storage.
• With sufficient storage, any computer platform can be installed in another host
computer, even if they use processors with different instruction sets and run with
distinct operating systems on the same hardware.
Levels of Virtualization Implementation
A traditional computer
runs with a host
operating system
specially tailored for its
hardware architecture
• After virtualization, different user
applications managed by their own
operating systems (guest OS) can run
on the same hardware, independent
of the host OS.
• This is often done by adding additional
software, called a virtualization layer
• This virtualization layer is known as
hypervisor or virtual machine monitor
(VMM)
• The VMs are shown in the upper
boxes, where applications run with
their own guest OS over the
virtualized CPU, memory, and I/O
resources.
The virtualization software creates the
abstraction of VMs by interposing a
virtualization layer at various levels of a
computer system.
https://cloud.google.com/appengine/docs/standar
d/python3/an-overview-of-app-engine
Reading – 15 mins
Discussion – 10 mins
Quiz on virtualization
https://forms.gle/5w7SErRbhNGCJwhn7
VIRTUALIZATION STRUCTURES/TOOLS AND MECHANISMS
For the most efficient virtual disaster recovery, an organization should copy virtual machine (VM) workloads off-
site on a regular basis. Replication can essentially make a real-time copy of VMs in a separate location, thus
strengthening DR.
Virtualization provides flexibility in disaster recovery. When servers are virtualized, they are containerized into
VMs, independent from the underlying hardware. Therefore, an organization does not need the same physical
servers at the primary site as at its secondary disaster recovery site.
Virtualized platforms typically provide high availability in the event of a failure. Virtualization helps meet
recovery time objectives (RTOs) and recovery point objectives (RPOs), as replication is done as frequently as
needed, especially for critical systems.
DR planning and failover testing is also simpler with virtualized workloads than with a physical setup, making
disaster recovery a more attainable process for organizations that may not have the funds or resources for
physical DR.
In addition, consolidating physical servers with virtualization saves money because the virtualized workloads
require less power, floor space and maintenance. However, replication can get expensive, depending on how
frequently it's done.
What is recovery time objective?
The recovery time objective (RTO) is the maximum tolerable length of time that a computer, system, network or
application can be down after a failure or disaster occurs.
The RTO is a function of the extent to which the interruption disrupts normal operations and the amount of
revenue lost per unit time because of the disaster.
How do you calculate RTO? Calculating RTO requires determining how quickly the
Calculating recovery time objective is a multistep process recovery process for a given application, service,
that needs to be considered from several different system or data needs to happen after a major incident
viewpoints, including business impact analysis (BIA), DR based on the loss tolerance the organization has for
strategy and business continuity planning. that application, service, system or data as part of its
BIA. Defining the loss tolerance involves how much
The key goal of an RTO is to determine what duration of operational time an organization can afford (or is
time it will take in a recovery process after a major willing) to lose after an incident before normal
incident to resume normal business operations. business operations must resume.
What is recovery point objective?
The recovery point objective (RPO) is the age of files that For example, if the RPO is one hour, admins
must be recovered from backup storage for normal must schedule backups for at least once per
operations to resume if a computer, system or network goes hour. In this case, external, redundant hard
down as a result of a hardware, program or communications drives may prove to be the best disaster
failure. The RPO is expressed backward in time -- that is, recovery platform. If the RPO is five days (120
into the past -- from the instant at which the failure occurs hours), then backups must happen at intervals of
and can be specified in seconds, minutes, hours or days. It is 120 hours or fewer.
an important consideration in a disaster recovery plan
•Decide which systems and data are the most critical for recovery, and document them.
•Get management support for the DR plan
•Complete a risk assessment and business impact analysis to outline possible risks and
their potential impacts.
•Document steps needed for recovery.
•Define RTOs and RPOs.
•Test the plan.
RPO AND RTO
Virtualization Support and Disaster
Recovery
Discussion
These options are chosen based on the business’s RPO and RTO as
desired.