The document discusses the development of a Platform as a Service (PaaS) using Elaster CAP. It describes Elaster CAP's architecture which uses a Workload Optimization Engine (WOE) to dynamically distribute workloads across resource hosts based on global knowledge of system resources. It also discusses how Elaster CAP implements state transactions to transition cloud entities like application containers from their current to expected states.
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
[OSDC.tw 2011] The Path to Pass into PaaS -- How We Build the Solution
1. The Path to Pass into PaaS
How We Build the Solution
Copyright 2010 TCloud Computing Inc.
2. The Speaker
• Jeff Hung
– A Blogger
www.jeffhung.net/blog
– Identity on the Net
@jeffhung
– Developer of Trend Micro
jeff_hung@trend.com.tw
Copyright 2010 TCloud Computing Inc.
10. Mr. User
Software-as-a-Service (SaaS)
• E-Commerce
• CRM / Supply Chain
• Knowledge Mgt.
• Communication
Value Near to End User
Platform-as-a-Service (PaaS)
• Web Services
• Components
• Big-Data Processing
Infrastructure-as-a-Service (IaaS)
• Network
• Compute
• Storage
• Virtualization
10
11. Mr. User
Software-as-a-Service (SaaS)
• E-Commerce
More like a Capital Game
• CRM / Supply Chain
• Knowledge Mgt.
• Communication
Value Near to End User
Platform-as-a-Service (PaaS)
• Web Services
• Components
• Big-Data Processing
Infrastructure-as-a-Service (IaaS)
• Network
• Compute
• Storage
• Virtualization
11
13. Elaster CAP 1.0
Elaster CAP is a Product for public / private / vertical
PaaS operators.
SaaS SaaS
SaaS 1 SaaS 5 SaaS
2 SaaS 4 SaaS 7
3 6
Elaster Cloud Application Platform API
Development Deployment
Publish Management
Dynamic Workload Distribution & Optimization
TCloud Elaster CAP Scalability & Availability
Unpredictable
(Cloud Application Platform) Big Massive
Peak Compute
Data Workloads
13
14. Elaster CAP 1.0
Elaster CAP is a Product for public / private / vertical
PaaS operators.
SaaS SaaS
SaaS 1 SaaS 5 SaaS
2 SaaS 4 SaaS 7
3 6
Elaster Cloud Application Platform API
TCloud Sale Development Deployment
Computing Publish Management
Dynamic Workload Distribution & Optimization
TCloud Elaster CAP Scalability & Availability
Unpredictable
(Cloud Application Platform) Big Massive
Peak Compute
Data Workloads
14
15. Elaster CAP 1.0
Elaster CAP is a Product for public / private / vertical
PaaS operators.
SaaS SaaS
SaaS 1 SaaS 5 SaaS
2 SaaS 4 SaaS 7
3 6
Cloud Service Provide
Operator
Elaster Cloud Application Platform API
TCloud Sale Development Deployment
Computing Publish Management
Dynamic Workload Distribution & Optimization
TCloud Elaster CAP Scalability & Availability
Unpredictable
(Cloud Application Platform) Big Massive
Peak Compute
Data Workloads
15
16. Elaster CAP 1.0
Elaster CAP is a Product for public / private / vertical
PaaS operators.
SaaS SaaS
SaaS 1 SaaS 5 SaaS
Developer Run 2 SaaS 4 SaaS 7
or Startups 3 6
Cloud Service Provide
Operator
Elaster Cloud Application Platform API
TCloud Sale Development Deployment
Computing Publish Management
Dynamic Workload Distribution & Optimization
TCloud Elaster CAP Scalability & Availability
Unpredictable
(Cloud Application Platform) Big Massive
Peak Compute
Data Workloads
16
17. Elaster CAP Philosophy
• Minimum change of skill-set of developer
Developers don’t need to learn new skill for
developing or porting their applications run
on top of Elaster CAP
• Cloud-based infrastructure in a box
native high-scalability, high-availability,
and load-balancing in system design
Copyright 2010 TCloud Computing Inc. 17
20. • Runtime Services:
– JSP (2.1) / Servlet (2.5) / J2SE 5 or Java SE 6
– PHP (5.3)
– Hadoop Map/Reduce (0.20.2)
• Resource Services:
– RDB (MySQL 5.1)
– Search Engine
– Big Data Storage
(Like Amazon S3)
Copyright 2010 TCloud Computing Inc. 20
21. • Free PaaS Playground
– Enabled by Elaster CAP
– Hosted by TCloud.
• Elaster CAP Official Site
– Download Center
– Document Center
• Tech Support Forum
• Launched in Jan, 2011:
www.elasterlabs.com.tw
Copyright 2010 TCloud Computing Inc. 21
23. The Technical Problems
• Hundreds or thousands of machines
• Each with tens or hundreds of instances
• Instances should be paired or clustered together,
for HA and Balancing
• Dispatch network traffics to correct back-end
• Plan to deliver various cloud services,
from time to time
• Eventually, we still have to face the problem:
How do we optimize it?
Copyright 2010 TCloud Computing Inc. 23
24. The Realistic Problems
• We won’t really operate it.
• Customer don’t know how to operate it.
• Developer want silver bullet, maybe.
• Who’s gonna buy it?
• How will it sale?
Copyright 2010 TCloud Computing Inc. 24
25. That’s Simplify the Problem
• Static configurable feature set
– Define enabled services when bootstrapping
– Same static configurations everywhere
• No online upgrade
– dynamically wired
– incrementally deployed and tested
• Believe some fallacies
– FQDN and flat L3 environment
• Homogenous topology, sort of
– No provisioning
– Install everything, launch by needs
25
26. Scale from 1 to N
ZooKeeper
Hadoop Load
Hadoop API Data Node Balancer
Server
NameNode
Hbase
Java Web
Region
Hbase Server Container
Master
WOE MySQL
LDAP AMP Instance Database
Server
Server
Resource Host
System DB ElasterCAP Composite Server
Fedora 12 x64
Master Node
27. Scale from 1 to N
ZooKeeper
Hadoop Load Hadoop Load
Hadoop API Data Node Balancer API Data Node Balancer
Server Server
NameNode
Hbase Hbase
Java Web Java Web
Region Region
Hbase Server Container Server Container
Master
WOE MySQL WOE MySQL
LDAP AMP Instance Database AMP Instance Database
Server Server
Server
Resource Host Resource Host
System DB ElasterCAP Composite Server ElasterCAP Composite Server
Fedora 12 x64 Fedora 12 x64
Master Node Worker Node * N
28. Network Configurations
• Recognize 2 network segments:
– The Public Network –Accepting Web Traffics from Internet.
– The Private Network – Inter-communicate between nodes.
– These 2 network segments can be the same one.
• Use wildcard DNS as 1st tier load balancing
– www.elasterlabs.com.tw
– api.elasterlabs.com.tw All point to multiple IP addresses
configured as the public network.
– *.app.elasterlabs.com.tw
The 2nd tier load balancers are
– *.s3.elasterlabs.com.tw
waiting there to dispatch requests
to backend application servers.
Copyright 2010 TCloud Computing Inc. 28
29. Internet
ElasterCAP Service
CAP Service
ElasterCAP Service
ElasterCAP Service
Elaster(APIServer)
Server)
(APIServer)
(APIServer)
(API
Balancer
api.elasterlabs.com.tw
Manage
*.app.elasterlabs.com.tw
JavaWeb
Web
JavaWeb Lucene
Lucene
JavaWeb
Java Lucene
Search
Container
Container Indexer
Indexer
Container
Container Indexer
Engine
MySQL
MySQL Hadoop
Hadoop
MySQL
MySQL Hadoop
Hadoop
Database
Database HBase
HBase
Database
Database HBase
HBase
Copyright 2010 TCloud Computing Inc. 29
30. Internet
ElasterCAP Service
CAP Service
ElasterCAP Service
ElasterCAP Service
Elaster(APIServer)
Server)
(APIServer)
(APIServer)
(API
Balancer
api.elasterlabs.com.tw
Manage
*.app.elasterlabs.com.tw
JavaWeb
Web
JavaWeb Lucene
Lucene
JavaWeb
Java Lucene
Search
Container
Container Indexer
Indexer
Driven by Workload Container
Container Indexer
Engine
Optimization Engine MySQL
MySQL Hadoop
Hadoop
MySQL
MySQL Hadoop
Hadoop
(WOE) Database
Database
Database
HBase
HBase
HBase
Database HBase
Copyright 2010 TCloud Computing Inc. 30
31. Resource Host vs. Guest Instances
API
Server
Nginx Balancer Nginx
(Daemon) Guest Instance
Jetty Container Jetty Resource
≈
WOE
(JVM) Guest Instance Host
MySQL Server MySQL
(Daemon) Guest Instance
CompositeServer (JVM)
Fedora 12 x86 on Physical/Virtual Machine
Fedora 12 x86 on Physical/Virtual Machine
Fedora 12 x86 on Physical/Virtual Machine
31
32. API 1: Where is WOE?
Server
Coordination Service
(ZooKeeper)
2: Hey, I need a Jetty.
3: Locate hosting based on global knowledge.
WOE
0: Hosted in all nodes, only leader activate. 5: I’m currently running a Jetty.
4: Oh, I’m expected to run a Jetty.
32
33. Cloud Entity and Expected/Current State
/
WOE
resourcehosts
0ea40b00...5c3f4c436e7b Cloud Entity
expected
current
(ephemeral) Resource Host Guest Instance
JAVA_WEB_CONTAINER
8e1bb5f1...766787dd7540
expected Jetty MySQL Nginx
Guest Instance Guest Instance Guest Instance
current
«realize»
DATABASE
Copyright 2010 TCloud Computing Inc. 33
34. State Transaction
Transit from any current state to expected state.
INITIALIZING STARTING
STOPPED STARTED UPDATING
DESTROYING STOPPING
Need
DESTROYED CRASHED
Recovery
34
35. Why not RPC or MQ?
• RPC doesn’t scale. Consider locating best hosting.
• MQ can’t remember, and can’t be tracked.
• Communicate via Whiteboard using ZooKeeper
– Strict ordering
– Event notification
– Asynchronous
– Global Knowledge
Copyright 2010 TCloud Computing Inc. 35
36. Application IDE (Integrated development environment)
Elaster CAP SDK
App Runtime Application Management API
Management
Application
Portal
M/R Jobs HTML JSP
Resource Host
MapReduce Web Container Servlet Container
Elaster CAP API
Administration
Search Engine Relational DB (MySQL)
System
CLI
Big-Data Storage Other…
Workload Optimization Engine (WOE)
Operating System (Linux Fedora 12)
Infrastructure Service (virtual machine or physical machine)
37. Elaster Labs – Current Status
• 5+ virtual machines
• 13x Running Applications
• Just released Elaster CAP 1.0.1.1025
– Download from www.elasterlabs.com.tw
– VM Image Distribution
• Platform of TM Programming Contest 2011
• We appreciate your comments.
Copyright 2010 TCloud Computing Inc. 37
Application Development Platform: Suitable for startups or companies want to revisit and rewrite existing applicationsApplication Management Platform: Help companies move their applications as-is with little or no need for retrofit.http://www.prudentcloud.com/cloud-computing-technology/multiple-personalities-of-platform-as-a-service-18102010/Force.com: http://www.salesforce.com/platform/Microsoft Azure: http://www.microsoft.com/windowsazure/Google AppEngine: http://code.google.com/appengine/Heroku: http://heroku.com/RIghtScale: http://www.rightscale.com/Makara: http://www.makara.com/JBoss/PHPJoins Red Hat