This document discusses the evolution of applications from single machines to large distributed systems across multiple machines and data centers. It notes that building and maintaining such large infrastructures can be costly and inefficient if the capacity is not fully utilized. The document then introduces cloud computing as a more efficient alternative that allows applications to dynamically scale across remote data centers and only pay for the resources that are actually used. Several examples of cloud platforms like Amazon Web Services, Google App Engine, and Microsoft Azure are provided. Both advantages and potential drawbacks of cloud computing are discussed.
7. Back to November 22, 2007
• JavaEdge 2007 “Breaking The
Clustering Limits” session
• Data and computational grids overview
• Terracotta demo
• Easy – one computer!
7
8. Your Application In The Wild
• So, you wrote your grid application
• Now you want to deploy it on TWO(!)
machines transparently
• You buy two machines to get fail-over
and some availability
“Main Server” “Fail Over”
8
9. Your Application In The Wild
• Life’s good – your friends and family
play with your application during the
weekend
• Your application is kind of slow in those
times
• You buy and drop
in another box
• It’s easy for “Main Server” “Fail Over” “Peak Hours”
grid application
9
10. Your Application In The Wild
• You start to sale – SLA, concerned
customers, responsibility –
“production” peak times
• You can’t afford any slowdown!
• You buy a real grid
“Peak Days”
“Main Server” “Fail Over” “Peak Hours”
10
11. Your Application In The Wild
• Money comes in only to make more
money, it’s time to crazy
advertisement campaign!
• This creates a true hype
• You buy more
machines…
“Peak Days” “New Ad Campaign Hype”
“Main Server” “Fail Over” “Peak Hours”
11
13. Your Application In The Wild
• There are additional costs:
• Network with appropriate bandwidth
• Professional services
• Space
• Etc.
13
14. Your Application In The Wild
Congratulations, you just built your
own electric plant
14
15. Your Application In The Wild
• What happens when:
• There is no ad campaign?
• It’s not the peak days?
• It’s not the peak times?
• There is an economic crisis?
• In other words – most of the time?
• The whole bombastic setup is idle
15
16. Your Application In The Wild
• IDLE == WASTING MONEY
• The setup is idle most of the time
• It wasts A LOT of money
• It’s not only building
your own electric
generation system,
it’s using 10% of
its capacity!
16
17. Prediction Problem
Loss/Loss Situation
Service Money
loss loss
Load
Time
Actual Load HW Allocation
17
18. Things “as a Service”
• When you buy a new TV you connect it
to electricity service
• That’s instead of building
or buying or even rent
a generator
• When you buy a new mobile
phone you connect it to
cellular service
• That’s instead of creating your
own communications network
18
19. Advantages “as a Service”
• Low entry barriers
• How much do you pay to get a SIM?
• No capital expenditure
• You pay only per use
• Massive scalability
• You can turn on all you electric devices, probably it
won’t drain the provider’s electricity resources
• Self service
• Yeah, you can turn the TV set on by yourself, big
boy
19
20. Computing as a Service
• Rent computational resources & IT
related capabilities over the Internet
(“The Cloud”)
• Only what you need
• Exactly when you need
• Pay per use
• That’s “Cloud Computing”
20
21. Cloud Computing
• Pay for what you use
• Use only what you need
• Get it via web UI and/or API
• Self Service
• Built on storage and computing
virtualization technologies
21
22. Cloud Computing
• Offers SLA
• Available world-wide
• All the customers throughout the world
get the same response time
• Gartner:“Cloud computing heralds an
evolution of business that is no less
influential than e-business”
22
23. Prediction Problem
React Fast & Pay Per Use
Load
Time
Actual Load HW Allocation Cloud Allocation
23
24. Gartner’s 2009 Strategic Technologies
1. Virtualization (#5 previously)
2. Cloud Computing (new)
3. Servers – Beyond Blades (#8 previously)
4. Web-oriented architectures (new)
5. Enterprise mashups (#6 previously)
6. Specialized Systems (new)
7. Social Software & Social Networking (#10 previously)
8. Unified Communications (#2 previously)
9. Business Intelligence (new)
10. Green IT (#1 previously)
24
25. “Crisis, crisis!” Slide
•Cloud computing is perfect for
crisis times
• No upfront • Cost effective
investments
• Fail cheap
• Time-To-Market
25
26. Agenda
• Introduction – The Missing Link
• Solutions Overview
• Drawbacks
• Resources and Links
• Demo!
26
27.
28. Main Types
• Infrastructure as a Service
• Get your own instance with root access
• Amazon
• GoGrid
• AppNexus
• FlexiScale
• Microsoft Azure (not yet)
• Etc
28
29. Main Types
• Platform as a Service
• Deploy your application on providers’
platform
• Google Application Platform
• Sun’s Network.com & Project Caroline
• Microsoft Azure
• Force.com
• Etc
29
30. What to run on IaaS?
• Clustering techniques:
• HTTP Session replication
• Tomcat, Jetty, etc.
• Shared/Clustered Database
• Install clustered DB
• Use service
30
31. Clustering Tools
• Java MapReduce implementation
• Distributed application server
• Java Spaces implementation
• Network Attached Memory
• Demo is on its way!
• Etc
31
32.
33. AWS – Amazon Web Services
• Collection of remote computing services
• Launched on July 2002
• Simple idea – rent its idle servers
• Implementation – Xen virtualization
• SLA
• Interfaces:
• SOAP and REST
33
34. Amazon S3 – Simple Storage Service
• Flat hierarchy (named buckets)
• ∞ number of 5 GB files
• CloudFront – content delivery service
• US, EU, Asia
• Price - $0.150 First 50 TB / month
• Interfaces:
• Web – S3Browse, S3Fox addon
• Java – JetS3t, Typica
34
35. Amazon SimpleDB (Public Beta)
• Query-oriented storage
• Limited to 1 TB
• Price
• $0.17 per GB-month
• Java interface – SimpleJPA
• Not really relational
35
36. Amazon SQS – Simple Queue Service
• ∞ number of queues
• ∞ number of text messages
• 8 kb each
• Price - $0.01 per 10,000 Requests
• Java interface - Typica
36
37. Amazon EC2 – Elastic Compute Cloud
• Boot Amazon Machine Image (AMI) on
number of virtual instances
• Large number of preconfigured AMIs
• Linux and Windows
• Various machine types
• From 1.7GB RAM single-core to 15 GB
RAM and 20 cores
• Availability zones
• US & EU
37
38. Amazon EC2 – Elastic Compute Cloud
• Elastic Block Store – storage cache
• Price - $0.10/hour for 1.7 GB RAM, 1
core, 160 GB HD
• Java Interface – Typica
• Management – CLI, IntelliJ and
ElasicFox addon
• Custom images support – AMI
(proprietary format)
38
39. Working With Typica
• Open Connection
1 Jec2 ec2 = new Jec2(awsAccessKeyId, secretAccessKey);
• Describe Images
1 List<String> params = new ArrayList<String>();
2 List<ImageDescription> images = ec2.describeImages(params);
3 log.info(quot;Available Imagesquot;);
4 for (ImageDescription img : images) {
5 if (quot;availablequot;.equals(img.getImageState())) {
6 log.info(describeImageAsString());
7 }
8 }
• Launch Instances
1 LaunchConfiguration config = new LaunchConfiguration(imageDescription.getImageId());
2 config.setKeyName(keyName);
3 config.setInstanceType(InstanceType.DEFAULT);
4 config.setSecurityGroup(asList(quot;defaultquot;));
5 ReservationDescription reservationDescription = ec2.runInstances(config);
39
41. Amazon EC2 – Elastic Compute Cloud
• More to come:
• Load balancing
• Auto scaling
• Done already in Java by LifeGuard
• Cloud monitoring
• Management console
• The demo is on its way!
41
42. Compare!
Offline Load Custom
Name OS JAPI Web UI Price
Storage Balance Images
$0.10/hour for 1.7 GB
EC2 P P P RAM, 1 core, 160 GB
HD
as AEC2, free inbound
GoGrid P P P O traffic
$0.22/hour for 2.83GHz
AppNexus O O P P P server
£0.15/hour for 1.5GB
FlexiScale SOAP P P P P Ram, 1 Core
MS Azure O ? ? ? ?
42
43.
44. Google App Engine
• Allows to run customer’s application on
Google infrastructure
• Only Python is currently supported
• “Sandbox” version
• Other languages are on their way
• Free!
• 500 MB, 3 applications per user,
bandwidth and queries limits
• Costs afterwards
44
45. Compare!
Supported
Provider Name Price Comments
Languages
Google App Engine Python Free
Network.com Any $1/hour not anymore
Java BC, Python,
Caroline
Perl ? closed beta
$25/month/us
Force.com Apex CRM
er
MS Azure .NET ? closed beta
45
46. More To Come
• Yahoo Cloud Infrastructure
• Working on internal, thinking about
external
• Hadoop
• Dell Cloud Computing
• HP Adaptive Infrastructure as a
Service
46
47. Agenda
• Introduction – The Missing Link
• Solutions Overview
• Drawbacks
• Resources and Links
• Demo!
47
48.
49. Drawbacks
• Price
• Get a used desktop & put it under your
table
• Price predictability
• A lot of charges
• EC2 – 7 types of charges per server
• Security
• Your content is somewhere out there
49
50. Drawbacks
• Physical location
• You are in Israel, your customers are
in Israel, but they are served from US
• Another point of failure
• S3 Beta downtimes of hours on
February and July
• Not in your control
50
51. Drawbacks - Terms of Use
• Service termination
• Amazon – “for any reason”, “at any time”
& “for no reason” too
• Content screening and filtering
• Google – “pre-screen, review, flag, filter,
modify, refuse, or remove any or all
Content from the Service“
• Amazon – prohibit “discriminatory based
on race, sex, religion, nationality,
disability, sexual orientation, or age”
51
52. Agenda
• Introduction – The Missing Link
• Solutions Overview
• Drawbacks
• Resources and Links
• Demo!
52
53.
54. Resources &Links
• AlphaCSP –Your Java Experts!
• www.alphacsp.com
• This presentation
• www.javaedge.net
• The Cloud Portal
• http://cloudcomputing.qrimp.com
• Elastic Servers on Demand
• AMI Factory
• www.elasticserver.com
54
56. The Demo Resources &Links
• The demo blog
• javaedge2008-cloud-demo.blogspot.com
• Typica – Amazon WS Java API
• code.google.com/p/typica
• Lifeguard – Amazon EC2 Java pool
• code.google.com/p/lifeguard
• Programming Amazon Web Services Book
(published in March 2008)
• On Amazon.
56
57. Agenda
• Introduction – The Missing Link
• Solutions Overview
• Resources and links
• Demo!
57