Distributed System: Lecture
5
Box LeangsuksunSWECO Endowed Professor, Computer Science
Louisiana Tech University
CTO, PB Tech International Inc.
Operating System Concepts!
Box’s 1 minute Bio!
• PhD in CS (1995): !
– PhD Thesis: Resource management/allocation in Heterogeneous Parallel Distributed Computing!
• 7 years in industry labs (Bell-Labs, Lucent Technologies)!
– Highly Reliable Software/system (IN, Service Management)! – Architect, PM, Tech lead (15-30 team size)!
– R&D -> 4 major network management products!
• Associate Professor in CS since 2002.!
– 15 graduate students (4 PhD)!
• Research Interest!
– Cluster computing, Fault Tolerance OS/Runtime, Reliability , Availability and Serviceability and Security (RASS) in HPC/HEC, Software Engineering!
• Services!
– IEEE Cluster Computing Program committee member 2004-2005! – A founder and CO-Chair: High Availability and Performance
Computing 2003-2004!
– 2003 Outstanding Teach Award, COES, Louisiana Tech U.! – Creator of www.searchkatrina.org !
Cloud Computing
• Intro to Cloud Computing & Concepts • Amazon AWS
• Expereinces in cloud app evaluation, research and development
Cloud Computing: Intro
Box LeangsuksunSWECO Endowed Professor, Computer Science
Louisiana Tech University
- What is cloud computing?
- Characteristics of cloud computing
- Advantages and Disadvantages of cloud Computing. - Cloud Computing service models
- Cloud Computing deployment Model - Cloud Computing Concerns
- Conclusion
What is Cloud Computing?
• - Every cloud vendor have their own definition
of cloud.
• In General, Cloud computing is a Internet based
computing where hardware resources and
software are exposed as a services.
Internet vs Cloud
What is Cloud Computing?
• These Services are exposed in a scalable manner
so that the user can use those services and pay for
only those services that are used.
• as on demand computing just like to get electricity
we plug wire into socket.
• - According to the survey by IDC between 2008
and 2010, the main reason to adopt a cloud
computing for the organization is low cost option
Cloud Definition in the eyes of
service provider
• Technology aspects
• Data Center – computing, networking & storage as well as application
• Manage pools of resources
• Virtualization and provisioning • Monitoring & Accounting
• All typical well managed Data center admin jobs
Cloud computing takes
virtualization to the next step
•
You don’t have to own the hardware
• You “rent” it as needed from a cloud
• There are public clouds
– e.g. Amazon EC2, and now many others (Microsoft, IBM, Sun, and others ...)
• A company can create a private one
– With more control over security, etc.
20090909_VirtualizationAndCloud 11
Goal 1 – Cost Control
• Cost
– Many systems have variable demands
• Batch processing (e.g. New York Times) • Web sites with peaks (e.g. Forbes)
• Startups with unknown demand (e.g. the Cash
for Clunkers program)
– Reduce risk
20090909_VirtualizationAndCloud 12
Goal 2 - Business Agility
• More than scalability - elasticity!
– Ely Lilly in rapidly changing health care business
• Used to take 3 - 4 months to give a department a server cluster, then they would hoard it!
– Using EC2, about 5 minutes!
• And they give it back when they are done!
20090909_VirtualizationAndCloud 13
Goal 3 - Stick to Our Business
• Most companies don't WANT to do system administration
– Forbes says:
• We are is a publishing company, not a software company
• But beware:
– Do you really save much on sys admin?
– You don't have the hardware, but you still need to
14
5 Essential Cloud Characteristics
• On-demand self-service • Broad network access • Resource pooling
– Location independence
• Rapid elasticity
- On demand Service
It allows organizations or users to get the computing resources they
need to run a application without having to go through different vendors that provide a services.
- Resource Pooling
Cloud computing allows pooling of computing resources to serve many consumers. Cloud providers resource are pooled to serve many customer using multitenant model, in which provider physical and virtual resources are assigned and reassigned according to the users demand.
Rapid Elasticity
The ability to expand and contract services on need basis is a key feature of the cloud computing. Cloud computing provides a resources like storage, servers and networking on demand means that if organization demand grows it can match its capacity to its demand.
- Broad Network Access
Traditional software’s were client based software like Open Office, Microsoft office were user have to install and upgrade their software in order to use it. User cannot access to the software if they are away from the system.
Pay Per Use
Cloud computing is a utility computing. Users pay for only what they have used and therefore use are charged on consumption based model.
- Scalability
- Cost Saving
- Business Agility
- Build in disaster recovery and back-up sites - Greener
- Security
- Data Location and recovery
- Internet dependency, performance and latency - Availability
- Current Enterprise application is difficult to migrate
22
3 Cloud Service Models
• Cloud Software as a Service (SaaS)
– Use provider’s applications over a network
• Cloud Platform as a Service (PaaS)
– Deploy customer-created applications to a cloud
• Cloud Infrastructure as a Service (IaaS)
– Rent processing, storage, network capacity, and other fundamental computing resources
• To be considered “cloud” they must be deployed on top of cloud infrastructure that has the key
Software as a service (SaaS)
- Software as a service (SaaS) also referred as software on demand, web based software or on demand software try to replace the application running on PC.
- In a simple term we are simply renting a software instead of buying it.
- The key providers are SaleForce.com, Google office application, Microsoft office 365, SAP HR.
Platform as a service (PaaS)
- Platform as a service (PaaS) provides a application development environment to user as a service by a cloud vendor.
- The consumer/developer can use this platform to develop application. - Cloud vendor is responsible for handling and managing the
infrastructure.
- Tradition model for developing and deploying a large application is complex and expensive.
- The key providers are Microsoft Azure Services Platform, Google App Engine.
Infrastructure as a Service(IaaS)
- Infrastructure as service provide a computing infrastructure to the user as service by a cloud vendor, sometime is also refereed as Hardware as a service (HaaS).
- Virtualization technique plays major role to make Infrastructure as a service reality.
- The user do not manage or control the underlying cloud infrastructure but has control over operating systems, storage, deployed applications, and possibly limited control of select networking components.
- The Key Provider are The Amazon Elastic Compute Cloud (Amazon EC2) ServePath’s(GoGrid), the Rackspace Cloud , the IBM Smart Business cloud solutions, Oracle Cloud Computing , GigaSpaces , RightScale and Nimbus .
26
Service Model Architectures
Cloud Infrastructure IaaS
PaaS SaaS
Infrastructure as a Service (IaaS) Architectures
Platform as a Service (PaaS) Architectures Software as a Service (SaaS) Architectures Cloud Infrastructure SaaS Cloud Infrastructure PaaS SaaS Cloud Infrastructure IaaS PaaS Cloud Infrastructure PaaS Cloud Infrastructure IaaS
Various service models &
responsibilities
28
4 Cloud Deployment Models
• Private cloud
– enterprise owned or leased
• Community cloud
– shared infrastructure for specific community
• Public cloud
– Sold to the public, mega-scale infrastructure
• Hybrid cloud
Public Cloud
- The cloud infrastructure is available to the general public, it represent a cloud service that are openly accessible to the public.
- One of the key features of a public cloud is that all user for particular public cloud share the same infrastructure pool with different configuration and security configuration.
- Major player are Salesforce, Google, Microsoft, Amazon, Yahoo, Rack space and Zoho.
Private Clouds
- Private is also called internal cloud.
- It gives access to the cloud services for users who belong to the same organization that owns the cloud.
- Private cloud generally reside behind the firewall of the organization to provide a organization more control over the security policies.
- The disadvantage with this model is that is it is expensive to build and maintain a private cloud than access public cloud, therefore private cloud brings a larger cost and responsibility.
Hybrid Clouds
- Hybrid Clouds takes the benefits of both the public and private cloud models.
- It is combination of two or more clouds (public, private) that are unique but are tie together by standard technology (bridge) that allows them for application and data portability.
Comparison: Pros & Cons
33
Amazon AWS
Give out mini project homework
1. Going thru this tutorial “Getting Started with Linux Web Applications in the AWS Cloud”,
http://aws.amazon.com/web-applications/gsg-webapps-linux/.
2. Create your AWS account and then follow each step in the above to create your own instances. Capture your screenshots to show what you do.
MS Azure
Google Clouds
Sample of comparisons
5/12/14
Cloud computing security
Requirements
Where ‘X ‘ denoting a mandatory requirement and ‘*’ optional requirement
Technologies behind the cloud
• User side
– Browser or access devices/APP – Connectivity (internet)
• Examples
– Google docs.. – Hotmail or gmail – Dropbox
– Amazon AWS (console interface)
Technologies behind the cloud
• Provider side
– Connectivity (internet)
– Hardwares (server farm, storage, web) – Infarstructure (data center)
– Application Platform – Virtualizations
– Reliability Avialabilty Serviceabilty + Security – Support Personal
– Accouting
42
Foundational Elements
of Cloud Computing
• Virtualization • Grid technology • Service Oriented Architectures • Distributed Computing • Broadband Networks • Browser as a platform • Free and Open SourceSoftware • Autonomic Systems • Web 2.0 • Web application frameworks • Service Level Agreements
43
Web 2.0
• Is not a standard but an evolution in using the WWW • “Don’t fight the Internet” – CEO Google, Eric Schmidt • Web 2.0 is the trend of using the full potential of the
web
– Viewing the Internet as a computing platform
– Running interactive applications through a web browser – Leveraging interconnectivity and mobility of devices
– The “long tail” (profits in selling specialized small market goods)
– Enhanced effectiveness with greater human participation
• Tim O'Reilly: “Web 2.0 is the business revolution in the computer industry caused by the move to the
Internet as a platform, and an attempt to understand the rules for success on that new platform.”
44
Software as a Service (SaaS)
• SaaS is hosting applications on the Internet as a service (both consumer and enterprise)
• Jon Williams, CTO of Kaplan Test Prep on SaaS
– “I love the fact that I don't need to deal with servers, staging, version maintenance, security, performance”
• Eric Knorr with Computerworld says that “[there is an] increasing desperation on the part of IT to
minimize application deployment and maintenance hassles”
45
Three Features of
Mature SaaS Applications
• Scalable
– Handle growing amounts of work in a graceful manner
• Multi-tenancy
– One application instance may be serving hundreds of companies
– Opposite of multi-instance where each customer is provisioned their own server running one instance
• Metadata driven configurability
– Instead of customizing the application for a customer
(requiring code changes), one allows the user to configure the application through metadata
46
SaaS Maturity Levels
• Level 1: Ad-Hoc/Custom • Level 2: Configurable • Level 3: Configurable, Multi-Tenant-Efficient • Level 4: Scalable, Configurable, Multi-Tenant-Efficient 46
47
Utility Computing
• “Computing may someday be organized as a
public utility” - John McCarthy, MIT Centennial in 1961
• Huge computational and storage capabilities available from utilities
• Metered billing (pay for what you use)
• Simple to use interface to access the capability (e.g., plugging into an outlet)
48
Service Level Agreements
(SLAs)
• Contract between customers and service
providers of the level of service to be provided • Contains performance metrics (e.g., uptime,
throughput, response time) • Problem management details
• Documented security capabilities
49
Autonomic System Computing
• Complex computing systems that manage themselves • Decreased need for human administrators to perform
lower level tasks
• Autonomic properties: Purposeful, Automatic, Adaptive, Aware
• IBM’s 4 properties: self-healing, self-configuration, self-optimization, and self-protection
IT labor costs are 18 times that of equipment costs.
50
Grid Computing
• Distributed parallel processing across a network • Key concept: “the ability to negotiate
resource-sharing arrangements”
• Characteristics of grid computing
– Coordinates independent resources – Uses open standards and interfaces – Quality of service
– Allows for heterogeneity of computers
– Distribution across large geographical boundaries – Loose coupling of computers
51
Web Services
51
• Web Services
– Self-describing and stateless modules that perform discrete units of work and are available over the network
– “Web service providers offer APIs that enable developers to exploit functionality over the Internet, rather than delivering full-blown applications.” - Infoworld
– Standards based interfaces (WS-I Basic Profile)
• e.g., SOAP, WSDL, WS-Security
• Enabling state: WS-Transaction, Choreography
– Many loosely coupled interacting modules form a single logical system (e.g., legos)
52
Service Oriented Architectures
• Service Oriented Architectures
– Model for using web services
• service requestors, service registry, service providers
– Use of web services to compose complex, customizable, distributed applications
– Encapsulate legacy applications
– Organize stovepiped applications into collective integrated services
53
Web application frameworks
• Coding frameworks for enabling dynamic web sites
– Streamline web and DB related programming operations (e.g., web services support)
– Creation of Web 2.0 applications
• Supported by most major software languages • Example capabilities
– Separation of business logic from the user interface (e.g., Model-view-controller architecture)
– Authentication, Authorization, and Role Based Access Control (RBAC)
– Unified APIs for SQL DB interactions – Session management
– URL mapping
• Wikipedia maintains a list of web application frameworks
54
Free and Open Source Software
• External ‘mega-clouds’ must focus on using their massive scale to reduce costs
• Usually use free software
– Proven adequate for cloud deployments – Open source
– Owned by provider
• Need to keep per server cost low
– Simple commodity hardware
55
Platform Virtualization
• “[Cloud computing] relies on separating your
applications from the underlying infrastructure” - Steve Herrod, CTO at VMware
• Host operating system provides an abstraction layer for running virtual guest OSs
• Key is the “hypervisor” or “virtual machine monitor”
– Enables guest OSs to run in isolation of other OSs – Run multiple types of OSs
• Increases utilization of physical servers
• Enables portability of virtual servers between physical servers
20090909_VirtualizationAndCloud 56
The Traditional Server Concept
• Pros
– Easy to conceptualize – Fairly easy to deploy – Easy to backup
– Virtually any application/
service can be run from this type of setup
• Cons
– Expensive to acquire and maintain hardware
– Not very scalable – Difficult to replicate
– Redundancy is difficult to implement
– Vulnerable to hardware outages
– In many cases, processor is under-utilized
20090909_VirtualizationAndCloud 57
The Virtual Server Concept
Virtual Machine Monitor (VMM) layer between Guest OS and hardware
Virtualization: Key concepts
• Virtual Machine (VM), guest OS: complete operating system running in a virtual environment
• Host OS: operating system running on top the
hardware, interface between the user and the VMM and VMs
• Virtual Machine Monitor (VMM):, Hypervisor: manage VMs (scheduling, hardware access)
Virtualization: Usage
Ø Server consolidation Ø Software testing
Ø Security, Isolation
Ø Lower cost of ownership of server. Ø Increase manageability
Different Virtualization Concepts
• Full-virtualization: full virtual machine, from the boot sequence to the virtualized hardware
• Para-virtualization: the guest OS has to be modify for performance optimization
• Emulation: the guest OS architecture is different
from the architecture of the host OS (translation on the fly). Ex: PPC VM on top of a x86 host OS.
Classification
• Two kinds of system virtualization
– Type-I: the virtual machine monitor and the virtual machine run directly on top of the hardware,
– Type-II: the virtual machine monitor and the virtual machine run on top of the host OS
Hardware Host OS VMM VM VM Hardware VMM Host OS VM VM
Available Solutions
• Example of Virtualization Projects
– Type I: Xen, L4
– Type II: VMWare, Qemu
• Different Benefits
– Type I: performances
• direct access to the hardware simple to implement • para-virtualization possible
– Type II: development
• no limitation of para-virtualization • emulation possible
Case Studies
Suppose you are Forbes.com
• You offer on-line real time stock market
data
• Why pay for capacity weekends, overnight? 20090909_VirtualizationAndCloud 64 9 AM - 5 PM, M-F ALL OTHER TIMES Rate of Server Accesses
20090909_VirtualizationAndCloud 65
Forbes' Solution
• Host the web site in Amazon's EC2 Elastic
Compute Cloud
• Provision new servers every day, and deprovision them every night
• Pay just $0.10* per server per hour
– * more for higher capacity servers
Eucalyptus
- Elastic Utility Computing Architecture for Linking Your Programs to useful systems.
- It is an open-source software for implementing 'cloud computing' on clusters. - It is webservice based cloud computing infrastructure.
- The current interface to Eucalyptus is compatible with Amazon's EC2 interface, but the infrastructure is designed to support multiple client-side interfaces.
- Eucalyptus helps to set up a cloud platform, which then can be offered as a service, either publicly or internally.
Microsoft Azure Cloud PaaS
Azure Goals
ü Familiar tools, languages, and frameworks with .NET and Visual Studio ü Provides the choice to build on-premises, cloud, or hybrid solutions ü Integrate with existing assets such as AD and premises applications ü Multiple protocol support including HTTP, REST, SOAP, AtomPub
ü Broad investment in open, community-based access to Azure services ü Simple scenarios are simple – complex scenarios are possible
ü Services hosted in Microsoft’s data centers ü Designed for high availability & scalability
What does Azure platform offer to
developers?
Amazon Cloud
Comparison: open vs closed
sources in platform-as-a-Service
Comparison: open vs closed
sources in IaSS
The NIST Cloud Definition
Framework
81 Community Cloud PrivateCloud Public Cloud
Hybrid Clouds Deployment Models Service Models Essential Characteristics Common Characteristics Software as a Service (SaaS) Platform as a Service (PaaS) Infrastructure as a Service (IaaS) Resource Pooling
Broad Network Access Rapid Elasticity Measured Service On Demand Self-Service
Low Cost Software
Virtualization Service Orientation Advanced Security Homogeneity
Massive Scale Resilient Computing Geographic Distribution
Conclusion
- Cloud computing is the promising technology where hardware resources and software are exposed as a services in a scalable manner so that the user can use those services and pay for only those services that are used.
- Cloud computing is not a silver bullet technology, we should make decision on a project by project basis and should be on the nature of the application or data that is being supported.
- Some Disadvantage such as security risks.
- Cloud computing has a potential to be a disruptive technology that may change how the IT business is done.
Cloud Computing In Reality: Experience
sharing in cloud solution developments and
evaluations
Cloud Computing In Reality: Experience sharing in cloud solution developments and evaluations
• The talk presents recent experiences in evaluating cloud & other solutions and making decisions towards cloud
services. The speaker will discuss requirements aspects of his medical applications and another R&D project as well as why his decision was made and based on technical and
business facts.
84
Dilbert on cloud J
Outline
v Background & Motivation
v Cloud-based Medical Service Application
v Architecture decision & Amazon AWS
v Summary
BACKGROUND & MOTIVATION
Opportunities
• EKG Services – Medical Application for startup
• Technical Evaluations for
Cost-based Disaster Recovery Solution R&D (next talk)
Decisions, Decisions??(1)
• Medical data is vital, especially in intesive care • Data & System/Infrastructure are quite Critical • Must be always available
• Cost
• Pay Per Usage
Decisions, Decisions?? (2)
• Time to Market
• Guaranteed Reliability, Availability & Performance • Stick to your busines
• Must be profitable
• Hosted Servers, Private or Public CLOUD
EKG SERVICES
Credit: picture from nih.gov
EKG - Electrocardiography
• A medical test that checks for problems with the electrical activity of your heart
92
EKG Services- Smart Health
• Requirements• Mobility – wireless
• Smarter – data warehouse & data analytics • As Reliable
• Service-based or subscription-based • Cost Effective
93
EKG Services- possible
technologies
• Embedded system – electronics
• Wireless Technologies – wifi, bluetooth • Web/Client-Servers (SOA) – web services
• Service-based Separation of infrastructure –
Virtualization/cloud computing
• Smart health – data analytic or hadoop
System Architecture
! 95
cloud
Client Device/App
! 96
The View
!
97
Smartness – server based decisions
98
Pros & Cons on the server
architecture
99
1-Tier 2-Tier Multi-Tier
Benefits Very simple
Inexpensive No server needed Good security More scalable Faster execution Exceptional securityFastest execution “Thin” client Very scalable
Issues Poor security
Multi user issues More costly More complex “Thick” client Very costly Very complex
Users Usually 1 (or a
few) 2-100 50-2000 (+)
Architectue Decisions
• Multi-tier SOA architecture (3-tier)
• Anticipated fast growth, elasticity & guaranteed Reliability with Auto-scaling
• Smart health data analytic • Cost Factor & Pay per usage
• Cloud-based compute (VM) & storage/DB
• Public cloud - Amazon EC2 & RDS
Solutions
Amazon Cloud Services
• Elastic Compute Cloud – EC2 (IaaS) • Aamzon RDS (Database)
• Elastic Block Storage – EBS (IaaS) • SimpleDB (SDB) (PaaS)
• Simple Queue Service – SQS (PaaS) • Elastic Load Balancing (ELB)
• Consistent AWS Web Services API & AMI
Cloud-based EKG service
102
RDS
hadoop
EKG app server Web + app server On EC2 instance
Cloud-based EKG service
(alternative)
103
RDS
hadoop
EKG app server
Web serve
r
Is amazon cloud the right choice?
• When compared to host your own infrastructure.
• Cost is a major & obvious factor beside to focus on your business.
– Server cost ($10-20K/server for HA)
– Admin staffs (e.g. $100,000 – $150,000/ year FTE) – Data center ($300/ft2, build or rent??)
– Operational cost (electric/cooling, $23,000/kW) – Cost of downtime and lost data
Example Amazon EC2 Pricing
Example Amazon RDS Pricing
• We make the same assumption:(Micro, 10 hours pre day)
• One year cost will be : 23$ + 0.016*12*365=93.08$
106
Scaling & Reliability
• Nothing is for free but possible
• Using AWS Elastic Load Balancing • Auto-Scaling with CloudWatch
• Require the right design, configurations and developments
The Right Cloud App
• Design & build cloud app.. Don’t just build app in the cloud
• Design for failure anticipation
• Best Practices in design scalability • Design for dynamism
• Use cloud standard API & cloud features • Build Security into every component
Design & build cloud app
• Use self-discovery, be self configurable, and network independent • Use cloud standardized Messaging & DB when possible
• Leverage inherent EBS replication and snapshots for DBMS
109
Design with failure anticipation
• Avoid single point of failure
• Use multiple AWS zones (EC2 can fail, zone can be unavailable)
• Use Elastic IP addresses
• Create multiple DBMS slaves across Availability Zones
• Use Amazon CloudWatch for real-time monitoring
110
Design Scalability
• No central point of data storage contention • Use Load Balancing such as ELB
• Use Auto-scaling
• Design cloud app servers that are loosely coupled with self-discovery
• Use Amazon CloudWatch for realtime monitoring
111
Conclusion
• Cloud architecture seems to be the right choice for startup (e.g. EKG smart health service)
• When no predetermined or guaranteed workload or customers, pay per usage is more logical and cost-effectives
• Nothing for free.. So design and build cloud application not just build your app on cloud • Stick to your BUSINESS