summer school - building a cloud-aware application

26
Build a Cloud Aware Application Chris Haddad Selvaratnam Uthaiyashankar Read more about PaaS at http://blog.cobia.net/cobiacomm Try StratosLive https://stratoslive.wso2.com/

Upload: wso2

Post on 21-Nov-2014

1.539 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Summer School - Building a Cloud-Aware Application

Build a Cloud Aware Application

Chris Haddad

Selvaratnam Uthaiyashankar

Read more about PaaS at http://blog.cobia.net/cobiacomm

Try StratosLive https://stratoslive.wso2.com/

Page 2: Summer School - Building a Cloud-Aware Application

Platform as a Service Criteria

• When to create Cloud aware applications?

• Cloud application use cases and patterns

• Architectural difference between web applications and cloud applications

• Cloud Aware Application Demo

• Key Metrics and Quick Start Use Cases

Page 3: Summer School - Building a Cloud-Aware Application

When to make applications Cloud Aware?

• Deliver application to massive consumer base (e.g. Twitter, Google, Pinterest, FaceBook)

• Services distributed across multiple providers • Infrastructure cost optimization strategy • Application resiliency improvement strategy • Create an ecosystem platform supporting cross-

partner digital business

Page 4: Summer School - Building a Cloud-Aware Application

Resource Tier

Cloud Scale and Distributed Providers

Functional Role

Client Tier

Integration Services

Integration Services Resource Services

Functional Role

Presentation and Mashups

Functional Role

Functional code

Presentation Role

Presentation and Mashups

Presentation and Mashups

Resource Services

Private Applications

Public Cloud Services

Business Proces

Business Process

Business Process Business Process and

Business Rules

Page 5: Summer School - Building a Cloud-Aware Application

Application Resiliency and Composition

Mobile Application

Application Portfolio

Hybrid Platform Services

Presentation Services

Resources Services

Functional Services

Business Process and

Rules Services

Integration Services

Composite Application

Business Service Portfolio

Integration Services

Cloud API

Endpoint

Infrastructure as a Service (IaaS)

SaaS Application

Web application Endpoint

Page 6: Summer School - Building a Cloud-Aware Application

Domain Specific Platform as a Service Delivering Cross-Partner Digital Business Platform

Vertical Application 3 M

an

ag

ed

by P

aa

S

Ve

rtica

l

Su

mm

it

OS/Hypervisor

Containers

Hardware

Programming Languages

Frameworks

App Source Code

App Data

Ve

rtica

l

AP

I

Domain Services

Domain Artifacts

App

Configuration

Domain Services

Domain Artifacts

App Source Code

App Data

App

Configuration

App Source Code

App Data

App

Configuration

Vertical Application 1 Vertical Application 2

Page 7: Summer School - Building a Cloud-Aware Application

Application Architecture Crossroads

Innovation

Familiarity

Page 8: Summer School - Building a Cloud-Aware Application

Cloud Application Patterns and Anti-Patterns

18

Deterministic performance

Deploy and execute on optimum topology

Separation of concerns

Embarrassingly Parallel / Shared Nothing ArchitectureMinimal

Consumption

Failure Resilient Leaky interfaces

Tightly coupled modules

Monolithic footprint

Single threaded, serial execution

Resource locks Single tenancy model

Page 9: Summer School - Building a Cloud-Aware Application

Cloud Aware Application Use Cases and Underlying Cloud Patterns

• Maximize utilization – Requires deterministic performance – Load balance based on tenant, service, and workload,

context

• Increase reliability, availability, scalability – Shared nothing architecture – Stateless server-side elements – Consensus protocols

• Ecosystem platform – Monetize assets based on business value – Tenant/Consumer personalization and isolation – Sharing domain specific business capabilities

Page 10: Summer School - Building a Cloud-Aware Application

Architectural Difference Between Web Application and Cloud Application

Web Application • Synchronous request-reply

interaction • Centralized state (i.e. single

database) and session management

• Clustered server instances • Silo architecture

Cloud Application • Asynchronous interaction • Queues and workers • Scale out across datacenters

and providers • Distributed state and session

management • Autonomous service instances • Tenant context personalization • Shared JVM / Shared Schema • Shared nothing architecture

Page 11: Summer School - Building a Cloud-Aware Application

Cloud Architecture Best Practices

Transitioning to a New normal – Traditional practices may not apply • Distributed and federated interactions

– Event based, heterogeneous systems, network latency

• Configurable containers and engines – Declarative data, rules, and process definitions

• De-normalized and simplified data models – Hadoop/BigTable, Hypertext media, simple NoSQL entities

• Expect failure – Systems span transactional control

• Applications decomposed into distinct services – Federated environment drives autonomy, statelessness, and

composition

Page 12: Summer School - Building a Cloud-Aware Application

Cloud Application Platform Shared Middleware Services

Page 13: Summer School - Building a Cloud-Aware Application

PaaS Evaluation Framework

• Cloud Characteristics

• Cloud Dimensions

• Production Ready

• DevOps Activities and Phases

• Cloud Architecture

• Platform Services

• Programming Model

Page 14: Summer School - Building a Cloud-Aware Application

PaaS Evaluation Framework

Cloud Architecture

• Tenancy, dynamic discovery, and distributed cache

• Fine-grained metering, billing, and reporting of business entities, activities, and interactions

• Scale discrete application service instances instead of scaling monolithic application instances

• Shared nothing architecture, Thirteen Dwarf Patterns, parallel processing, resource coordination

• Cloud service provisioning and load balancer

Page 15: Summer School - Building a Cloud-Aware Application

PaaS Evaluation Framework Platform Services • Presentation services • Application and service container services • Business process and business rule services • Integration services and message brokers • Composite application services (i.e. mashups and orchestration) • Complex event processing services • Data access and persistence services • Development governance • Application life-cycle management • Automated run-time governance services • Policy registry and repository services • Identity management • Security • Service level management • Compute, network, and storage infrastructure services

Page 16: Summer School - Building a Cloud-Aware Application

PaaS Evaluation Framework

Programming Model • Actor model (i.e. message passing instead of function

invocation • RESTful interactions • Dynamic recoverability • Consensus protocols • Asynchronous rather than synchronous interactions • Shared nothing architecture • Data partitioning and sharding • Federated data queries • Service orchestration • Functional programming • MapReduce

Page 17: Summer School - Building a Cloud-Aware Application

Cloud Application Demo • Register a new tenant

– Show the self service aspect, multi tenancy aspect

– Create and provision a new tenant on shared infrastructure

• Demonstrate PaaS facilities available for a tenant (metering, billing, logs)

• Upload an existing web application to the tenant

– Demonstrate the zero cost/easy migration of applications

• Creating a new hello world web application

– Demonstrate the procedure to create an application

– Deploy application to Cloud using WSO2 Dveloper Studio

• Secure the web application(Tie the authentication to underlying user model).

• Create a database

– Relational storage model options

– NoSQL storage model options

• Access a database via web application

• Expose a database table as data services.

• Demonstrate WSO2 Stratos and WSO2 StratosLive application platform services

• Explain the programming model + services

– Access "CarbonContext” within applications

Page 18: Summer School - Building a Cloud-Aware Application

Key Metrics

• Foundation • Time to create new application environment

• Time to redeploy application

• Optimize • Minimum and maximum scale

• Scale frequency (i.e. time to scale up/down)

• Transformation • Time and effort required integrating business process, event

processor – creating a complex app.

• Time and effort required to apply policy across tenant(s)

• Cost to operate application per user or transaction

Page 19: Summer School - Building a Cloud-Aware Application

Quick Start Use Cases

• DevOps Tooling and On-demand self-service

• Automated Governance

• Service level management and elastic scale

• Consumption based pricing and billing

Page 20: Summer School - Building a Cloud-Aware Application

Quick Start Use Cases

DevOps Tooling and On-demand self-service • Use Cases

– Rapidly provision application environment – Rapidly provision application tenant – Allocate, provision, monitor, manage, and administer

resources across multiple tenants, nodes, and locations

– Develop complex, composite integrated applications

• Key metrics – Time to create new application environment – Time to redeploy application

Page 21: Summer School - Building a Cloud-Aware Application

Quick Start Use Cases

Automated Governance • Use Cases

– Create users and configure rights – Deploy on preferred topology that meets deterministic

performance requirements (e.g., replication, utilization, latency, bandwidth, and coherency)

– Create service throttling and security governance (XACML) policies

• Key Metrics – Time and effort required integrating business process,

event processor – creating a complex app. – Time and effort required to apply policy across tenant(s)

Page 22: Summer School - Building a Cloud-Aware Application

Quick Start Use Cases

Service level management and elastic scale • Use cases

– Ensure application satisfies consumer demand while maximizing resource utilization • Scale workload processing and increase performance while

minimizing infrastructure spend

– Load test application service – Demonstrate multi-tenant web application

• Key Metrics – Minimum and maximum scale – Scale frequency (i.e. time to scale up/down)

Page 23: Summer School - Building a Cloud-Aware Application

Quick Start Use Cases

Consumption based pricing and billing

• Use cases

– View service logs

– View bill by business value

• Key Metric

– Cost to operate application per user or transaction

Page 25: Summer School - Building a Cloud-Aware Application

Contact us:

http://wso2.com/contact/

Follow us:

http://twitter.com/#!/wso2 http://twitter.com/#!/cobiacomm

Follow us:

http://twitter.com/#!/wso2

Page 26: Summer School - Building a Cloud-Aware Application

lean . enterprise . middleware