KEMBAR78
Interactive Session 2-Cloud Computing | PDF | Web Service | Soap
0% found this document useful (0 votes)
22 views30 pages

Interactive Session 2-Cloud Computing

The document outlines an interaction session on Cloud Computing led by Mainak Chakraborty at IIT Delhi, covering various topics including deployment models, virtualization, XML, and web services. It emphasizes the importance of on-demand resource delivery, pay-as-you-go pricing, and the flexibility of cloud services. Additionally, it introduces key concepts such as IaaS, PaaS, SaaS, and provides insights into AWS services like EC2, S3, and Lambda.

Uploaded by

Ronak Bhawnani
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)
22 views30 pages

Interactive Session 2-Cloud Computing

The document outlines an interaction session on Cloud Computing led by Mainak Chakraborty at IIT Delhi, covering various topics including deployment models, virtualization, XML, and web services. It emphasizes the importance of on-demand resource delivery, pay-as-you-go pricing, and the flexibility of cloud services. Additionally, it introduces key concepts such as IaaS, PaaS, SaaS, and provides insights into AWS services like EC2, S3, and Lambda.

Uploaded by

Ronak Bhawnani
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
You are on page 1/ 30

Interaction Session 2

on
Cloud Computing
noc25-cs11
by
Mainak Chakraborty

4th February 2025


Indian Institute of Technology, Delhi
1
Points to Remember:
• Total 10 more Discussion sessions to be taught
lectures and Tutorials
• Any specific problem, please upload in the
discussion forum, I will try to reply within 24
hours
• PPT and Video will be shared with everyone
• Assignments will not be solved but similar
problems will be solved.
TOPICS TO BE COVERED

1. Recap
2. Deployment Models
3. Virtualization
4. XML
5. XML-parser using Python
6. Web Services
Background
What is the server consisting of?
Network : Cables, router, switch
connected to each other

CPU/GPU/TPU: Compute
Power
RAM : Memory

Sql/no-sql : For data


storage
Traditional IT Approach

Google/Amazon
was made in a garage Which
means they had a server hosted in
their garage...
Example ?
What do we want ?
We need "On-Demand" delivery of computation, memory, storage, database
01

02
We want to pay only for what we use - "Pay-as-you-go" pricing

03 Flexibility / Elasticity to expand and contract. Example: Electricity Supply in our


house.

Easy-to-use UI for all type of users. Windows/Ubuntu etc.


04
Hmmm...but
05 what if I am a
Example : Google Drive, OneDrive, Gmail, Google Photos, Netflix....
institution?
• Infrastructure as a Service (IaaS) :
Infrastructure-as-a-Service (IaaS) is a form of
cloud computing service that offers
Types of Cloud Computing
compute, storage and networking resources
on-demand, usually on a pay-as-you-go
basis. Businesses can purchase resources on-
demand and as-needed instead of having to
buy the hardware outright.
Amazon EC2 (on AWS)
• Platform as a Service (PaaS) : Platform-as-a-
Service (PaaS) provides a framework for
application creation and deployment. The
technical stack (e.g., AWS Beanstalk, Google
App Engine) required for application
development is available on the cloud, which
requires no download or local installation.
Windows Azure (Microsoft)
• Software as a Service (SaaS) : Software as a
Service (SaaS) is a web-based software
deployment model that makes the software
accessible through a web browser. As a user
of SaaS software, you don’t care where the
software is hosted, which operating system it
uses, or which language it is written in. Source: https://www.eginnovations.com/blog/saas-vs-paas-vs-iaas-examples-differences-how-to-choose/

Google Apps (Gmail)


Stack Visualization
The Deployment Models of the Cloud
Private Cloud Public Cloud Hybrid Cloud
• Ubuntu Enterprise • Third Party Providers • Private+Public
Cloud - UEC – Amazon like AWS, Azure, • Keep some servers on
VPC (Virtual Private Google Cloud etc. premises and extend
Cloud) • some capabilities to
• IITkgp-->Megh the Cloud
• Complete Control,
specific Business need,
not accessible to public
Network,
Multi-tenancy
Characteristics

Multi-tenant

Source: https://www.geeksforgeeks.org/public-cloud-vs-private-cloud-vs-hybrid-cloud/
<note>

XML
<to>Student</to>
<from>NPTEL</from>
<heading>Reminder</heading>
<body>Don’t Forget WEEKLY Session</body>
</note>

XML (Extensible Markup Language) is a Rules:


markup language similar to HTML, but 1. All XML elements must have a closing tag.
without predefined tags to use. Instead, you 2. XML tags are case-sensitive.
define your own tags designed specifically 3. All XML elements must be properly nested.
for your needs. This is a powerful way to 4. All XML documents must have a root element.
store data in a format that can be stored, 5. Attribute values must always be quoted.
searched, and shared. Most importantly,
since the fundamental format of XML is <?xml version= “1.0” encoding=“ISO-8859-1”?>
standardized, if you share or transmit XML <note date=”05/05/05”>
across systems or platforms, either locally or <to>Dick</to>
over the internet, the recipient can still <from>Jane</from>
parse the data due to the standardized XML </note>
syntax.
Source: https://www.ibm.com/docs/hr/b2bis?topic=overview-xml-syntax-rules
XML Processing with Python
XML-SAX XML-DOM XML- element Tree

• It processes the document • DOM-based parser: It • Hybrid approach: It builds


sequentially and generates reads the entire XML file an element tree but can
events as it encounters and constructs an in- also be used to iteratively
tags (start tags, end tags, memory tree parse large XML files.
text). representation of the • Balances ease of use
• Suitable for large XML files document. with performance,
as it doesn't load the • Allows for random access suitable for both large
entire file into memory. to any part of the and small XML files.
• Low memory footprint document tree, making it • Easier manipulation and
easy to modify the searching through the
document. XML structure compared
• High memory usage to xml.sax.

Source: https://www.ibm.com/docs/hr/b2bis?topic=overview-xml-syntax-rules

Code : https://colab.research.google.com/drive/1acDwcm9kZ04wj5UNyT-ARVDSTMrrBge0?usp=sharing
What is Virtualization?
Virtualization is a process that allows a computer to
share its hardware resources with multiple digitally
separated environments. Each virtualized
environment runs within its allocated resources, such
as memory, processing power, and storage. With
virtualization, organizations can switch between
different operating systems on the same server
without rebooting.
Virtual machines and hypervisors are two important
concepts in virtualization.

dual-boot and virtualization allow you to run


multiple operating systems on a single computer,
the key difference is that dual-boot lets you only
use one operating system at a time by switching
between them during boot, whereas virtualization
enables you to run multiple operating systems
simultaneously within a virtual environment,
sharing the host computer's resources.
What is a Hypervisor?
The hypervisor (Virtual Machine Monitor) is a software component that manages multiple virtual
machines in a computer. It ensures that each virtual machine gets the allocated resources and does
not interfere with the operation of other virtual machines. There are two types of hypervisors.

• Type 1 hypervisor : A type 1 hypervisor, or bare-


metal hypervisor, is a hypervisor program
installed directly on the computer’s hardware
instead of the operating system. Therefore, type
1 hypervisors have better performance and are
commonly used by enterprise applications. KVM
uses the type 1 hypervisor to host multiple
virtual machines on the Linux operating system.

• Type 2 hypervisor: also known as a hosted


hypervisor, the type 2 hypervisor is installed on
an operating system. Type 2 hypervisors are
suitable for end-user computing.
Source : https://stl.tech/blog/introduction-to-virtualization/
What is a Virtual Machine?
virtual machines run like individual computers with individual operating systems and applications,
they have the advantage of remaining completely independent of one another and the physical host
machine.

Source : https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-a-virtual-machine
Virtual Machine vs Containerization
VM is isolation of machines, while Containers is isolation of processes.

Intera Examples
cting : Docker
with
machi
nes
via
hyper
visor

Source : https://www.atlassian.com/microservices/cloud-computing/containers-vs-vms
What is a "Web service"?
The term "Web service" describes a standardized way of integrating Web-based applications using
the XML, SOAP, WSDL and UDDI open standards over an Internet Protocol backbone. XML is the data
format used to contain the data and provide metadata around it, SOAP is used to transfer the data,
WSDL is used for describing the services available and UDDI lists what services are available.

• An application component that:


• Communicates via open protocols (HTTP, SMTP,
etc.)
• Processes XML messages framed using SOAP
(Simple Object Access Protocol-->Format for
sending messages over Internet between
programs)
• Describes its messages using XML Schema A Web API is a development in Web
services where emphasis has been moving
• Provides an endpoint description using WSDL to simpler representational state
• Can be discovered using UDDI transfer (REST) based
communications.[2] Restful APIs do not
require XML-based Web service protocols
(SOAP and WSDL) to support their
Source : https://stl.tech/blog/introduction-to-virtualization/
interfaces.
What is a "Web service"?
• Service Requester: This is the client or consumer that needs a
specific service. It interacts with the web service by sending a
request.
• Service Provider: This is the entity that offers the service. It hosts
the web service and makes it available to clients over the
network.
• Service Broker (UDDI): The Universal Description, Discovery, and
Integration (UDDI) acts as a directory service where web services
can be registered and categorized. Service providers use UDDI to
publish their services, making them discoverable.
• WSDL (Web Services Description Language): WSDL is an XML-
based language used for describing the functionality offered by a
web service. It provides a machine-readable description of how
Interoperability is a key strength of web services. They are
the service can be called, what parameters it expects, and what designed to enable different systems, applications, and platforms
to work together by using standard protocols like HTTP, XML,
data structures it returns. SOAP, and WSDL. This allows services written in different
• SOAP (Simple Object Access Protocol): SOAP is a protocol used programming languages and running on different platforms to
communicate seamlessly.
for exchanging structured information in the implementation of
web services in computer networks. It uses XML to encode its
HTTP-based communications, ensuring that the message Source : https://en.wikipedia.org/wiki/Web_service

structure is understandable by both the service requester and


provider.
What is a "Web service"?
•Discovery: The service requester queries the UDDI to find a service
that meets its requirements. The UDDI responds with a list of
services, each described by a WSDL file. The requester selects a
service based on the WSDL descriptions.
•Binding: After selecting a service, the requester uses the
information in the WSDL to bind or connect to the service. The
WSDL file describes the service endpoints (URLs), the operations
that the service exposes, and the parameters and data types these
operations accept and return.
•Invocation: The service requester then constructs a SOAP message,
encapsulating the operation to be performed and its required
parameters. This SOAP request is sent to the service provider via
HTTP.
•Processing: The service provider receives the SOAP request,
processes it according to the operation requested, and returns a
SOAP message with the results of the operation. In essence, while Google search is about finding
general information accessible on the web, UDDI is a
•Response: The service requester receives the SOAP response and specialized tool for discovering web services that
extracts the data from it for further processing or display. applications can interact with programmatically for
specific business functions.
Hands-on Session
AWS
[Basic Introduction to Services]
AWS Important Points
• Map : https://aws.amazon.com/about-aws/global-infrastructure/regions_az/
• A region is a cluster of data centers
• Most AWS services are region-scoped
• Each availability zone (AZ) is one or more discrete data centers with redundant power,
networking, and connectivity
• Pricing Depends on region
• Account Opening :
• AWS Free tier account --> you get 12 months some free services
https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-
tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all
• AWS Educate Account : For course- content you can refer to this
• BEFORE Opening and using any service- you must know how to close the service and complete
information about the services.
• We will learn about the basics of each services first before we use it next class
AWS Interface
AWS Account
Your Account's Root User :
•Usage of the root account, especially for
daily tasks, introduces several major
risks: Accidental misconfiguration or even
a small mistake when using the 'root' user
can have catastrophic consequences due
to the unrestricted permissions.
• AWS Identity and Access Management IAM
user
AWS popular Services
Amazon EC2 (Elastic Cloud Compute)
• Amazon EC2 is the fastest cloud computing service provided by AWS. It offers virtual, secure, reliable, and resizable servers for
any workload. Through this service, it becomes easy for developers to access resources and also facilitates web-scale cloud
computing. This comes with the best suitable processors, networking facilities, and storage systems. Developers can quickly and
dynamically scale capacities as per business needs. It has over 500 instances and you can also choose the latest processor,
operating system, storage, and networking to help you choose according to the needs of the business. Also, with Amazon EC2,
you only have to pay for what you use, and also as per the time period, scale with amazon EC2 auto-scaling has optimal storage
and can optimize CPU configurations.
Amazon S3
• With Amazon, it has become easy to store data anytime, anywhere. Amazon S3 (Simple Storage Service), one of the best
services provided by AWS is an object storage service offering scalability, availability, security, and high-performing. You can also
retrieve data, data here is stored in “storage classes” where there’s no requirement of extra investment and you can also man age
it well. Amazon S3 is the perfect fit for big businesses where a large amount of data is managed for varied purposes. It
comes with handling any volume of data with its robust access controls, and replication tools prevent accidental deletion, and
also maintains data version controls.
Amazon Lambda
• Another promising service by AWS is Amazon Lambda which is a serverless and event-driven computing service that lets you
run code for virtual applications or backend services automatically. You need to worry about servers and clusters when workin g
with solutions using Amazon Lambda. It is also cost-effective where you have to only pay for the services you use. As a user,
your responsibility is to just upload the code and Lambda handles the rest. Using Lambda, you get precise software scaling
and extensive availability. With hundreds to thousands of workloads per second, AWS Lambda responsibly handles code
execution requests. It is one of the best services provided by AWS for developers.
Amazon EC2 (Elastic Cloud Compute) Use Free-tier
functions only
An EC2 instance is a virtual server in the AWS Cloud. --> Close

Features of Amazon EC2


Amazon EC2 provides the following high-level features:
Instances
Virtual servers.
Amazon Machine Images (AMIs)
Preconfigured templates for your instances that package the
components you need for your server (including the operating
system and additional software).
Instance types
Various configurations of CPU, memory, storage, networking
capacity, and graphics hardware for your instances.
Amazon EBS volumes
Persistent storage volumes for your data using Amazon Elastic Block
Store (Amazon EBS).
Instance store volumes
Storage volumes for temporary data that is deleted when you stop,
hibernate, or terminate your instance.
Key pairs
Secure login information for your instances. AWS stores the public
key and you store the private key in a secure place.
Security groups
A virtual firewall that allows you to specify the protocols, ports, and https://aws.amazon.com/ec2/pricing/on-demand/
source IP ranges that can reach your instances, and the destination
IP ranges to which your instances can connect
https://www.geeksforgeeks.org/amazon-ec2-creating-
an-elastic-cloud-compute-instance/
Amazon S3 Use Free-tier
functions only
Amazon Simple Storage Service (Amazon S3) is an object storage service offering industry-leading scalability, data availability, security, and
performance.

Features of Amazon S3
• Bucket : A general-purpose bucket is a container for objects stored in Amazon S3.
You can store any number of objects in a bucket and all accounts have a default
bucket quota of 10,000 general purpose buckets. Every object is contained in a
bucket. For example, if the object named photos/puppy.jpg is stored in
the amzn-s3-demo-bucket bucket in the US West (Oregon) Region, then it is
addressable by using the URL https://amzn-s3-demo-bucket.s3.us-west-
2.amazonaws.com/photos/puppy.jpg.

• When you create a bucket, you enter a bucket name and choose the AWS Region
where the bucket will reside. After you create a bucket, you cannot change the
name of the bucket or its Region. Bucket names must follow the bucket naming
rules. You can also configure a bucket to use S3 Versioning or other storage
management features.

• Object : Objects are the fundamental entities stored in Amazon S3. Objects consist
of object data and metadata. The metadata is a set of name-value pairs that
describe the object. These pairs include some default metadata, such as the date
last modified, and standard HTTP metadata, such as Content-Type. You can also
specify custom metadata at the time that the object is stored.

https://aws.amazon.com/ec2/pricing/on-demand/
Use Free-tier

Buckets functions only

Amazon Simple Storage Service (Amazon S3) is an object storage service offering industry-leading scalability, data availability, security, and
performance.

Features of Buckets
• When you create a general purpose bucket, you choose its name and the AWS Region to
create it in. After you create a general purpose bucket, you can't change its name or
Region. The following sections provide information about general purpose bucket
naming, including naming rules, best practices, and an example for creating a general
purpose bucket with a name that includes a globally unique identifier (GUID).

• Important Rules :
•Bucket names must be unique across all AWS accounts in all the AWS Regions within a
partition. A partition is a grouping of Regions. AWS currently has three
partitions: aws (commercial Regions), aws-cn (China Regions), and aws-us-gov (AWS
GovCloud (US) Regions).
•A bucket name can't be used by another AWS account in the same partition until the
bucket is deleted. After you delete a bucket, be aware that another AWS account in the
same partition can use the same bucket name for a new bucket and can therefore
potentially receive requests intended for the deleted bucket. If you want to prevent this, or
if you want to continue to use the same bucket name, don't delete the bucket. We
recommend that you empty the bucket and keep it, and instead, block any bucket requests
as needed.

• Bucket policy
https://docs.aws.amazon.com/AmazonS3/latest/us
• First delete objects and then delete Bucket erguide/Welcome.html#BasicsBucket
• https://aws.amazon.com/s3/pricing/
Amazon Lambda: Function as a
Use Free-tier
functions only

service (FaaS)
AWS Lambda is a serverless computing service that automatically runs code in response to events, without
requiring you to manage the underlying infrastructure. It supports event-driven applications triggered by
events such as HTTP requests, DynamoDB table updates, or state transitions. You simply upload your code
(as a .zip file or container image), and Lambda handles everything from provisioning to scaling and
maintenance. It automatically scales applications based on traffic, handling server management, auto-
scaling, security patching, and monitoring. AWS Lambda is ideal for developers who want to focus on
writing code without worrying about infrastructure management.
SERVER-->
Features of Amazon Lambda
• AutoScaling and High Availability:
• Serverless Execution:
• Pay-per-use-pricing:
• Supports different programming languages:
• Integrates with other AWS Services:
• Versioning and Deployment:
• Security and Identity Management:
SERVER-Less-->

https://aws.amazon.com/lambda/pricing/
Case Study : Food Delivery Startup
• Let’s assume you are a mobile app developer building a food ordering app. Customers can use the app to order food from a
specific restaurant location, receive order status updates, and pick up the food when the order is ready. Because you expect
high variation in demand, both by time of day and restaurant location, you build your mobile backend using serverless services,
including AWS Lambda.
• For simplicity, let’s assume your application processes three million requests per month. The average function execution
duration is 120 ms. You have configured your function with 1536 MB of memory, on an x86 based processor. Your charges
would be calculated as follows:
• Monthly compute charges
• The monthly compute price is $0.0000166667 per GB-s and the free tier provides 400,000 GB-s.
Total compute (seconds) = 3 million * 120ms = 360,000 seconds
Total compute (GB-s) = 360,000 * 1536MB/1024 MB = 540,000 GB-s
Total compute – Free tier compute = monthly billable compute GB- s
540,000 GB-s – 400,000 free tier GB-s = 140,000 GB-s
Monthly compute charges = 140,000 * $0.0000166667 = $2.33
• Monthly request charges
• The monthly request price is $0.20 per one million requests and the free tier provides 1 million requests per month.
Total requests – Free tier requests = monthly billable requests
3 million requests – 1 million free tier requests = 2 million monthly billable requests
Monthly request charges = 2M * $0.2/M = $0.40
• Total monthly charges
• Total charges = Compute charges + Request charges = $2.33 + $0.40 = $2.73 per month

You might also like