building cloud-aware applications

Post on 08-May-2015

2.225 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Building Applications On Cloud Architecture

Chris Haddad @cobiacomm chris@wso2.com

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

Skating towards the puck

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

Cloud Dimensions• Sharing

– Private / Public / Community• Responsibility

– Internal / External• Location

– On-premise / outsourced

Platform as a Service Adoption Drivers

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

Dev Ops Tooling Automated Governance

Service Level Management

Consumption based Funding

Platform as a Service Capabilities

• 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

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

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

PaaS Reference Architecture

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

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

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

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

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

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

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

Cloud Application Patterns and Anti-Patterns

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

Application Architecture Crossroads

Cloud-awareness

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

PaaS Reference Architecture

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

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

Simplification Through Patterns

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

26

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

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

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

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

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

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

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

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:– bizdev@wso2.com

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

Follow us:

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

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

Follow us:

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

lean . enterprise . middleware

top related