Software Architecture in Practice Cloud Computing
Computer utilities Leonard Kleinrock, ARPANET, 1969: ”We will probably see the spread of computer utilities, which like electricity will service individual homes and offices.” ARPANET was the precursor to the internet Leonard with an Interface Message Processor, the first generation of routers CS@AU Henrik B Christensen
An example ViewCare tele medicine (www.viewcare.com) Video conference + measurement upload Device in home + Clinician computer at hospital Challenges in experiments Storing measurements Where? Ideal At regional hospital’s data centers But ”Not our data” No control CS@AU Henrik B Christensen
An example Bottomline But expensive for small company! ViewCare hosts their own data center Complete control Fast recovery in case of failure Customers see good support! Migration of formats etc. Can always later migrate to other formats/suppliers But expensive for small company! What if data center management is not a SMB’s lead competence? CS@AU Henrik B Christensen
Another problem How to you scale it properly? 1000 servers for 10 patients 1 server for 1000 patients? What happens in case of market success? Computation as a utility Electricity and water I pay per usage How many spare CPU cycles do you have at home? CS@AU Henrik B Christensen
Utilization problem Either you Waste hardware resources or Cannot provide service during peaks CS@AU Henrik B Christensen
Cloud Definitions CS@AU Henrik B Christensen
Ambrust et al. CS@AU Henrik B Christensen
Buyya et al. CS@AU Henrik B Christensen
Vaquero et al. Based up review of a lot of definitions: Clouds are a large pool of easily usable and accessible virtualized resources (such as hardware, development platforms and/or services). These resources can be dynamically re-configured to adjust to a variable load (scale), allowing also for an optimum resource utilization. This pool of resources is typically exploited by a pay-per-use model in which guarantees are offered by the Infrastructure Provider by means of customized SLAs. CS@AU Henrik B Christensen
Comparing? Similarities? Differences? Clouds are a large pool of easily usable and accessible virtualized resources (such as hardware, development platforms and/or services). These resources can be dynamically re-configured to adjust to a variable load (scale), allowing also for an optimum resource utilization. This pool of resources is typically exploited by a pay-per-use model in which guarantees are offered by the Infrastructure Provider by means of customized SLAs. CS@AU Henrik B Christensen
NIST characteristics Comparing CS@AU Henrik B Christensen
A key enabling technology: Virtualization CS@AU Henrik B Christensen
Henrik Bærbak Christensen Credits Some slides from E6998 - Virtual Machines Lecture 2 CPU Virtualization Scott Devine VMware, Inc. CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen What is it? vir•tu•al (adj): existing in essence or effect, though not in actual fact Example ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed! CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen A Physical Machine Hardware Processors, devices, memory, etc. Software Built to the given hardware (Instruction Set Architecture, e.g. x86) Built to given OS (App. Programming Interface, e.g. Win XP) OS controls hardware CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen A Virtual Machine Hardware Abstraction Virtual processor, memory, devices, etc. Virtualization Software Indirection: Decouple hardware and OS Multiplex physical hardware across guest VMs CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen Why VMs? Many advantages (often business related) Utilization of resources VM1 that idles automatically free resources to VM2 Of course not the case for physical machines Isolation Crash, virus, in VM1 does not propagate to VM2 Encapsulation A VM is a file: (OS,Apps,Data,Config, run-time state) Content distribution: Demos as snapshots Snapshot provides recovery point Migration to new physical machines by snapshot/restore In e.g. server farms CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen Why VMs? More advantages Maintenance costs Maintain 100 Linux-based web server machines versus a few big VM platforms Legacy VMs Run ancient apps (like DOS or SCUMM-based games) Create once, run anywhere No configuration issues E.g. complex setup of app suite of database, servers, etc. CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen Types of VMs Smith & Nair 2005 Two superclasses Process VM System VM Both can be subclassed based upon supporting virtualization of same or different ISA (Instruction Set Architecture). CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen Process / System VM CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen Process VM The process VM puts the virtualization border line at the process line. A application process/program executes in a Logical address space (assigned/handled by the OS) Using user-level instructions and registers (CPU user-mode) Only do IO using OS calls or High-Level Library(HHL) calls Thus a process VM becomes a virtual OS in which a process may execute. Example: Different ISA Process VM JavaVM defines its own ISA (stack-based) as well as normal OS operations CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen System VM The system VM sets the virtualization border at the system or hardware line A system/OS executes in a Physical memory space Using the full ISA of the underlying machine Interact directly with IO Thus a system VM becomes a virtual machine in which a system as a whole may execute Example: Same ISA System VM VMWare: Executes Guest OS that is running on the x86 ISA. CS @ AU Henrik Bærbak Christensen
Henrik Bærbak Christensen New Kid OS-Layer Virtualization Sahoo (2010) Ex: Docker CS@AU Henrik Bærbak Christensen
Henrik Bærbak Christensen Or… From Docker Traditional VVMs Docker CS@AU Henrik Bærbak Christensen
Classic Versus Hosted VMs VMWare Player (free) / Workstation Ordinary application in Linux/Windows Classic VMWare ESXi (free) Runs on the bare machine CS@AU Henrik B Christensen
Examples from my back yard Magnus wants to play Titan Quest On his new MSI Windows 10 gaming laptop Titan Quest does not run on Win10 Solution: Win XP SP3 installed on VMWare Player CS@AU Henrik B Christensen
More examples... Crunch3 machine was the production machine to do awesome stuff in another course I am running It runs on my local ESXI But, but – our students could not see it! Moved to the AUIT vSphere infrastructure VMWare converter… CS@AU Henrik B Christensen
Henrik Bærbak Christensen My ‘Private Cloud’ DAIMI Henrik Bærbak Christensen
Henrik Bærbak Christensen VMWare ESXi (Linux based) Minimal OS My ‘Rundo’ runs from the USB stick … and drivers were hell Download Mgt application from its web server DAIMI Henrik Bærbak Christensen
Henrik Bærbak Christensen A Small VMM Remote client to access the VMM DAIMI Henrik Bærbak Christensen
Henrik Bærbak Christensen A Much Bigger VVM DAIMI Henrik Bærbak Christensen
Henrik Bærbak Christensen A Large VVM CS@AU Henrik Bærbak Christensen
Characteristics CS@AU Henrik B Christensen
Operations CS@AU Henrik B Christensen
Service Models SaaS: Software as a service PaaS: Platform as a service End user applications accessible in the cloud, typically through web browsers Exercise: Give examples PaaS: Platform as a service Programming libraries, services, tools allowing applications to be build utilizing cloud features Exercise: Give examples SaaS: Gmail, google maps, google docs, .... PaaS: Google App Engine CS@AU Henrik B Christensen
Service Models IaaS: Infrastructure as a Service Provide virtual processing and storage capacity, i.e. the actual computing infrastructure Exercise: Give examples IaaS: Amazon EC2 CS@AU Henrik B Christensen
Comparing Why are some cloud service models much easier to spot than others? Because PaaS is hidden from us users? Was this web site made using App Engine? CS@AU Henrik B Christensen
Example: NetFlix Adrian Cockcroft / GOTO 2012 CS@AU http://gotocon.com/dl/goto-aar-2012/slides/AdrianCockcroft_GloballyDistributedCloudApplicationsAtNetflix.pdf CS@AU Henrik B Christensen
Deployment models NetFlix also moves more and more to EC2 CS@AU Henrik B Christensen
Obstacles/Opportunities Armbrust et al. Business Continuity and Service Availability If your cloud provider fails – you fail Data Lock-in Storage using propriatary API (Amazon S3 etc.) makes ‘getting your data back’ hard Data Confidentiality/Auditability Who peeks into my data? Data Transfer Bottlenecks Sending data is costly. Shipping disks are cheaper! CS@AU Henrik B Christensen
Obstacles/Opportunities Ambrust et al. Performance Unpredictability Multiple VMs (one the same physical machine) can limit IO – i.e. cross-VM penalties Scaleable Storage Storage is not as easily scaled as other resources ? Is this an issue of yesterday? Bugs in Large Scale Dist. Systems How do you debug? NetFlix: Monkeys and Gorillas CS@AU Henrik B Christensen
Obstacles/Opportunities Ambrust et al. Scaling Quickly What to do with idling machines? Shutting down means longer time to start... Reputation Fate Sharing Spamming -> black listed IP addresses. Will you overtake these? Software Licensing Pay as you go licenses for commercial SW CS@AU Henrik B Christensen
Experiences from CLC Bio EC2 virtualization makes storage behave rather unfamiliar... CS@AU Henrik B Christensen
Summary I think it is here to stay I have started to use it a lot Unfortunate, but… Much faster to deploy stuff at DigitalOcean than at AUIT But much more expensive, and staff is not readily around to ask… CS@AU Henrik B Christensen