Download presentation
Presentation is loading. Please wait.
Published byLambert Dawson Modified over 8 years ago
1
Cloud Computing from a Developer’s Perspective Shlomo Swidler CTO & Founder mydrifts.com 25 January 2009
2
Agenda What is Cloud Computing? The advantages of Cloud Computing Overview of Amazon Web Services Challenges faced by developers in the cloud... … and some solutions
3
Marketing platform for indie music promotion Help indie musicians find fans among social network users Cloud-based, using Amazon Web Services Professional Services and Consulting Cloud Computing, scalable web applications
4
Cloud Computing A style of computing in which resources are provided “as a service” over the Internet to users who need not have knowledge of, expertise in, or control over the technology infrastructure (“in the cloud”) that supports them. – Wikipedia
5
Cloud Computing A style of computing in which resources are provided “as a service” over the Internet to users who need not have knowledge of, expertise in, or control over the technology infrastructure (“in the cloud”) that supports them. – Wikipedia
6
Software as a Service – SaaS Platform as a Service – PaaS Infrastructure as a Service – IaaS Cloud Computing: ?aaS
7
Software as a Service Examples: Google Apps – Gmail, Google Docs, etc.
8
Platform as a Service Examples: Google App Engine, Force.com
9
Infrastructure as a Service Storage Example: Amazon Web Services
10
Advantages of Cloud Computing From a Developer’s Perspective: Pay-as-you-go (“utility computing”) – saves $$ On-demand resource allocation & release Scalability
11
Risks of Cloud Computing Security Who else has access to “your” resources ? The provider’s staff ? Investigators ? Regulators ? Recovery How easy is it ?
12
Cloud Computing Providers SaaS PaaS IaaS
13
Amazon Web Services CPUs & Memory Elastic Compute Cloud “EC2” Storage Disks Simple Storage Service “S3” Network IP Addresses Content Delivery Network Database SimpleDB Messaging Simple Queue Service “SQS”
14
Challenges Faced by Developers in the Cloud Automatic scaling Getting your data into the cloud DNS
15
Challenge: Automatic Scaling HOW?
16
Developing Auto-Scaling Cloud Applications Optimize your database Use caching Use Service Pools
17
Typical Application Architecture: Three Tiers Load Balancer Client Web Tier Business Logic Tier Database Tier
18
Scaling the Database Tier: Optimize Database Tier Optimize your database Know your queries Know your indexes Denormalize your schema
19
DB Database Tier Cache to reduce database hits Not just query results Objects, partially rendered pages, etc… Open-source: memcached Scaling the Database Tier: Cache
20
memcached Distributed in-memory cache Extremely low CPU usage Used by facebook, Wikipedia, Amazon, Yahoo, etc. Use “leftover” memory on a machine to serve as cache Great for cloud VM instances DB memcached server A memcached server C memcached server B
21
Cloud Application with Scalable Database Tier Database Tier cache Load Balancer Client Web Tier Business Logic Tier
22
Anatomy of the Business Logic Tier Components have different resource usage Requests flow through different components Limited scaling granularity
23
Scaling the Business Logic Tier: Service Pools Pool APool BPool CPool D Separate homogeneous pools of instances Each pool of services is independently scalable
24
Service Architecture of Service Pools Message Queue Service Pool Storage Status Logger Msg Queue Ingestor input output Message Queue status work request Pool Manager
25
Scalable Business Logic Tier Service Service A Pool A Service Service B Pool B Database Tier cache
26
Scalable Cloud Application Architecture Database Tier cache Load Balancer Client Web Tier Business Logic Tier Pool
27
Open Source Service Pools on Amazon EC2 Lifeguard (Java) http://code.google.com/p/lifeguard Article: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=915 Kato (Ruby) http://rubyforge.org/projects/kato/ Implemented using boto (Python) Article: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=691
28
Service Pool Example Musicians can import their images from other social networks into their MyDrifts profile CopyImageFromSocialNetwork AddImageToProfile ResizeImage Ingestor Pool Pool Manager Pool
29
Service Pool Example Implement the Service public class ResizeImageService extends ServiceBaseClass { public File executeService(InputStream input) { Image inputImage = new Image(input); Image resizedImage = inputImage.resizeTo(100,100); return resizedImage; } Configure the service deployment ResizeImage ResizeImage-input ResizeImage-status And likewise for the other services….
30
Service Pool Example Define the ImportImageFromSocialNetwork Workflow CopyImageFromSocialNetwork CIFSN-input ResizeImage ResizeImage-input AddImageToProfile AddImageToProfile-input
31
Service Pool Example Implement the Ingestor for this Workflow public class ImportImageFromSocialNetworkIngestor { public void ingest(URL imageURL, int userId) { WorkRequest workRequest = new WorkRequest(ImportImageFromSocialNetworkXML); workRequest.addParam("copyImage.imageURL", imageURL); workRequest.sendMessageOnInputQueue(); }
32
Service Pool Example Configure the Pool Manager ResizeImage ami-39ba5df0 ResizeImage-status ResizeImage-input 1 360 1 480 0 20 20000 This is the Service Level Agreement (SLA) for this service. And SLA definitions for the other services…
33
Service Pool Example That’s all there is to the implementation The framework takes care of the rest (message handling, reporting status, scaling logic, etc.) CopyImageFromSocialNetwork AddImageToProfile ResizeImage Ingestor Pool Pool Manager Pool
34
Challenge: Getting Your Data into the Cloud Storage Data HOW?
35
Getting Data into the Cloud Dominant factor is cost of moving the data Into the cloud: AWS price: $0.10 per GB Within the cloud: AWS price: free For “small” data sets, just upload it For larger data sets, upload time becomes important Split data and upload pieces in parallel Ensure reliability of connection! No great solution yet...
36
Challenge: DNS How do you use DNS for machines in the cloud? Your cloud machine may not get the same IP address each time it boots DNS changes take time to propagate Traditional “Dynamic DNS” solutions are inadequate Dynamic DNS typically integrated into boot process Can’t launch a standby, backup machine without interfering with DNS setup of live machine SSL certificates are bound to a specific IP address Amazon Web Services solution: Elastic IP Addresses
37
Q&A
38
Cloud Computing from a Developer’s Perspective Shlomo Swidler shlomo.swidler@gmail.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.