Вы находитесь на странице: 1из 41

Introduction to cloud computing

Jiaheng Lu Department of Computer Science Renmin University of China


www.jiahenglu.net

Cloud computing

Review: What is cloud computing?


Cloud computing is a style of computing in which dynamically scalable and often virtualized resources are provided as a serve over the Internet.

Users need not have knowledge of, expertise in, or control over the technology infrastructure in the "cloud" that supports them.

Review: Characteristics of cloud computing

Virtual. software, databases, Web servers, operating systems, storage and networking as virtual servers.

On demand. add and subtract processors, memory, network bandwidth, storage.

Review: Types of cloud service


SaaS Software as a Service PaaS Platform as a Service IaaS Infrastructure as a Service

Any question and any comments ?

2012/4/13

Google App Engine

Google App Engine


Does

one thing well: running web apps app configuration

Simple

Scalable

Secure
10

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

11

App Engine Architecture


req/resp stateless APIs urlfech mail images R/O FS stdlib app

Python VM process

stateful APIs

memcache

datastore

12

How to use Google App engine

Download Java 6 Download Eclipse and Google plug in

Register a user account in Google


Create an application (python, Java) and upload the code

Distributed system

A distributed system
B

A D

client-server system
Client

Client

Server

Client

Client

multiple servers
Server Server Server

Server

Server

Why distributed systems?


What are the advantages?
distributed multi-server vs vs centralized? client-server?

Why distributed systems?


What are the advantages?
distributed multi-server vs vs centralized? client-server?

Geography Concurrency => Speed High-availability (if failures occur).

Why not distributed systems?


What are the disadvantages?
distributed multi-server vs vs centralized? client-server?

Why not distributed systems?


What are the disadvantages?
distributed multi-server vs vs centralized? client-server?

Expensive (to have redundancy) Concurrency => Interleaving => Bugs Failures lead to incorrectness.

Outline
Concepts and Terminology

What is Distributed Distributed data & objects

Distributed execution
Three tier architectures Transaction concepts

Whats a Distributed System?

Centralized:

everything in one place stand-alone PC or Mainframe

Distributed:

some parts remote


distributed users distributed execution distributed data

Why Distribute?

No best organization
Companies constantly swing between

Centralized: focus, control, economy Decentralized: adaptive, responsive, competitive

Why distribute?

reflect organization or application structure empower users / producers improve service (response / availability) distributed load use PC technology (economics)

What Should Be Distributed?

Users and User Interface

Thin client

Presentation workflow

Processing

Trim client Fat client

Data

Business Objects Database

Will discuss tradeoffs later

Transparency in Distributed Systems

Make distributed system as easy to use and manage as a centralized system

Give a Single-System Image

Location transparency:

hide fact that object is remote hide fact that object has moved hide fact that object is partitioned or replicated

Name doesnt change if object is replicated, partitioned or moved.

Outline
Concepts and Terminology

Why Distribute Distributed data & objects


Partitioned Replicated

Distributed execution

remote procedure call queues

Three tier architectures

Transaction concepts

Distributed Execution
Threads and Messages

Thread is Execution unit


(software analog of cpu+memory)

threads

Threads execute at a node Threads communicate via

shared memory

Shared memory (local) Messages (local and remote)


messages

Peer-to-Peer or Client-Server

Peer-to-Peer is symmetric:

Either side can send

Client-server

client sends requests server sends responses simple subset of peer-to-peer

Remote Procedure Call: The key to transparency


y = pObj->f(x);

Object may be local or remote Methods on object work wherever it is.

Local invocation

f() return val;

y = val;

val

Remote Procedure Call: The key to


transparency

Remote invocation
proxy
Obj Local? x marshal x f() return val;

y = pObj->f(x); x

stub
un marshal pObj->f(x) x Obj Local? f()

return val; y = val; un marshal val marshal val

val val

Object Request Broker (ORB)


Registers Servers Manages pools of servers Connects clients to servers Does Naming, request-level authorization, Provides transaction coordination (new feature) Old names:

Transaction Processing Monitor, Web server, Transaction NetWare

Object-Request Broker

Outline
Concepts and Terminology

Why Distributed Distributed data & objects Distributed execution


remote procedure call queues

Three tier architectures


what why

Transaction concepts

Work Distribution Spectrum


Thin

Fat
Presentation workflow

Presentation and plug-ins Workflow manages session & invokes objects Business objects Database

Business Objects Database

Fat

Thin

PC Evolution to Three Tier


Intelligence migrated to server

Stand-alone PC
(centralized)

PC + File & print server


message per I/O

IO request reply

disk I/O

PC + Database server
message per SQL statement

SQL Statement

PC + App server
message per transaction
Transaction

ActiveX Client, ORB ActiveX server, Xscript

The Pattern: Three Tier Computing


Clients do presentation, gather input Clients do some workflow (Xscript) Clients send high-level requests to ORB (Object Request Broker)

Presentation

workflow

ORB dispatches workflows and business objects -- proxies for client, orchestrate flows Business & queues
Objects

Server-side workflow scripts call on distributed business objects to execute task


Database

Web Client
HTML

The Three Tiers


VB Java plug-ins

VBscritpt JavaScrpt VB or Java Script Engine

Middleware
VB or Java Virt Machine

Object server Pool


ORB

ORB TP Monitor Web Server...

Internet

HTTP+ DCOM

Object & Data server.

DCOM (oleDB, ODBC,...)


Legacy Gateways

IBM

Why Did Everyone Go To Three-Tier?

Manageability

Presentation

Business rules must be with data Middleware operations tools Server resources are precious ORB dispatches requests to server pools Put UI processing near user Put shared data processing near shared data

Performance (scalability)

workflow

Technology & Physics


Business Objects

Database

What Middleware Does


ORB, TP Monitor, Workflow Mgr, Web Server

Registers transaction programs workflow and business objects (DLLs) Pre-allocates server pools Provides server execution environment Dynamically checks authority
(request-level security)

Does parameter binding Dispatches requests to servers parameter binding

load balancing Provides Queues Operator interface

Server Side Objects


Easy Server-Side Execution

ORB gives simple execution environment Object gets

A Server
Network

Receiver Queue
Connections Configuration

Management

start invoke shutdown

Context

Security

Thread Pool Service logic Synchronization Shared Data

Everything else is automatic Drag & Drop Business Objects

Вам также может понравиться