Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Summer School - Building a Cloud-Aware Application
1. 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/
2. 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
3. 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
4. Cloud Scale and Distributed Providers
Business
Functional Proces
Presentation and Business
Mashups Role Process
Presentation Functional Business
Role Role Process
Business
Presentation and Functional
Role Process and
Mashups Functional Business Rules
Presentation and
Mashups code
Client Tier
Resource
Integration Services Tier
Resource
Services
Resource
Services
Integration Services
Public Cloud Services
Private
Applications
5. Application Resiliency and Composition
Infrastructure as a
Composite Mobile Service (IaaS)
Application Application
SaaS Application
Cloud Web
application
API Endpoint
Endpoint
Integration Services
Business Service Portfolio Application Portfolio
Hybrid
Presentation Services
Platform
Business
Process and
Functional Services
Services
Rules Services
Resources Services
Integration Services
6. Domain Specific Platform as a Service
Delivering Cross-Partner Digital Business Platform
Vertical Application 1 Vertical Application 2 Vertical Application 3
App Data App Data App Data
Summit
Vertical
App Source Code App Source Code App Source Code
App App App
Configuration Configuration Configuration
Vertical
API
Domain Services Domain Services
Domain Artifacts Domain Artifacts
Managed
Programming Languages
by PaaS
Frameworks
Containers
OS/Hypervisor
Hardware
8. Cloud Application Patterns 18
and Anti-Patterns
Separation of concerns
Failure Resilient Leaky interfaces
Tightly coupled
Single threaded, modules
serial execution
Embarrassingly Parallel /
Minimal Shared Nothing Architecture Deterministic
Consumption performance
Resource locks Monolithic footprint Single tenancy model
Deploy and execute on optimum topology
9. 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
10. Architectural Difference Between Web
Application and Cloud Application
Web Application Cloud Application
• Synchronous request-reply • Asynchronous interaction
interaction • Queues and workers
• Centralized state (i.e. single • Scale out across datacenters
database) and session and providers
management • Distributed state and session
• Clustered server instances management
• Silo architecture • Autonomous service instances
• Tenant context personalization
• Shared JVM / Shared Schema
• Shared nothing architecture
11. 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
13. PaaS Evaluation Framework
• Cloud Characteristics
• Cloud Dimensions
• Production Ready
• DevOps Activities and Phases
• Cloud Architecture
• Platform Services
• Programming Model
14. 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
15. 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
16. 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
17. 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
18. 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
19. Quick Start Use Cases
• DevOps Tooling and On-demand self-service
• Automated Governance
• Service level management and elastic scale
• Consumption based pricing and billing
20. 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
21. 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)
22. 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)
23. 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
24. 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