• No results found

Cloud Computing Patterns Fundamentals to Design, Build, and Manage Cloud Applications

N/A
N/A
Protected

Academic year: 2021

Share "Cloud Computing Patterns Fundamentals to Design, Build, and Manage Cloud Applications"

Copied!
50
0
0

Loading.... (view fulltext now)

Full text

(1)

Cloud Computing Patterns

Fundamentals to Design, Build, and Manage Cloud Applications

Christoph Fehling

Institute of Architecture of Application Systems

University of Stuttgart Universitätsstr. 38 70569 Stuttgart Germany Phone +49-711-685-88 486 Fax +49-711-685-88 472 e-mail Fehling @iaas.uni-stuttgart.de ©Fehling

(2)

Cloud Computing Patterns – Introduction ©Fehling, Leymann

Patterns are structured text describing abstract problem-solution pairs.

The Cloud Computing Patterns describe

abstract solutions to recurring problems

in the domain of cloud computing to capture

timeless knowledge

that is

independent of concrete providers

, products, programming languages etc.

(3)
(4)
(5)
(6)
(7)
(8)

Design Steps for Cloud Applications using Patterns

or

to see a Cloud Application Architecture you should go out and have a…

(9)

Coffee Shop

Introduction

Decomposition Workload Data (State) Component Refinement Elasticity and Resiliency

9 ©Fehling

(10)

How to distribute Application Functionality?

(11)

11 Decomposition

Distributed Application

A cloud application divides provided functionality among multiple application components that can be scaled out independently.

Components reside on separate functional layers

Often: user interface, processing, storage

Access is only allowed to

same layer and the layer below

Dependencies between layers and interfaces are controlled

Layer-based Decomposition

(12)

Distributed Application

A cloud application divides provided functionality among multiple application components that can be scaled out independently.

12 Decomposition

Business process model determines decomposition

Activities

: tasks executed in a specific order (

control flow

)

Data elements

: information handled by activities (

data flow

)

Functional application components (

services

) are accessed by process

Process-based Decomposition

Business Process

Data Elements

Services

(13)

Distributed Application

A cloud application divides provided functionality among multiple application components that can be scaled out independently.

13 Decomposition

Decomposition based on the data processing function

Filter

: application component processing data

Pipe

: connection between filters (commonly messaging)

Pipes-and-Filters-based Decomposition

(14)

Coffe Shop – Decomposition of Functions

Decomposition

Identify functional components.

User Interface Request Queue Special Processing Coffe Processing Result Queue Distributed Application ©Fehling 14

(15)

What workload do components experience?

(16)

Periodic Workload

IT resources with a peaking utilization at reoccurring time intervals experience periodic workload.

Static Workload

IT resources with an equal utilization over time experience static workload.

Once-in-a-Lifetime Workload

IT resources with an equal utilization over time disturbed by a strong peak occurring only once experience once-in-a-lifetime workload.

Continuously Changing Workload

IT resources with a utilization that grows or shrinks constantly over time experience continuously changing workload.

Unpredictable Workload

IT resources with a random and unforeseeable utilization over time experience unpredictable workload.

16

(17)

17 Workload

Periodic Workload

(18)

Coffe Shop – Workloads

Workload

Identify and compare workload generated by user groups at different components.

User Interface Request Queue Special Processing Coffe Processing Result Queue = = < > = < < ©Fehling 18

(19)

Where does the application handle state?

(20)

Notion of State

21 Data (State)

We differentiate between…

Session State

State of a client‘s interaction with an application

Commonly referred to when discussing „statelessness“

Example: customer‘s shopping card of an online store

Application State

Data handled by an application

We extend „statelessness“ to also incorporate application state

Example: customers shipping information stored by an application

(21)

Stateless Component

State is handled external of application components to ease their scaling-out and to make the application more tolerant to component failures.

Stateful Component

Multiple instances of a scaled-out application component synchronize their internal state to provide a unified behavior.

Strict Consistency

Data is stored at different locations to improve response time and to avoid data loss in case of failures while consistency of replicas is ensured at all times.

Data Abstractor

Data is abstracted to inherently support eventually consistent data storage through the use of abstractions and approximations.

Eventual Consistency

Performance and availability of data in case of network partitioning are enabled by ensuring data consistency eventually and not at all times.

22

(22)

23 Data (State) Strict Consistency n w r n ≤ r + w Eventual Consistency n n > r + w w r ©Fehling

(23)

24 Data (State)

Data Abstractor

(24)

Coffee Shop – Data

Data (State)

Identify components storing data.

User Interface Request Queue Special Processing Coffe Processing 25 ©Fehling Result Queue

(25)

How are components implemented?

(26)

Message-oriented Middleware

Asynchronous communication is provided while hiding complexity of

addressing, routing, or data formats to make interaction robust and flexible.

28

(27)

29 Component Refinement

Message-oriented Middleware

Assumptions of communication partners are reduced (Loose Coupling)

Platform: implementation language used

Reference: location of the communication partner (routing)

Time: communication partners are active at different time / speed

Format: message formats can change (transformation)

(28)

User Interface Component

Synchronous user interfaces are accessed by humans, while application-internal interaction is realized asynchronously to ensure loose coupling.

30

(29)

31 Component Refinement

User Interface Component

(30)

Processing Component

Processing functionality is handled by elastically scaled components.

Batch Processing Component

Requests are delayed until environmental conditions make their processing

feasible.

32

(31)

33 Component Refinement

Processing Component

Batch Processing Component

(32)

Multi-component Image

Virtual servers host multiple application components that may not be active at all times to reduce provisioning and decommissioning operations.

34

(33)

35 Component Refinement

Multi-component Image

(34)

Coffee Shop – Refinement of Components

Component Refinement

Decide how to implement components.

©Fehling User Interface Request Queue Special Processing Coffe Processing Result Queue 36

(35)

Elasticity and Resiliency

(36)

Elastic Queue

The number of accesses via messaging is used to adjust the number of

required application component instances.

Elastic Load Balancer

The number of synchronous accesses to an elastically scaled-out application is used to determine the number of required application component instances.

Node-based Availability

A cloud provider guarantees the availability of nodes, such as individual virtual

servers, middleware components or hosted application components.

Watchdog

Applications cope with failures by monitoring and replacing application component instances if the provider-assured availability is insufficient.

Environment-based Availability

A cloud provider guarantees the availability of the environment hosting

individual nodes, such as virtual servers or hosted application components.

39

(37)

Elasticity and Resiliency

Elasticity and Resiliency

What shall happen if workload changes or something fails?

©Fehling User Interface Request Queue Special Processing Coffe Processing Result Queue 40

(38)
(39)

Summary Architectural Questions

Summary

Decomposition Workload Data (State) Component Refinement Elasticity and Resiliency

(40)

And there are many more:

http://www.cloudcomputingpatterns.org

(41)

Summary ©Fehling 45

http://www.springer.com/978-3-7091-1567-1

(42)
(43)
(44)

Amazon

48 Eventual Consistency at Amazon

Items are commonly „in stock“.

(45)

Amazon

49 Eventual Consistency at Amazon

Upon low availability, concrete numbers are reported.

Let‘s test if this is really the number of available items!

(46)

Amazon Test: Setup

50 Eventual Consistency at Amazon

Account: Carina

Networking: Home Internet

Account: Christoph

Networking: University VPN

Simulation of two different customers shopping at two different locations.

(47)

Amazon: Shopping Carts

51 Eventual Consistency at Amazon

Item could be added to both shopping carts.

(48)

Amazon: Shopping Carts

52 Eventual Consistency at Amazon

Item could be bought by both customers.

(49)

Amazon: Shopping Carts

53 Eventual Consistency at Amazon

Item could be bought by both customers.

(50)

Amazon: Delivery

54 Eventual Consistency at Amazon

Both customers received the item at the same day!

The movie was horrible!!!

Amazon Website one day after the delivery:

So… the user interface does not report actual correct numbers!

References

Related documents

DRAM configuration is 64 bits wide with parity disabled. 255K bytes of non-volatile configuration memory. Based on the output of the show version command, answer the following

In addition, the ferritic steel provides far better resistance to stress corrosion cracking (see Section 6.4) while on the minus side a poorer elongation (see Chapter 3) and a

The fact that cocoa methylxanthines and theobromine and caffeine increased the concentration of SREMs in plasma compared with the concentration that would be reached when CFs or

A comparison of the two rankings (literacy levels with economic development) indicates that in general districts with higher literacy levels are also among the economically

 A number of monetary benefits (negotiated debt reductions, negotiated moratoriums, negotiated waivers, grants and avoidance of bankruptcy) of The Wyatt Trust

Table 6.10 Additional pathways and enzymes involved in the trigonelline biosynthesis process with TAVs identified when using the draft arabica genome as

This is in con- trast with classical spectral algorithms, based on the adjacency matrix, random walk matrix, and graph Laplacian, which perform poorly in the sparse case, failing