• No results found

Cloud Computing mit mathematischen Anwendungen

N/A
N/A
Protected

Academic year: 2021

Share "Cloud Computing mit mathematischen Anwendungen"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Cloud Computing mit

mathematischen Anwendungen

Vorlesung SoSe 2009

Dr. Marcel Kunze

Karlsruhe Institute of Technology (KIT) Steinbuch Centre for Computing (SCC)

(2)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 2

Agenda Cloud Computing

1.

Einleitung

Was ist Cloud Computing?

2.

Grundlagen

Virtualisierung, Web Services,…

3.

Cloud Architekturen

Infrastruktur, Plattform, Anwendung 4.

Cloud Services

Amazon Web Services, Google App Engine 5.

Aufbau einer Cloud

OpenCirrus Projekt, Eucalyptus, Hadoop, Google 6.

Cloud Algorithmen

MapReduce, Optimierungsverfahren, …

Praktische Übungen und Anwendungen

Vorlesung im Web:

http://www.mathematik.uni-karlsruhe.de/mitglieder/lehre/cloud2009s/

(3)

Cloud Architecture

(4)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 4

Challenges building Web Applications

(5)

Why Not LAMP?

Linux, Apache, MySQL/PostgreSQL, Python/Perl/PHP/Ruby

LAMP is the industry standard

But management is a hassle:

Configuration, tuning

Backup and recovery, disk space management Hardware failures, system crashes

Software updates, security patches

Log rotation, cron jobs, and much more

Redesign needed once your database exceeds one box

“Google carries pagers so you don’t have to”

(6)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 6

Web Applications on Google Infrastructure

(7)

App Engine Developer Account

Dozens of examples in App Gallery

Tools, Communication, Games, News, Finance , Sports, Lifestyle, Technology, Enterprise

http://appgallery.appspot.com/

Register as a developer

http://code.google.com/appengine

Free to get started

500 MB storage

2 GB bandwidth / day

~ 5 million page views / month

Pay-per-use if you need more

(8)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 8

Bandwidth, Incoming Bandwidth, Outgoing Storage

CPU

Resource

15-18¢ / GB-month 11-13¢ / GB transferred Equivalent to 5M

pageviews / month for a typical app

Free Quota

9-11¢ / GB transferred 10-12¢ / core-hour

Additional

Free Quota and Pricing

(9)

App Engine Components

1. Scalable Serving Infrastructure

2. Python and Java Runtime

3. Software Development Kit

4. Datastore

5. Web based Admin Console

(10)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze

10 10

App Engine Features

Does one thing well: running web apps

Simple app configuration

Scalable

Secure

(11)

App Engine Does One Thing Well

App Engine handles HTTP(S) requests, nothing else

Think RPC: request in, processing, response out

Works well for the web and AJAX; also for other services

App configuration is dead simple

No performance tuning needed

Everything is built to scale

“infinite” number of apps, requests/sec, storage capacity APIs are simple, stupid

(12)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 12

App Engine Architecture

12

Python

VM

process

stdlib

app

memcache datastore

mail

images

urlfech

stateful

APIs

stateless APIs R/O FS

req/resp

(13)

Scaling

Low-usage apps: many apps per physical host

High-usage apps: multiple physical hosts per app

Stateless APIs are trivial to replicate

Memcache is trivial to shard

Datastore built on top of Bigtable; designed to scale well

Abstraction on top of Bigtable API influenced by scalability

No joins

Recommendations: denormalize schema; precompute joins

(14)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 14

Automatic Scaling to Application Needs

You don’t need to configure your resource needs

One CPU can handle many requests per second

Apps are hashed (really mapped) onto CPUs:

One process per app, many apps per CPU

Creating a new process is a matter of cloning a generic “model”

process and then loading the application code (in fact the clones are pre-created and sit in a queue)

The process hangs around to handle more requests (reuse) Eventually old processes are killed (recycle)

Busy apps (many QPS) get assigned to multiple CPUs

This automatically adapts to the need

as long as CPUs are available

14

(15)

Hierarchical Datastore (Bigtable)

Entities have a Kind, a Key, and Properties

Entity ~~ Record ~~ Python dict ~~ Python class instance Key ~~ structured foreign key; includes Kind

Kind ~~ Table ~~ Python class

Property ~~ Column or Field; has a type

Dynamically typed: Property types are recorded per Entity

Key has either id or name

the id is auto-assigned; alternatively, the name is set by app A key can be a path including the parent key, and so on

Paths define entity groups which limit transactions

A transaction locks the root entity (parentless ancestor key)

(16)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 16

Security

Prevent the bad guys from breaking (into) your app

Constrain direct OS functionality

no processes, threads, dynamic library loading no sockets (use urlfetch API)

can’t write files (use datastore)

disallow unsafe Python extensions (e.g. ctypes)

Limit resource usage (Quota)

Limit 1000 files per app, each at most 1MB Hard time limit of 10 seconds per request

Most requests must use less than 300 msec CPU time

Hard limit of 1MB on request/response size, API call size, etc.

Quota system for number of requests, API calls, emails sent, etc

16

(17)

Web-based Admin Console

(18)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 18

Click to Deploy from IDE / SDK

(19)

Switch to Live Demo Now

Eclipse: Integrated Development Environment (IDE)

http://www.eclipse.org

Java Plugin for Google App Engine

http://code.google.com/appengine/docs/java/tools/eclipse.html

(20)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 20

Google Application Ecosystem

More than 60 APIs on code.google.com (Client, server, mobile, cloud)

(21)

Adaptation to different Endpoints

Android, Web Browser, (Chrome OS) Context switch using Google Guice

(22)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 22

FAQs

What is your SLA?

What about lock in?

Can I get more quota?

What language is coming next?

(23)

Summary

Google App Engine

Development of Web Applications Scalable and secure Platform Service

Features

Large file uploads and downloads

Datastore import and export for large volumes

Pay-as-you-go billing (for resource usage over free quota) Python and Java support

Monitoring of Web applications

Learn more

http://code.google.com/appengine

(24)

Cloud Computing Teil 12 | SoSe 2009 | Dr. M.Kunze 24

Karlsruhe Institute of Technology

Thank you for your attention. Steinbuch Centre for Computing (SCC)

References

Related documents

Incetinirea economiei a rănit Starwood şi alte companii hoteliere în 2001. Atacurile din 11 septembrie teroriste au fost o lovitură uriaşă pentru industrie. Starwood de Nord a

This is a crucial result as it allows us to fix the values of the mission parameters when building signal templates in order to carry out a Bayesian analysis of the theory

An Integrated Water Resources Management (IWRM) project has been introduced in Gunungkidul Regency since at least 2008, although initiated in 2003. The people are aware of the

habitats (such as hill giants, frost giants, or jungle giants), a wide variety of other creatures share the giant subtype.. Giantkin share superficial similarities with true giants,

Two mathematical properties of text have been studied: (1) the spatial periodicity of the vertical strokes of letters, which a ff ects reading speed, and (2) the degree of

The purpose of this professional development program is to support teachers in creating a classroom culture and environment focused on growth and improvement in mathematics,

In particular, polynomial and rational perturbations have been considered in [6], [7], [9], and [11] where explicit expressions for polynomials orthogonal with respect to the

The tw0 day course provides a thorough review of complex subject matter such as trauma patient management and stabiliza- tion, ground safety and transport fundamentals, FAR Part