SlideShare a Scribd company logo
Cloud Computing with .Net
CodeMash 2009
Wes Faler
Cloud Computing

• Just what is “Cloud Computing”?
  – Is it difficult to get started with the Cloud?


• Short answers:
  – Computing resources on demand.

  – It’s easier than you think and you likely
    already know how and just don’t know it.
Example Cloud Architecture?




                               Worker
Client




              Controller       Worker



Client



                               Worker
Typical Cloud Architecture!




                                Web
Browser
                                Server




                 Load
                                Web

                 Balancer       Server

Browser



           Congratulations!     Web

                                Server
Client                 Master
          Essential

           Parts

            Of a

         Distributed
Queue                  Workers
         Application
Amazon EC2 Sample Application

• The problem:
  – Use ZabaSearch.com to search public
    records, obtaining alternate addresses
    for a person.
  – They won’t take a data file with
    thousands of records and do batch
    processing, but did ok as many searches
    as we can do using their web site.
  – I’m too cheap to pay a hundred people to
    point and click on a website, and doing it
    with just one is far too slow.
Amazon EC2 Sample App




                   Master
                                                       Client
                (Web Service)       Job
Jobs &                                           Windows service
                  -Get Jobs       Bundles
Results                                        calls Master interface
               - Report Results
                                               then uses Core logic
                -Worker Mgmt




     • We know all these technologies.
     • It’s only the technique we really need to study.
Amazon EC2 Sample App

• The Solution:
  – A core module able to POST to ZabaSearch
    and scrape data from its HTML.
  – A database as the queue of names/addresses
    to check and to hold the results.
  – A master web service giving out blocks of
    name/address jobs
  – A worker service getting jobs and using the
    core module
  – A local computer running the worker service
  – Any number of Amazon EC2 computers
    running the worker service
• Tada! It’s Cloud Ready!
Database Schema and Job States

                    •   Jobs start in “ToDo” status
                    •   When a worker requests a bundle,
                        jobs are set to “InProgress”, get an
                        expiration time, and get flagged
                        with the worker’s GUID.
                    •   Jobs not done by the expiration
                        time are reset back to “ToDo” and
                        their worker ID cleared.
                    •   When workers report results,
                        results are only recorded if the job
                        is still “InProgress” and still
                        assigned to the worker. Such jobs
                        get set to “Done”.
                    •   As a courtesy, workers can report
                        that they are abandoning work,
                        which just sets anything
                        “InProgress” assigned to them
                        back to “ToDo” with a cleared
                        worker ID.
Amazon EC2 Sample App

Code Demo
• ZabaSearch Core
• Master Web Service
• Client Interface
• Client Service Threading
Amazon EC2 Sample App

Getting It Into The Cloud

• Signup, Keys, Security, Security, Security,
  and Some More Security.

• Elastifox
  – Public AMIs
  – Instances
     • Start, Stop, Reboot
     • Destroy
  – Bundles
  – Private AMIs
Web

                         Servers
            DB                          Process
          Servers                        Flow



                    Things in a Cloud

                       All using:
Virtual
                        Storage
 PCs

                        Security
Cloud Hierarchy




Michael Sheehan on Jun 24th, 2008
“The Cloud Pyramid”
Cloud Computing with .Net
In the Cloud, you can…

• Rent
  –   Web servers
  –   Load balancers
  –   Database servers
  –   Storage space
  –   Logic
       • Application
       • Queue Management/Flow
• Vary
  – Number of each rented item
  – Location of each rented item
Types of Distributed Apps




                Farm

                                  Cluster

                  All Can Be In

  Shared PC            A Cloud


                                        Grid
Virtual PC      Farm         Cluster       Grid       Cloud

                                                       0 to Mini-   Pay as you
   Cash        Up front      Up front      Up front
                                                       Cluster      grow

                                                                    On
Availability   Dedicated Dedicated Dedicated Statistical
                                                                    Demand

Redundancy     None          Good          Good        Good         Varies


                                           General but General but
Computing      General       Specialized                           Varies
                                           Custom      Custom
Low Hanging Fruit

• What could you do with a virtual
  computer in the cloud?
  – It’s sharable
  – You control the configuration
  – Not just rebootable, reformatted-and-
    reinstalled with a click
  – Discardable
  – Cheap
  – No waiting
Low Hanging Fruit

• Install incremental releases onto a cloud
  virtual PC
  –   Control the demo environment
  –   Fully validate before release
  –   Restore to initial release easily
  –   Archivable
  –   Remove the client’s configuration from
      each release’s issue list
Low Hanging Fruit

• Training Applications on cloud virtual
  PCs
  – Create one master image and clone on
    demand
  – Trainees only need remote desktop
    access
  – Easily reset for those adventurous
    students
Low Hanging Fruit

• A Spare Development PC – Per
  Developer!
  – Unit tests, esp. CPU intensive ones
  – Can start with standard, easily reset, test
    data
  – Installer testing without breaking your
    development environment
  – Ease handoffs to QA dept
  – Experiment with time-limited trial
    libraries without the time limit
Queuing!
   We finally have to take it seriously.
   (My simulation prof would be so happy!)

             Latency
             Activation
             Flow Control
Queuing: Latency

Consider:
• 100 requests, each taking 3 seconds on a
  high end server when done sequentially.
• How long does the 1st request take?
  – 3 seconds. Users love us!
• How long does the 100th request take?
  – 300 seconds. Users hate us. Work every
    weekend until this is fixed.
• 300 seconds? Don’t measure just
  “Performance”, measure “Latency”.
• Which do you test most often?
Queuing: Latency

Consider:
• 100 requests, each taking 3+1 seconds on
  20 medium virtual servers in a cloud.
• How long does the 1st request take?
  – 3+1 seconds. Users still love us!
• How long does the 100th request take?
  – 20 seconds. Is this ok?
• Classical “Performance” dropped, but
  “Latency” improved drastically. Which
  actually drives satisfaction more?
Queuing: Latency

Best Case Latency = Time/Item
Worst Case Latency = Time/Item * # of items /
  # of servers
Average Latency = Time/Item * (# of items / #
  of servers) / 2

Clouds likely raise Time/Item slightly but can
  raise the number of servers drastically.
Order the number of servers that will meet
  your latency needs.
Speed up your code! Time/Item still matters.
Queuing

• Activation
  – What gets activated when an item moves
    within the queue?
  – Push vs. Pull?


• Flow Control
  – Are all jobs equal?
  – Are all processes equal?


• What are users doing while they wait for
  queued items to finish?
Your life will be easier if you…

• Separate your core logic from your cloud
  communications logic
• Put core logic into its own assembly
• Objects-In, Objects-Out in your core
• Use unit tests for your core
• Use an interactive testing tool to debug your core logic
   – Remember it’ll be much harder to debug once in the
     cloud!
• Consider network connectivity problems when coding
  recovery logic
   – Balance reassignment with forgiveness
• Design for some local processing
Costs

• Data sent into the cloud, even if your cloud software
  requested the data.
• Data sent out of the cloud, even if your cloud software
  sent the data.
• Data sent within the cloud isn’t typically charged for.
• Time your machine instances exist – even if “off”.
• CPU time actually used.
• RAM available.
• Time and size of storage, including uninstantiated
  machine instances.

• Amazon EC2 costs me about $20/month and would be
  about $100/month for a 24x7 medium power virtual
  machine.
• Transfer large lumps, such as databases, once and
  keep them in the cloud. It’s faster and cheaper.
Cloud Computing

• Just what is “Cloud Computing”?

• Short answer: Computing resources on
  demand.

• Real answer: Architecture Freedom!
Wes Faler
wes.faler@gmail.com

More Related Content

What's hot (13)

PDF
Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)
Wooga
 
PDF
Cmg06 utilization is useless
Adrian Cockcroft
 
PDF
Intuit CTOF 2011 - Netflix for Mobile in the Cloud
Sid Anand
 
PPTX
Move to azure
feature[23]
 
PPT
Cloud & Native Cloud for Managers
Eitan Sela
 
PDF
Global Netflix - HPTS Workshop - Scaling Cassandra benchmark to over 1M write...
Adrian Cockcroft
 
PDF
10 things ever architect should know about the Windows Azure Platform - ericnel
Eric Nelson
 
PDF
Netflix in the Cloud
Adrian Cockcroft
 
PPT
All change! How the new Economics of Cloud will make you think differently ab...
JAXLondon_Conference
 
PDF
Doing Less for Fun and Profit (by switching to the cloud)
Luke Chavers
 
PPTX
IaaS azure_vs_amazon
Udaiappa Ramachandran
 
PPTX
Gluecon 2013 - Netflix Cloud Native Tutorial Details (part 2)
Adrian Cockcroft
 
PDF
Azure Serverless Toolbox
Johan Eriksson
 
Architecture Evolution at Wooga (AWS Cloud Computing for Developers,)
Wooga
 
Cmg06 utilization is useless
Adrian Cockcroft
 
Intuit CTOF 2011 - Netflix for Mobile in the Cloud
Sid Anand
 
Move to azure
feature[23]
 
Cloud & Native Cloud for Managers
Eitan Sela
 
Global Netflix - HPTS Workshop - Scaling Cassandra benchmark to over 1M write...
Adrian Cockcroft
 
10 things ever architect should know about the Windows Azure Platform - ericnel
Eric Nelson
 
Netflix in the Cloud
Adrian Cockcroft
 
All change! How the new Economics of Cloud will make you think differently ab...
JAXLondon_Conference
 
Doing Less for Fun and Profit (by switching to the cloud)
Luke Chavers
 
IaaS azure_vs_amazon
Udaiappa Ramachandran
 
Gluecon 2013 - Netflix Cloud Native Tutorial Details (part 2)
Adrian Cockcroft
 
Azure Serverless Toolbox
Johan Eriksson
 

Similar to Cloud Computing with .Net (20)

PDF
Oracle in the Cloud
zain1425
 
PDF
Art of Using Xen at Scale
The Linux Foundation
 
PDF
PaaS with Java
Eberhard Wolff
 
PPTX
Azure JumpStart
Rateb Abu Hawieleh
 
PDF
DataTalks.Club - Building Scalable End-to-End Deep Learning Pipelines in the ...
Rustem Feyzkhanov
 
PPTX
Developing in the Cloud
Ryan Cuprak
 
PDF
Windows Azure introduction
Microsoft Iceland
 
PDF
Cloud Architecture Tutorial - Running in the Cloud (3of3)
Adrian Cockcroft
 
PPTX
IEEE Cloud 2012: Clouds Hands-On Tutorial
Srinath Perera
 
PPTX
Serverless Computing Model
Mohamed Samir
 
PPTX
Cloud computing
Rohith Shankar
 
PDF
Cloudy in Indonesia: Java and Cloud
Eberhard Wolff
 
PPTX
AWS Serverless patterns & best-practices in AWS
Dima Pasko
 
PDF
A scalable server environment for your applications
GigaSpaces
 
PPTX
Machine Learning inference at the Edge
Julien SIMON
 
PDF
John adams talk cloudy
John Adams
 
PPTX
Jumpstart Azure
Brian Blanchard
 
PDF
Cloud Computing 101
Rajagopal Nagarajan
 
PPTX
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Andrew Miller
 
Oracle in the Cloud
zain1425
 
Art of Using Xen at Scale
The Linux Foundation
 
PaaS with Java
Eberhard Wolff
 
Azure JumpStart
Rateb Abu Hawieleh
 
DataTalks.Club - Building Scalable End-to-End Deep Learning Pipelines in the ...
Rustem Feyzkhanov
 
Developing in the Cloud
Ryan Cuprak
 
Windows Azure introduction
Microsoft Iceland
 
Cloud Architecture Tutorial - Running in the Cloud (3of3)
Adrian Cockcroft
 
IEEE Cloud 2012: Clouds Hands-On Tutorial
Srinath Perera
 
Serverless Computing Model
Mohamed Samir
 
Cloud computing
Rohith Shankar
 
Cloudy in Indonesia: Java and Cloud
Eberhard Wolff
 
AWS Serverless patterns & best-practices in AWS
Dima Pasko
 
A scalable server environment for your applications
GigaSpaces
 
Machine Learning inference at the Edge
Julien SIMON
 
John adams talk cloudy
John Adams
 
Jumpstart Azure
Brian Blanchard
 
Cloud Computing 101
Rajagopal Nagarajan
 
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Andrew Miller
 
Ad

Recently uploaded (20)

PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Novus Safe Lite- What is Novus Safe Lite.pdf
Novus Hi-Tech
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Upgrading to z_OS V2R4 Part 01 of 02.pdf
Flavio787771
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Sustainable and comertially viable mining process.pdf
Avijit Kumar Roy
 
Ad

Cloud Computing with .Net

  • 1. Cloud Computing with .Net CodeMash 2009 Wes Faler
  • 2. Cloud Computing • Just what is “Cloud Computing”? – Is it difficult to get started with the Cloud? • Short answers: – Computing resources on demand. – It’s easier than you think and you likely already know how and just don’t know it.
  • 3. Example Cloud Architecture? Worker Client Controller Worker Client Worker
  • 4. Typical Cloud Architecture! Web Browser Server Load Web Balancer Server Browser Congratulations! Web Server
  • 5. Client Master Essential Parts Of a Distributed Queue Workers Application
  • 6. Amazon EC2 Sample Application • The problem: – Use ZabaSearch.com to search public records, obtaining alternate addresses for a person. – They won’t take a data file with thousands of records and do batch processing, but did ok as many searches as we can do using their web site. – I’m too cheap to pay a hundred people to point and click on a website, and doing it with just one is far too slow.
  • 7. Amazon EC2 Sample App Master Client (Web Service) Job Jobs & Windows service -Get Jobs Bundles Results calls Master interface - Report Results then uses Core logic -Worker Mgmt • We know all these technologies. • It’s only the technique we really need to study.
  • 8. Amazon EC2 Sample App • The Solution: – A core module able to POST to ZabaSearch and scrape data from its HTML. – A database as the queue of names/addresses to check and to hold the results. – A master web service giving out blocks of name/address jobs – A worker service getting jobs and using the core module – A local computer running the worker service – Any number of Amazon EC2 computers running the worker service • Tada! It’s Cloud Ready!
  • 9. Database Schema and Job States • Jobs start in “ToDo” status • When a worker requests a bundle, jobs are set to “InProgress”, get an expiration time, and get flagged with the worker’s GUID. • Jobs not done by the expiration time are reset back to “ToDo” and their worker ID cleared. • When workers report results, results are only recorded if the job is still “InProgress” and still assigned to the worker. Such jobs get set to “Done”. • As a courtesy, workers can report that they are abandoning work, which just sets anything “InProgress” assigned to them back to “ToDo” with a cleared worker ID.
  • 10. Amazon EC2 Sample App Code Demo • ZabaSearch Core • Master Web Service • Client Interface • Client Service Threading
  • 11. Amazon EC2 Sample App Getting It Into The Cloud • Signup, Keys, Security, Security, Security, and Some More Security. • Elastifox – Public AMIs – Instances • Start, Stop, Reboot • Destroy – Bundles – Private AMIs
  • 12. Web Servers DB Process Servers Flow Things in a Cloud All using: Virtual Storage PCs Security
  • 13. Cloud Hierarchy Michael Sheehan on Jun 24th, 2008 “The Cloud Pyramid”
  • 15. In the Cloud, you can… • Rent – Web servers – Load balancers – Database servers – Storage space – Logic • Application • Queue Management/Flow • Vary – Number of each rented item – Location of each rented item
  • 16. Types of Distributed Apps Farm Cluster All Can Be In Shared PC A Cloud Grid
  • 17. Virtual PC Farm Cluster Grid Cloud 0 to Mini- Pay as you Cash Up front Up front Up front Cluster grow On Availability Dedicated Dedicated Dedicated Statistical Demand Redundancy None Good Good Good Varies General but General but Computing General Specialized Varies Custom Custom
  • 18. Low Hanging Fruit • What could you do with a virtual computer in the cloud? – It’s sharable – You control the configuration – Not just rebootable, reformatted-and- reinstalled with a click – Discardable – Cheap – No waiting
  • 19. Low Hanging Fruit • Install incremental releases onto a cloud virtual PC – Control the demo environment – Fully validate before release – Restore to initial release easily – Archivable – Remove the client’s configuration from each release’s issue list
  • 20. Low Hanging Fruit • Training Applications on cloud virtual PCs – Create one master image and clone on demand – Trainees only need remote desktop access – Easily reset for those adventurous students
  • 21. Low Hanging Fruit • A Spare Development PC – Per Developer! – Unit tests, esp. CPU intensive ones – Can start with standard, easily reset, test data – Installer testing without breaking your development environment – Ease handoffs to QA dept – Experiment with time-limited trial libraries without the time limit
  • 22. Queuing! We finally have to take it seriously. (My simulation prof would be so happy!) Latency Activation Flow Control
  • 23. Queuing: Latency Consider: • 100 requests, each taking 3 seconds on a high end server when done sequentially. • How long does the 1st request take? – 3 seconds. Users love us! • How long does the 100th request take? – 300 seconds. Users hate us. Work every weekend until this is fixed. • 300 seconds? Don’t measure just “Performance”, measure “Latency”. • Which do you test most often?
  • 24. Queuing: Latency Consider: • 100 requests, each taking 3+1 seconds on 20 medium virtual servers in a cloud. • How long does the 1st request take? – 3+1 seconds. Users still love us! • How long does the 100th request take? – 20 seconds. Is this ok? • Classical “Performance” dropped, but “Latency” improved drastically. Which actually drives satisfaction more?
  • 25. Queuing: Latency Best Case Latency = Time/Item Worst Case Latency = Time/Item * # of items / # of servers Average Latency = Time/Item * (# of items / # of servers) / 2 Clouds likely raise Time/Item slightly but can raise the number of servers drastically. Order the number of servers that will meet your latency needs. Speed up your code! Time/Item still matters.
  • 26. Queuing • Activation – What gets activated when an item moves within the queue? – Push vs. Pull? • Flow Control – Are all jobs equal? – Are all processes equal? • What are users doing while they wait for queued items to finish?
  • 27. Your life will be easier if you… • Separate your core logic from your cloud communications logic • Put core logic into its own assembly • Objects-In, Objects-Out in your core • Use unit tests for your core • Use an interactive testing tool to debug your core logic – Remember it’ll be much harder to debug once in the cloud! • Consider network connectivity problems when coding recovery logic – Balance reassignment with forgiveness • Design for some local processing
  • 28. Costs • Data sent into the cloud, even if your cloud software requested the data. • Data sent out of the cloud, even if your cloud software sent the data. • Data sent within the cloud isn’t typically charged for. • Time your machine instances exist – even if “off”. • CPU time actually used. • RAM available. • Time and size of storage, including uninstantiated machine instances. • Amazon EC2 costs me about $20/month and would be about $100/month for a 24x7 medium power virtual machine. • Transfer large lumps, such as databases, once and keep them in the cloud. It’s faster and cheaper.
  • 29. Cloud Computing • Just what is “Cloud Computing”? • Short answer: Computing resources on demand. • Real answer: Architecture Freedom!