building cloud-aware applications

36
Building Applications On Cloud Architecture Chris Haddad @cobiacomm [email protected] Read more about Cloud Architecture and Cloud- aware Apps at http://blog.cobia.net/cobiacomm

Upload: chris-haddad

Post on 08-May-2015

2.225 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Building Cloud-Aware Applications

Building Applications On Cloud Architecture

Chris Haddad @cobiacomm [email protected]

Read more about Cloud Architecture and Cloud-aware Apps at http://blog.cobia.net/cobiacomm

Page 2: Building Cloud-Aware Applications

Skating towards the puck

Page 3: Building Cloud-Aware Applications

Cloud Characteristics and Architecture

Resource pooling

• Multi-tenancy• Resource utilization• Shared, virtual infrastructure• Interoperability

On-demand

self-service

• Flexible workload assignment• Standard service offerings• Quick startup and automation

Rapid Elasticity

• Stateless services• Rapid provisioning• Flexible topology• High Quality of Service

Measured service or pay per use

• Fine-grained metering

• Billing• Reporting

Page 4: Building Cloud-Aware Applications

Cloud Dimensions• Sharing

– Private / Public / Community• Responsibility

– Internal / External• Location

– On-premise / outsourced

Page 5: Building Cloud-Aware Applications

Platform as a Service Adoption Drivers

Page 6: Building Cloud-Aware Applications

Defining Cloud Platform Boundaries• Distributed Topology

– Latency– Stateless, autonomous services– Instrumented, redundant, and expecting failure

• Efficient resource pooling– Consumption aware and multi-tenant– Automated, continuous

• Scale– Asynchronous, event driven callbacks– Parallelizable, workload decomposition, and idempotent

• On-demand self service– Personalization extensibility points– Fine grained, modular– Template driven

Page 7: Building Cloud-Aware Applications

Dev Ops Tooling Automated Governance

Service Level Management

Consumption based Funding

Platform as a Service Capabilities

Page 8: Building Cloud-Aware Applications

• Resource monitoring• Resource management

• Performance management• Traffic orchestration

• Metering• Reporting• Billing

• Service catalogue• Service tiers

• Demand and capacity management

• Lifecycle management• Cloud Management

integration

• Self service configuration• Automated provisioning• Policy configuration• Process automation

Dev Ops Tooling

Automated Governance

Service Level Management

Consumption based Funding

Platform as a Service Capabilities

Page 9: Building Cloud-Aware Applications

PaaS Abstraction Levels

• Users, workspaces, transactions• Services, channels, API

Component Services

• Application session, frameworks• Application instance, .war files• Installing application

Application Platform

• Command line interface, bash shell• Machine size, JVM configuration• Installing infrastructure

Hardware Infrastructure

Page 10: Building Cloud-Aware Applications

10

WSO2 Architecture Advantage

Availability Scalability Management

Load monitor Tenant partitioningPrivate jet mode

Cloud controller

Balancing and failover across hybrid clouds

Ghost deployment BigData Logging infrastructure

State replication and session replication

BAM 2.0 architecture Artifact Distribution Controller and

Deployment synchronizationMultiple load balancers with

keepalived or DNS RRAuto-scaling P2 Repository

Native multi-tenancy Elastic Load Balancer Consistent management and infrastructure services across

entire platformDynamic Clustering Multi-tenant shared

container Management console

Page 11: Building Cloud-Aware Applications

PaaS Reference Architecture

Page 12: Building Cloud-Aware Applications

Building Apps on Cloud Architecture

•Why cloud aware applications rise above Web

applications

•Where to make applications cloud aware

•What open source projects deliver cloud

awareness

Page 13: Building Cloud-Aware Applications

ResourceTier

Rise Above: Cloud Scale and Distributed Providers

Functional Role

Client Tier

Integration Services

Integration ServicesResourceServices

Functional Role

Presentation and Mashups

Functional RoleFunctional

code

Presentation RolePresentation and

MashupsPresentation and Mashups

ResourceServices

Private Applications

Public Cloud Services

Business ProcesBusiness

ProcessBusiness ProcessBusiness Process and

Business Rules

Page 14: Building Cloud-Aware Applications

Rise Above: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 applicationEndpoint

Page 15: Building Cloud-Aware Applications

Rise Above:Deliver Cross-Partner Digital Business Platform

Vertical Application 3M

an

age

d by P

aaS

Ve

rtical S

um

mit

OS/Hypervisor

Containers

Hardware

Programming Languages

Frameworks

App Source Code

App Data

Ve

rtical A

PI

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 16: Building Cloud-Aware Applications

Where to make applications Cloud Aware

• Deliver application to massive consumer base • Infrastructure cost optimization strategy• Application resiliency improvement strategy• Create an ecosystem platform supporting cross-partner

digital business

Page 17: Building Cloud-Aware Applications

Cloud Aware Architecture• Maximize utilization and optimize cost

– Requires deterministic performance – Load balance based on tenant, service, and workload, context– Increase tenant density

• Increase reliability, availability, scalability– Shared nothing architecture– Stateless server-side elements– Consensus protocols – Services distributed across multiple providers and zones

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

Page 18: Building Cloud-Aware Applications

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 19: Building Cloud-Aware Applications

Cloud Application Patterns and Anti-Patterns

Page 20: Building Cloud-Aware Applications

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 21: Building Cloud-Aware Applications

Application Architecture Crossroads

Page 22: Building Cloud-Aware Applications

Cloud-awareness

Platform support for Cloud-aware applications• Cloud Architecture• Cloud Aware Design Patterns• Programming Model

Page 23: Building Cloud-Aware Applications

PaaS Reference Architecture

Page 24: Building Cloud-Aware Applications

Cloud aware architecture model shiftNew interaction model• Actor Model

– Dispatching and scheduling instead of direct invocation– Queues and asynchronous interactions

• RESTful interactions– Message passing instead of function calls or shared

memory• Eventual consistency instead of ACID

– Distributed cache instead of application cluster– Cache access instead of direct resource access

• Traditional O/R mapping (e.g. Hibernate) doesn’t work

24

Page 25: Building Cloud-Aware Applications

Cloud-aware Design Patterns

Cloud-aware Application

Parallelizable, Shared nothing

Asynchronous, stateless services

Fine grained, modular design

Tenant personalization

Efficient resource consumption

Deterministic performance

Multi-tenant Application Platform Services

ESB

Application Server

Business Process

Registry

Identity Management

Storage

PaaS Framework

Controller Load balancer

Asset Deployer and Synchronizer

Repositories Metering and Billing

Page 26: Building Cloud-Aware Applications

Simplification Through Patterns

Relevant pattern categories• Computational fit analysis• Parallelism and workload decomposition• Concurrency• State• Structural • Scale

26

Page 27: Building Cloud-Aware Applications

Apply Computational Patterns

Evaluate 13 Dwarfs1. Dense linear algebra – matrix calculations2. Sparse linear algebra – sparse matrix calculations and storage3. Spectral methods – operational engineering4. N-body methods – particle force calculations5. Structured grids – mechanical and fluid engineering, meteorology6. Unstructured grids – mechanical and fluid engineering7. Mapreduce – Monte Carlo simulations, data processing8. Combinational logic – data transformation 9. Graph traversal – social networking10. Dynamic programming – DNA pattern matching, web search, shipping11. back-track / branch & bound - travel route mapping12. graphical model reference – speech and image recognition13. finite state machines – workflow optimization

27

Page 28: Building Cloud-Aware Applications

Cloud-awarenessProgramming 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 29: Building Cloud-Aware Applications

Open Source Projects• Cloud aware Infrastructure

– WSO2 Stratos– Cloud Foundry– Red Hat OpenShift

• Frameworks– Parallel Process Execution and Coordination– Distributed Map-Reduce– Distributed Storage for Large Scale Structured Data (aka Big Table / Big

Data)– Grid Frameworks– Distributed Object and Tuple Spaced Data Cache– REST Frameworks– Actor model

• Languages– Functional, Parallel, Actor Model

Page 30: Building Cloud-Aware Applications

Cloud-optimized Frameworks

Scaffolding to structure Cloud aware app development• Parallel Process Execution and Coordination• Distributed Map-Reduce

• Apache Hadoop, Apache MapReduce, StarFish MapReduce

• Distributed Storage for Large Scale Structured Data (aka Big Table / Big Data)• Apache Cassandra, Apache Hbase, Neptune, Hypertable

• Grid Frameworks• Distributed Object and Tuple Spaced Data Cache

– memcache• REST Frameworks• Actor model 30

Page 31: Building Cloud-Aware Applications

Cloud-optimized Frameworks

Scaffolding to structure Cloud application development• Parallel Process Execution and Coordination

– .NET 4 Task Parallel Library, Apache Zookeeper• Distributed Map-Reduce

– Apache Hadoop, Apache MapReduce, StarFish MapReduce• Distributed Storage for Large Scale Structured Data (aka Big Table / Big

Data)– Apache Cassandra, Apache Hbase, Neptune, Hypertable

• Grid Frameworks– Globus, Condor, DataSynapse

• Distributed Object and Tuple Spaced Data Cache– Oracle Coherence, Terracotta Ehcache, Spring GemStone, memcache, GigaSpaces

XAP• REST Frameworks

– Restlet, .NET WCF, DJango• Actor model

– Akka, Jetlang, Actors Guild, Actor Foundry,

31

Page 32: Building Cloud-Aware Applications

Programming LanguagesCloud-ready languages are emerging and maturing• Functional Languages

– Haskell– Occam– F#– Clojure

• Actor Model Alignment– Erlang– Scala

• Parallel Computation and Data Processing– Skywrite– Pig– BOOM 32

Page 33: Building Cloud-Aware Applications

Building Cloud-awareness

Focus on adopting Cloud-friendly 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 34: Building Cloud-Aware Applications

Resources• Try StratosLive right now:

– https://stratoslive.wso2.com/• Read about Stratos:

– http://wso2.com/cloud/stratos/ – Source Download available

• White Paper– Selecting Platform as a Service– Platform as a Service TCO: multi-tenant shared container

• Blog Articles– What is Platform as a Service?– PaaS Evaluation Framework for CIOs and Architects– How to simplify Platform as a Service Complexity – Searching for Cloud Reference Architecture

• Contact us:– [email protected]

Page 35: Building Cloud-Aware Applications

Contact us:http://wso2.com/contact/

Follow us:

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

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

Follow us:

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

Page 36: Building Cloud-Aware Applications

lean . enterprise . middleware