You are on page 1of 50

ECS781P

CLOUD COMPUTING

INTRODUCTION TO CLOUD
APPLICATIONS
Lecturer: Dr. Sukhpal Singh Gill
School of Electronic Engineering and Computer Science
2
Contents
• Challenges in Cloud Networking
• Server-side Development
• Web and HTTP

3
Post-Brexit - Data Sharing
U.K. Citizens Can't Access Data Held In A European
Cloud

Source: EU’s General Data Protection Regulation


4
Internet infrastructure outages

Giotsas, V., Dietzel, C., Smaragdakis, G., Feldmann, A., Berger, A., & Aben, E. (2017,
August). Detecting peering infrastructure outages in the wild. In Proceedings of the
conference of the ACM special interest group on data communication (pp. 446-459).
BGP prefix hijacking

https://www.zdnet.com/article/russian-telco-hijacks-internet-traffic-for-google-aws-cloudflare-and-others/
DDoS attacks

https://blog.cloudflare.com/the-ddos-that-almost-broke-the-internet/
Internet in the time of Covid19

Traffic changes during 2020 at multiple vantage points—daily traffic


averaged per week, normalized by 3rd week of Jan.

Source: Feldmann A, Gasser O, Lichtblau F, Pujol E, Poese I, Dietzel C, Wagner D, Wichtlhuber M, Tapidor J, Vallina-Rodriguez N, Hohlfeld
O. The Lockdown Effect: Implications of the COVID-19 Pandemic on Internet Traffic. ACM IMC 2020. https://arxiv.org/pdf/2008.10959.pdf
Internet in the time of Covid19

ECDF of link utilization before and during the lockdown

Source: Feldmann A, Gasser O, Lichtblau F, Pujol E, Poese I, Dietzel C, Wagner D, Wichtlhuber M, Tapidor J, Vallina-Rodriguez N, Hohlfeld
O. The Lockdown Effect: Implications of the COVID-19 Pandemic on Internet Traffic. ACM IMC 2020. https://arxiv.org/pdf/2008.10959.pdf
10
Contents
• Challenges in Cloud Networking
• Server-side Development
• Web and HTTP

11
Front End Side

12
Server Side

13
1. Servers: The Machinery

14
2. Databases: The Brains

15
3. Middleware: The Plumbing

16
4. Programming Languages & Frameworks: The
Nuts & Bolts

17
Five Aspects of Server-Side Development
• Servers
• Static and Dynamic
• Amazon AWS, and Microsoft Azure

• Databases
• Relational and Non- Relational
• NoSQL, SQL Server, MySQL, MongoDB, DynamoDB

• Networks
• The communication protocol (HTTP, TSL, SSL)

• Message Queuing
• RabbitMQ

• Frameworks
• Django for Python

18
Client-server architecture
1 server:
• always-on host
• permanent IP address
• serves multiple clients
• data centres/cloud for scaling

Many clients: client/server


• communicate with server
• may be intermittently connected
• may have dynamic IP addresses
• do not communicate directly with
each other
19
Contents
• Challenges in Cloud Networking
• Server-side Development
• Web and HTTP

20
HTTP (HyperText Transfer Protocol)

• The Web: application layer protocol

Tim Berners-Lee Vicent Cerf


WWW & HTTP TCP/IP
HTTP (hypertext transfer protocol)
• THE Web application layer
protocol
• client/server model PC running
• client: browser? that Firefox browser
requests, receives, (using
HTTP protocol) and
“displays” Web objects server
• server: Web server sends running
(using HTTP protocol) Apache Web
server
objects in response to
requests iphone running
Safari browser

22
Web and HTTP
• web page consists of objects
• object can be HTML file, XML-Json data, js client-
side code, JPEG image, audio file,…
• web page consists of base HTML-file which
includes several referenced objects
• each object is addressable by a URL, e.g.,

www.someschool.edu/someDept/pic.gif

host name path name


23
HTTP response message
status line
(protocol
status code HTTP/1.1 200 OK\r\n
status phrase) Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
header ETag: "17dc6-a5c-bf716880"\r\n
Accept-Ranges: bytes\r\n
lines Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=ISO-8859-
1\r\n
\r\n
data, e.g., data data data data data ...
requested
HTML file
24
HTTP request message
• ASCII (human-readable format)
carriage return character
line-feed character
request line
(GET, POST, GET /index.html HTTP/1.1\r\n
HEAD commands) Host: www-net.cs.umass.edu\r\n
User-Agent: Firefox/3.6.10\r\n
Accept: text/html,application/xhtml+xml\r\n
header Accept-Language: en-us,en;q=0.5\r\n
lines Accept-Encoding: gzip,deflate\r\n
Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n
carriage return, Keep-Alive: 115\r\n
line feed at start Connection: keep-alive\r\n
\r\n
of line indicates
end of header lines

25
HTTP Status Codes
200 OK
• request succeeded, requested object embedded in message body
301 Moved Permanently
• requested object moved, new location specified later in this msg
(Location:)
• client can send a new request to the updated location
400 Bad Request
• request msg not understood by server
404 Not Found
• requested document not found on this server
505 HTTP Version Not Supported
26
Web Server
• Web Server: application that serves content (HTML
pages. images, applications) via HTTP protocol.
• HTTP Protocol: Stateless, request - response
• Plain text messages
• Default TCP Port: 80
• Static Web Server (Apache)
• Requests are addressed by locating and serving a stored
static resource (html, jpeg, gif, pdf,…)

27
Static Web Server

HTTP Request
PETICION HTTP
GET /index.html
GET /index.html

Userde
Agente Agent
Usuario Static
Servidor Estático
index.html
(Navegador)
(Web Browser) HTTP HTTP
Server
RESPUESTA HTTP

HTTPHTML
Response

28
29
Dynamic Web Server

HTTP Request
POST/signup.do

Server Logic
User Agent
(Web Browser)

Dynamic HTTP Server


HTTP Response

DB

30
Static Web Server Dynamic Web Server

Prebuilt content is same every time the page Content is generated quickly and changes
is loaded. regularly.

It uses the HTML code for developing a It uses the server-side languages such
website. as PHP,SERVLET, JSP, and ASP.NET etc. for
developing a website.

It sends exactly the same response for every It may generate different HTML for each
request. of the request.

The content is only changed when someone The page contains "server-side" code
publishes and updates the file (sends it to which allows the server to generate the
the web server). unique content when the page is loaded.

Flexibility is the main advantage of static Content Management System (CMS) is


website. the main advantage of dynamic website.

31
The three-tier logical services architecture

32
Dynamic WWW: 3-tier logical architecture
• Handles user requests
• Controls navigation flows
• Creates the visual
elements comprising the
response
Dynamic WWW: 3-tier logical architecture

The business logic:


• Processes domain-specific
information(domain
objects)
• Keeps relationship
between service elements
• Executes domain-specific
functions
Dynamic WWW: 3-tier logical architecture

Data access:
• Automatic ORM (Object-
Relational Mapping)
• Database communications
• Provides query
functionality
Three tier logical server model (From JEE)
Presentation
• Handles user requests
• Controls navigation flows: Model-View-Controller (MVC), sessions
• Creates the visual elements comprising the response

Business Logic
• Processes domain-specific information(domain objects)
• Keeps relationship between service elements
• Executes domain-specific functions

Data Access
• Automatic ORM (Object-Relational Mapping)
• Database communications
• Provides query functionality
36
Modern cloud applications
• Agile
• Cloud: elasticity, scale

• Continuously integrated and delivered


• Rapid evolution

• Data-intensive
• Analytics-infused and user experience-centric.

37
Modern cloud applications
• Agile based Cloud Application Development
• Quick delivery of recognizable value
• Consistent deployment of working code
• Low operational cost
• Shorter development cycles
• High degree of reusability

38
Modern Cloud Applications

39
Data-intensive applications
• Store data to find it later (databases)
• Periodically process large amounts of data (batch
processing)
• Remember the result of expensive operation (cache)
• Send a message to another application, to be handled
asynchronously (event-driven, stream processing)

40
Load Balancing for Web Applications

Adel Nadjaran Toosi, Chenhao Qu, Marcos Dias de Assuncao, and Rajkumar Buyya, Renewable-aware Geographical Load Balancing of
Web Applications for Sustainable Data Centers, Journal of Network and Computer Applications (JNCA), Vol. 83, pp. 155-168, Apr. 2017.
Overall System Architecture
Challenges in Load Balancing for Web Applications
• Geographical load balancing for other types of
workloads/applications
• Bag of tasks, scientific workflows, map-reduce
• Demand response and capping the brown power
consumption
• To promote carbon neutrality
• “Sticky load balancing” policies
• When a client and an application server connection is established, all
subsequent requests from this session are redirected to the same
server
• Network proximity of the user
Evolution of Computing Paradigms
Centralization

Mainframe
(1955) Cloud Computing
(2006)

Grid Computing
(1999) Fog Computing
(2009)
Mobile Computing
(2004)
Network Computing
(1967)
IoT (2008)
ARPANET, TCP/IP, UDP,
Cluster HTTP,
Datagram Unix
(1962) HTML

Home Computer WWW SOA (2009) Edge Computing


(1978) (1994) (2009)
P2P
(1999)

Decentralization

Dominic Lindsay, Sukhpal Singh Gill, Daria Smirnova & Peter Garraghan, The evolution of distributed computing systems: from fundamental
to new frontiers. Computing (2021).

44
Parallel Processing
• Parallel Processing: is the processing of program instructions by dividing them among
multiple processors with the objective of running a program in less time.
• Concurrent computing vs. Parallel Processing
• It is possible to have parallelism without concurrency (such as bit-level parallelism)
• Concurrent and parallel programming are different. for instance, you can have two threads (or processes)
executing concurrently on the same core through context switching. When the two threads (or processes) are
executed on two different cores (or processors), you have parallelism.

• Examples: Parallel programs in MPI and OpenMP.

bit-level

Parallel Processing instruction level

task parallelism
Scheduling
• Scheduling is the process of arranging, controlling and
optimizing work and workloads by assigning them to
resources.
• Three main components of any scheduling problem:
• Consumer, e.g. processes, threads, cloud clients.
• Resource, e.g., CPU, I/O, VMs
• Policy
• Allocation vs. Scheduling!!!
• Often implicit distinction between the terms
in the literature, but, in general, it can be
said that:
• Allocation is from resources’ point of view, while Scheduling is form
consumers’ point of view.
47
Cloud Applications topics
• Application communications: REST
• Cloud-scale data: distributed challenges
• Cloud data management
• Security
• Designing cloud applications: micro services
• The edge of the cloud: CDNs, IoT

48

You might also like