程序代写代做代考 python Week 10 – Cloud Computing 2

Week 10 – Cloud Computing 2

CLOUD COMPUTING (2)
Dr Bailin Deng

Recall: Different Service Models

Hosted
applications

Development tools,
DB management, etc.

OS Servers &
Storage

Networking
firewalls/security

Data center
physical facility

IaaS
• An IaaS provider supplies virtual machine images of

different operating systems.

• The user is responsible for the setup and maintenance of
services running on the virtual machines.

PaaS
• With PaaS, a user develops/deploys applications using

languages, libraries, services, and tools supported by the
provider, without the complexity of managing the
underlying virtual machines.

SaaS
• With SaaS, services and applications are provided to the

user on an on-demand basis. They can be accessed
using a thin client or via a web browser

Example: Google Cloud Platform
• Google Compute Engine (IaaS)

• “Scalable, High-Performance Virtual Machines”
• https://cloud.google.com/compute/

Example: Google Cloud Platform
• Google App Engine (PaaS)

• “Build scalable web and mobile backends in any language on
Google’s infrastructure”

• https://cloud.google.com/appengine/

SaaS From Google
• Cloud applications accessed via web browsers

• Google Docs, etc.

• APIs available to third parties (e.g. as http requests)
• Google Translate API
• Custom Search API
• …

Using SaaS API in a Program
• In the lab, we’ll be using a Python program, run locally, to

access the Google Custom Search API

• Typically need
• Local library/libraries that allows your program to connect to the API

(e.g., Google API Python Client)
• An account (e.g. Gmail account)
• A way of authenticating and connecting to your particular use of the

API

Authentication and Connection
• To use Google APIs, you need an API key to authenticate

access

• For services which access personal data, you need
authorization too (e.g. accessing your own Gmail)

• Google Custom Search API requires an API key and a
Search Engine ID which related to your specific search
engine
• e.g. one that searches www.cardiff.ac.uk/computer-science

Authentication and Connection
• Then your program can connect to the service and issue

a request:

service = build(“customsearch”, “v1”,
developerKey=’‘)

res = service.cse().list(
q=’‘,
cx=’‘,

).execute()

SaaS for Collaboration

Cloud Rendering

Cloud Based Machine Learning

Salesforce.com
• Cloud based Customer Relationship Management (CRM)

https://www.youtube.com/watch?v=mbo8_VHaBWw

Benefits of SaaS
• Cost savings

• Scalability: easy to add more users

• Accessibility: requires only internet connection + browser

• Upgradeability: service providers take care of upgrades

• Resilience: data stored in the cloud with backup

Drawbacks of SaaS
• Security: sensitive data in the cloud, requires identity

management

• Outages: service relies on internet connection

• Performance: limited functionalities via the browser

• Integration: data exchange between multiple SaaS

Operating-system-level Virtualization
• A server virtualization method

• The kernel of an OS allows the existence of multiple isolated user-
space instances

• Each instance, called container, may look and feel like a real server
for its owners and users

• Example: Docker (https://www.docker.com/)

Docker Containers

https://www.youtube.com/watch?v=vxSeuchYBkA

Virtual Machines VS Containers

Virtual Machines VS Containers
• A virtual machine is an entire operating system

installation, with access to the underlying hardware
mediated by the Hypervisor.
• It requires plenty of memory and disk space, and is entirely

separated from other VMs running on the same host.

• A container shares the kernel with other containers.
• It still includes the application and all dependencies, and is isolated

from the rest of the host system and other containers.