0% found this document useful (0 votes)
29 views42 pages

DD Class 02

Uploaded by

nagham abuwarda
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)
29 views42 pages

DD Class 02

Uploaded by

nagham abuwarda
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

DISTRIBUTED AND CLOUD SYSTEMS

Chapter 2: Cloud Architectures and


Classification
Outline
• Introduction to Cloud Computing

• Cloud Service Models

• Cloud Deployment Models

• Components of Cloud Architecture


Introduction
• Cloud computing is a type of computing that relies on shared computing resources
rather than having local servers or personal devices to handle applications.

• Cloud computing is Internet-based computing, whereby shared resources, software


and information are provided to computers and other devices on-demand, like the
electricity grid.

• Cloud Computing
• The practice of using a network of remote servers hosted on the internet to store,
manage, and process data, rather than a local server or a personal computer (On-
Premise).
On-Premise vs. Cloud Providers
• On-Premise • Cloud Providers
• You own the servers • Someone else owns the servers
• You hire the IT people • Someone else hires the IT people
• You pay or rent the place • Someone else pays or rents the real-
• You take all the risk estate
• You are responsible for your configuring
cloud services and code, someone else
takes care of the rest.
Common Cloud Services
• A cloud provider that are grouped various types of services. The four most common
types of cloud services for Infrastructure as a Service (IaaS) would be:

Compute Databases
having a virtual computer that Having a virtual database for storing
can run application, programs and code reporting data or a database for
general purpose web- application

Networking Storage
having a virtual network being able to define having a virtual hard-drive that can
internet connections or network isolations store files

The term “Cloud Computing” can be used to refer to all categories, even though it has
“compute”
The Five Characteristics of Cloud Computing
• On-demand self service:
• Users can provision resources and use them without human interaction from the service provider

• Broad network access:


• Resources available over the network, and can be accessed by diverse client platforms

• Multi-tenancy and resource pooling:


• Multiple customers (individuals, organizations or different departments within an organization) can
share the same infrastructure and applications with security and privacy
• Multiple customers are serviced from the same physical resources
The Five Characteristics of Cloud Computing
• Rapid elasticity and scalability:
• Automatically and quickly acquire and dispose resources when needed
• Quickly and easily scale based on demand

• Measured service:
• Usage is measured, users pay correctly for what they have used, rather than paying for hardware or
software upfront
Advantages of Cloud Computing
1. Trade capital expense for variable expense
Pay On-Demand meaning there is no upfront-cost and you pay for only what you consume or pay by the hour,
minutes or seconds.
Instead of paying for upfront costs of data centers and servers

2. Benefit from massive economies of scale


You are sharing the cost with other customers to get unbeatable savings.
Hundreds of thousands of customers utilizing a fraction of a server

3. Stop guessing capacity


Scale up or down to meet the current need. Launch and destroy services whenever
Instead of paying for idle or underutilized servers.
Advantages of Cloud Computing
4. Increase speed and Agility
Launch resources within a few clicks in minutes
instead of waiting days or weeks of your IT to implement the solution on-premise.

5. Stop spending money on running and maintaining data


Focus on your own customers, developing and configuring your applications
Instead of operations such as of racking, stacking, and powering servers
Cloud Components
• Three components of a cloud computing are :
• Clients
• Data center
• Distributed servers
Cloud Components
• Clients:
• Clients are the devices that the end users interact with to manage their information on the
cloud.
• Clients are of three categories :
• Mobile: mobile devices including PDAs/smart phones like a blackberry, windows, iphone.
• Thin: are comps that don’t have internal hard drives then display the info but rather let server do all
the work.
• Thick: is a regular comp, using web browser like Firefox/Internet Explorer to connect to the cloud.
Cloud Components
• Data Center :
• It is a collection of servers where the application
you subscribe and housed.
• A data center typically has tens of thousands of
servers
• Data centers are where the data resides and data
processing occurs
• All data centers are online and serving customers
Data Center vs. Distributed Servers
A Data Center is a centralized hub of servers, whereas Distributed Servers are spread across different
locations but work together as a unified system

Datacenter Distributed Servers


Location Centralized in one or a few physical Spread across multiple geographic locations.
locations.
Purpose Provides centralized storage, Work together across locations to provide
management, and processing of data. redundancy, reduce latency, and improve
service availability.
Example Use Hosting critical applications and data in Serving global users with low-latency, high-
Cases a single secure location. availability services like content delivery
networks (CDNs) or global e-commerce
platforms.
Example Case: Facebook’s Data Center in Luleå, Sweden

• Scenario:
• Facebook operates a massive data center in Luleå, Sweden. This
data center houses thousands of servers and handles data
processing, storage, and management for Facebook's users.
When you upload a photo or send a message on Facebook, the
data might be processed and stored in this data center.

• Key Characteristics:
• All the servers are physically located in one centralized facility.
• The data center is designed for high security, efficient cooling,
and stable power supply.
• Even though Facebook has multiple data centers worldwide,
each one operates as a centralized hub for a particular region
or set of services.
Example Case: Amazon’s CloudFront Content Delivery Network (CDN)

• Scenario:
• Amazon CloudFront is a content delivery network that
uses distributed servers to deliver content (e.g.,
videos, images, web pages) to users based on their
geographic location.
• For instance, when you stream a video on Amazon
Prime, CloudFront automatically directs you to the
nearest server in its network. This reduces the time it
takes for the video to load, providing a faster and
smoother experience.
• Key Characteristics:
• Servers are distributed across many geographic locations worldwide.
• These servers act together to deliver content quickly and efficiently, reducing latency by being
physically closer to users.
• If one server in the network goes down, the system can reroute traffic to another server without
service interruption.
AWS global infrastructure
• AWS Regions
• An AWS Region is a geographical area
• Each AWS Region consists of two or more Availability
Zones
• Communication between Regions uses AWS backbone
network infrastructure

• Each Availability Zone is –


• Made up of one or more data centers
• Interconnected with other Availability Zones in a Region
using high-speed private links
• For certain services, you can choose your Availability
Zones
Cloud Service Models
• Cloud computing services are divided into three classes, according to the abstraction level of
the capability provided and the service model of providers.

• Cloud computing services are categorized based on:


• what they offer to users
• how much control users have over the computing resources.

• Abstraction Level of the Capability Provided:


• This relates to how much of the underlying technology is hidden from the user.
• The higher the abstraction, the less the user needs to manage.
Cloud Service Models
• IaaS (Infrastructure as a Service) • SaaS (Software as a Service)
• Lowest level of abstraction. • Highest level of abstraction.
• Users manage and control the most (e.g., virtual • The entire application is managed by the
machines, storage). provider.
• The provider offers infrastructure components • The provider offers fully functional software that
like servers, storage, and networking, but users users can access over the internet
configure everything else. • Users just use the software (e.g., dropbox).
• PaaS (Platform as a Service)
• Medium level of abstraction.
• The platform (like an operating system or
development environment) is managed by the
provider
• users can focus on building and running
applications.
Cloud Service Models
Example of Cloud Computing Types
• Infrastructure as a Service:
• Amazon EC2 (on AWS)
• GCP, Azure, Rackspace, Digital Ocean
• Platform as a Service:
• RDS (on AWS)
• Heroku, Google App Engine (GCP),
Windows Azure (Microsoft)
• Software as a Service:
• Many AWS services (ex: Recognition for
Machine Learning)
• Google Apps (Gmail), Dropbox, Zoom
The Deployment Models of the Cloud
• Refer to the different ways cloud services can be deployed and accessed by users.

• Each model defines who can use the cloud services, how they are managed, and where the
infrastructure is located.

• Cloud deployment models define how cloud services are set up, who can access them, and
where they are located, offering different levels of control, security, and cost.
The Deployment Models of the Cloud
Public Cloud: Private Cloud: Hybrid Cloud:
• Vendors offer their • With a hosted private cloud, a • Keep some servers on premises
computing services to public cloud vendor agrees to set and extend some capabilities to
anyone in the general public. aside certain computing the Cloud
• They maintain large data resources and allow only one • a company may run Web servers
centers full of computing customer to use those in its own private cloud most of
hardware, and their resources. the time and use a public cloud
customers share access to • Complete control service for additional capacity
that hardware. • Security for sensitive during times of peak use.
applications
• They can set up a private cloud
in their own data centers or they
can use a hosted private cloud
service.
The Deployment Models of the Cloud
Infrastructure of Cloud Computing
• Cloud infrastructure means the hardware and
software components.

• These components are server, storage,


networking and virtualization software.
Server
• These components are required to support the
computing requirements of a cloud computing
model.
Infrastructure of Cloud Computing
• Server • Networking
• Provide processing power and memory resources. • Connects all components (servers,
• Physical machines housed in data centers, but storage, etc.) and enables
through virtualization, they can be split into communication between them, as well
multiple virtual machines (VMs). as between the cloud and external
• These VMs run isolated instances of operating networks (like the internet).
systems and applications, allowing multiple users • This includes virtual private networks
to share the same physical hardware while (VPNs), load balancers, firewalls, and
operating independently routers.
• Storage
• Storage systems that manage data in the cloud.
• Represents the storage facility which is provided
to different organizations for storing and
managing data.
Infrastructure of Cloud Computing
• Virtualization Software
• Virtualization software is the layer that abstracts the physical hardware into virtual resources. It
allows the creation of virtual machines (VMs).
• Key technology used in cloud computing
• The hypervisor is the key component that manages the virtual machines and allocates
resources (CPU, memory, storage) from the underlying physical hardware.
• This allows multiple VMs to run on a single physical server with isolation and flexibility.

• Example:
• VMware ESXi is a type of hypervisor used by many cloud providers to virtualize servers.
• It allows the creation of multiple VMs on a single physical host. Each VM runs its own operating
system and applications, isolated from other VMs, even though they share the same physical
hardware.
What is an API?
• APIs (Application Programming Interface) are mechanisms that enable two software
components to communicate with each other.

• For example, the weather bureau’s software system contains daily weather data. The weather
app on your phone “talks” to this system via APIs and shows you daily weather updates on
your phone.

API
How do APIs work?
• API architecture is usually explained in terms of client and server.

• The application sending the request is called the client, and the application sending the
response is called the server.
• So in the weather example, the bureau’s weather database is the server, and the mobile app
is the client.
How do APIs work?
• There are different ways that APIs can work depending on when and why they were
created.
• SOAP APIs
• These APIs use Simple Object Access Protocol. Client and server exchange messages using XML.
• This is a less flexible API that was more popular in the past.
• RPC APIs
• These APIs are called Remote Procedure Calls. The client completes a function (or procedure) on
the server, and the server sends the output back to the client.
• Suitable for applications requiring complex interactions or procedures
• REST APIs
• Most popular and flexible APIs found on the web today. The client sends requests to the server as
data. The server uses this client input to start internal functions and returns output data back to the
client.
• REST is widely used for web services due to its simplicity and alignment with standard HTTP
• Typically use JSON or XML for data representation
REST APIs use XML for both requests SOAP APIs use XML for both requests and responses.
and responses.
<soapenv:Envelope
xmlns:soapenv="[Link]
xmlns:weat="[Link]
<soapenv:Header/>
<soapenv:Body>
<weat:GetWeather>
<weat:City>New York</weat:City>
</weat:GetWeather>
</soapenv:Body>
</soapenv:Envelope>
Cloud API
• A Cloud API is a software interface which
allows developers to interact with cloud
services and resources.

• Cloud users need a way to access the cloud,


provision new virtual servers, get data in and
out of storage, start and stop applications on
those servers, and decommission servers
that are no longer needed.

• These APIs enable seamless communication between applications and cloud platforms, such as
AWS, Google Cloud, or Azure, without needing to manage the underlying infrastructure directly.
Cloud API Benefits
• Resource Management:
• APIs allow users to manage cloud resources like virtual machines, storage, and databases.
• For example, using an API, you can create, modify, or delete resources such as servers or storage
units within a cloud environment.

• Service Integration:
• APIs enable different cloud services to integrate and work together seamlessly.
• This is crucial for building complex applications that rely on multiple cloud services.

• Automation:
• APIs enable automation of repetitive tasks, such as scaling resources up or down based on demand,
deploying applications, or backing up data.
Cloud API Benefits
• Accessibility:
• APIs provide standardized methods for accessing cloud services, making it easier for developers to
use different cloud platforms and services consistently.

• Security and Control:


• APIs often include mechanisms for authentication and authorization, ensuring that only authorized
users can access certain resources or perform specific actions.
Service Integration: e-commerce website
• Scenario:
• Imagine you have an e-commerce website hosted on AWS. You want to send an email
confirmation to customers after they make a purchase.

• Solution:
• You can integrate Amazon SES (Simple Email Service) with your website using its API. When a
customer completes a purchase, your website’s backend makes an API call to Amazon SES to
send an email confirmation to the customer.
• This integration allows your e-commerce platform and email service to work together
seamlessly.
Accessibility use-case: building a weather app
• Suppose you are a developer building a weather app.

• Instead of gathering weather data yourself, you use the OpenWeatherMap API.

• This API provides you with weather data for any location in a standardized format (like JSON).

• You can easily access and display the weather information in your app by making simple API
calls to OpenWeatherMap, regardless of the programming language or platform you’re using.
Automation use-case: Autoscaling resources
• A company runs a blog that experiences varying levels of traffic throughout the day.

• To handle this, they use AWS Auto Scaling, which automatically adjusts the number of EC2
instances based on traffic.

• The Auto Scaling service is managed through an API. When traffic increases, the API
automatically launches more instances; when traffic decreases, it shuts down unnecessary
ones. This automation ensures the website remains responsive without the need for manual
intervention.
What are the different types of APIs?
• APIs are classified both according to their architecture and scope of use.
• Private APIs
• These are internal to an enterprise and only used for connecting systems and data within the
business.
• Public APIs
• These are open to the public and may be used by anyone. There may or not be some authorization
and cost associated with these types of APIs.
• Partner APIs
• These are only accessible by authorized external developers to aid business-to-business
partnerships.
• Composite APIs
• These combine two or more different APIs to address complex system requirements or behaviors.
Different types of APIs - examples

• Private APIs
• Used within an organization, restricted to internal use.
• Scenario: Internal company API for managing employee data.
• Public APIs
• Available to anyone on the internet, often requires an API key.
• Scenario: Fetching weather data from a publicly available weather service.
• Partner APIs
• Scenario: An e-commerce platform integrates with a logistics company's API to track orders.
• Composite APIs
• These combine two or more different APIs to address complex system requirements or behaviors.
Example: E-Commerce Order Processing
• You have an e-commerce platform where customers can browse products, place orders, and
receive confirmations. When a customer places an order, multiple operations need to be
performed, such as checking inventory, processing payment, creating the order, and notifying
the shipping service.

• Three Steps:
• 1. API Request from the Client:
• Client Action: The customer clicks "Place Order" on the website.
• Single API Call: The client sends a request to the Composite API endpoint. This single API call
contains all the necessary information, such as product details, payment information, and
customer address.
• 2. Composite API Logic:
• The Composite API is designed to handle multiple operations internally. Here’s how it works step-by-step:
• a. Inventory Check:
• Internal API Call: The Composite API first calls the Inventory API to check if the items are in stock.
• Response Handling: If all items are available, the process continues. If not, the API returns an error, and the order
process is halted.
• b. Payment Processing:
• Internal API Call: If inventory is sufficient, the Composite API makes a call to the Payment API to process the
customer’s payment.
• Response Handling: The API waits for confirmation from the payment gateway. If the payment is successful, the
process moves forward. If not, the API returns an error to the client.
• c. Order Creation:
• Internal API Call: After payment is confirmed, the Composite API creates the order by calling the Order Management
API. This API writes the order details to the database and generates an order ID.
• Response Handling: The order is successfully recorded, and the order ID is returned.
• d. Shipping Notification:
• Internal API Call: Finally, the Composite API notifies the Shipping Service via an API call. The service prepares the
order for delivery and may generate a tracking number.
• Response Handling: The tracking number and shipping details are stored or returned.
Example: E-Commerce Order Processing
• 3. Unified Response:
• Composite API Response: Once all internal API calls are completed successfully, the
Composite API consolidates the results from each service (inventory confirmation, payment
success, order ID, tracking number) and sends a unified response back to the client.

• Client Receives: The client displays a confirmation to the customer, including order details,
payment status, and tracking information.
END

You might also like