<<

CSF643 – Cloud Computing 雲端計算

Cloud Computing – A System View

吳俊興 國立高雄大學 資訊工程學系 2017 Outline

• Dissecting Cloud Computing – Development of distributed systems – Inside a cloud • Server/Datacenter View – Technologies – Case studies • Client/Terminal View –IoT – Hardware – Software • Summary

2 What is Cloud Computing?

A new computing paradigm? 3 Inside Clouds

• Computing Devices –Servers – Desktop and laptop PCs – Handheld devices – Smart phones • Communication Links – Wired / wireless – Narrowband / broadband – LAN / WAN

Yet Another Kind of Distributed Systems? 4 Distributed Systems • Motivation: Networks of computers are everywhere! – Mobile phone networks – Corporate networks – Factory networks – Campus networks – Home networks – In-car networks – Planetary networks Desire to Why networked? share resources • Influence: Networked computers impact system designers and implementers

5 Defining Distributed Systems

• “A system in which hardware or software components located at networked computers communicate and coordinate their actions only by message passing.” [Coulouris] – Networked computers could be far apart or in the same room • relying on computer networking • i.e. cluster and grid • “A distributed system is a collection of independent computers that appear to the users of the system as a single computer.” [Tanenbaum]

6 Architecture Models of Distributed Systems

1980~ 1990~ 2000~ Terminal-Mainframe Client-Server Peer-to-Peer (Super-computing) (Micro-computing (Macro-computing) /Personal Computer)

RS-232 Dialup/10M Ethernet ADSL/100M+ Ethernet

VT100/DOS Windows 31/95 Linux/Windows XP 7 Emerging 2010~ Model Cloud Computing

10GbE/4G/WiGig

Android/iOS/WP 8 Client-server Model

Clients and servers each with distinct roles Request Clients Server U11 Service U12 S U13

U21 The server and the network U22 become the bottlenecks and points of failure

U31 U32 •DDoS

•Flash Crowd 9 Peer-to-peer Model

“Peer-to-Peer (P2P) is a way of structuring distributed applications such that the individual nodes have symmetric roles. Rather than being divided into clients and servers each with quite distinct roles, in P2P applications a node may act as both a client and a server.” Excerpt from the Charter of Peer-to-Peer Research Group, IETF/IRTF, June 24, 2003 http://www.irtf.org/charters/p2prg.html

Peers play similar roles No distinction of responsibilities

10 Search Trends

Cluster computing, Grid computing, Cloud computing, Big data Web Services -> service/utility computing -> cloud computing

11 Cloud Computing Model

“Cloud computing is Web-based processing, whereby shared resources, software, and information are provided to computers and other devices (such as smartphones) on demand over the Internet… ” Excerpt from Wikipedia

Hybrid of terminal-mainframe, client-server, and peer-to-peer involving over-the-Internet provision of dynamically scalable and often virtualized resources

12 Cloud Computing Model

13 Five Layers of Cloud Stack

(Smart devices) Client Browse the Web Service Application/Software Deliver software as a service over the Internet Needn’t install & run applications on its own computers SaaS •Microsoft Office/Livemesh Platform Deliver a computing platform and/or solution stack as a service PaaS •Google’s AppEngine Virtualization Infrastructure Deliver computer equipments (i.e. virtual machines, storages, networks) as a service over the Internet IaaS •Amazon Web Service (EC2, S3)

(Datacenters) HardwareServer Software Donate/lend your hardware resources

Warning: Layers not clearly defined yet! 14 What(’s new) in Today’s Clouds?

Three major features: 1. On-demand Access: Pay-as-you-go, no upfront commitment – Anyone can access it (e.g., Washington Post – Hillary Clinton example) 2. Data-intensive Nature: What was MBs has now become TBs – Daily logs, forensics, Web data, etc. – Do you know the size of Wikipedia dump? 3. New Cloud Programming Paradigms: MapReduce/Hadoop, Pig Latin, DryadLinq, Swift, and many others – High in accessibility and ease of programmability

Combination of one or more of these gives rise to novel and unsolved distributed computing problems in cloud computing

15 Technologies of Cloud Computing

Intelligent interface Client Smart devices Ubiquitous connection Service Application/Software SaaS On-demand Access Data-intensive Nature Platform New Cloud Programming Paradigms PaaS Virtualization Infrastructure Virtual Machines High-throughput Communication IaaS

Datacenters of Containers HardwareServer Software Servers of Commodity PCs 10Gb+ Networking 16 Outline

• Dissecting Cloud Computing – Development of distributed systems – Inside a cloud • Server/Datacenter View – Technologies – Case studies • Client/Terminal View –IoT – Hardware – Software • Summary

17 A Sample Cloud Topology

So then, what is a cluster? Core Switch

Top of the Rack Switch

Rack

Servers

18 Container as Building Block

• Data Center Module – Contains network gear, compute, storage, & cooling – Just plug in power, network, & chilled water • Increased cooling efficiency – Variable water & air flow – Better air flow management (higher delta-T) – 80% air handling power reductions (Rackable Systems) • Bring your own data center shell – Just central networking, power, cooling, & admin center – Grow beyond existing facilities – Can be stacked 3 to 5 high – Less regulatory issues (e.g. no building permit) – Avoids (for now) building floor space taxes • Meet seasonal load requirements • Single customs clearance on import • Single FCC compliance certification

19 Larger Unit of Data Center Growth

• One at a time: – 1 system – Racking & networking: 14 hrs ($1,330) • Rack at a time: – ~40 systems – Install & networking: .75 hrs ($60) • Container at a time: – ~1,000 systems – No packaging to remove – No floor space required – Power, network, & cooling only • Weatherproof & easy to transport • Data center construction takes 24+ months – Both new build & DC expansion require regulatory approval

20 Scale of Industry Datacenters

• Microsoft [NYTimes, 2008] – 150,000 machines – Growth rate of 10,000 per month – Largest datacenter: 48,000 machines – 80,000 total running Bing • Yahoo! [Hadoop Summit, 2009] – 25,000 machines – Split into clusters of 4000 • AWS EC2 (Oct 2009) – 40,000 machines – 8 cores/machine • Google – (Rumored) several hundreds of thousands of machines

21 Virtualization

• A virtual machine is a software implementation of a machine (computer) that executes instructions like a physical machine – It provides an interface identical to the underlying bare hardware – Para-virtualization: presents a software interface to VM that is similar but not identical to that of the underlying hardware – Emulator: provides an emulation of the functions of one system using a different system • Two major categories – System virtual machine: providing a complete system platform which supports the execution of a complete (OS) • VMWare, Vitual PC, VirtualBox, Xen – Process virtual machine: designed to run a single program, which means that it supports a single process • Jave VM, Microsoft’s .NET Common Language Infrastructure VM

22 VMware Architecture

23 The Java Virtual Machine

24 Google’s Key Patent on Cloud Computing

US2008/0262828 “Encoding and Adaptive Scalable Accessing of Distributed Models” “Systems, methods, and apparatus for accessing distributed models in automated machine processing, including using large language models in machine translation, speech recognition and other applications.” • filed in February 2006 • 91 claims

25 System Example

Machine processing using machines such as computers to perform processing tasks such as machine translation

FIG. 12 An example of a distributed FIG. 13 An example computer processing system that can be system in a communication network configured to provide a language that provides distributed processing processing function based on a large language model 26 Americas Asia Berkeley County, South Carolina Google Changhua County, Taiwan Council Bluffs, Iowa Singapore Douglas County, Georgia Data Centers Europe Quilicura, Chile Hamina, Finland Jackson County, Alabama St Ghislain, Belgium Mayes County, Oklahoma Dublin, Ireland Lenoir, North Carolina Eemshaven, Netherlands The Dalles, Oregon

• 36 data centers / 500 IPs? http://www.google.com/about/datacenters/ • Continuous evolution: 7 significant revisions in last 10 years • An ordinary search query involves 700 to 1,000 servers 27 Inside a Google Data Center

• A small data center consists of a minimum of 2,400 servers – racks of 80 servers tied together with 10Gb Ethernet or other high- speed network fabrics – 30 or more of these racks are deployed into a single cluster • Each of these servers has 16GBs of RAM with fast 2TB (Terabyte) hard drives – A patent on a power supply that integrates a battery, allowing it to function as an uninterruptible power supply (UPS) – Google-optimized Ubuntu Linux YouTube - Google container data center tour (2009.4.7) 28 Google’s In-House Software

• Google : A scalable distributed file system for large distributed data-intensive applications – It provides fault tolerance while running on inexpensive commodity hardware, and it delivers high aggregate performance to a large number of clients • : A distributed storage system for managing structured data that is designed to scale to a very large size: petabytes of data across thousands of commodity servers – Many projects at data in Bigtable, including web indexing, , and (GWS) and Google Front End (GFE): Customized version of Apache that Google uses to host its sites – GFE is the server found on sites at blogspot.com, according to the Netcraft Web Server Survey, while Google uses GWS (Google Web Server) on some other services, including its image search • MapReduce: A programming model and system for processing and generating large data sets – MapReduce programs are automatically parallelized and executed on a large cluster of commodity machines 29 Cloud System Architectures

30 Storage Systems • Single disk on a single host • Multiple disks on a single host –RAID • Multiple disks on multiple hosts (LAN) – NAS / SAN (storage arrays) • Distributed scenario: Enable programs to store and access remote exactly as they do local ones – Web servers – P2P file sharing – Distributed storage systems • Distributed file systems • Distributed object systems 31 Storage Area Networks

• Multiple hosts attached to multiple storage arrays - flexible

32 Distributed Storage Systems

1st generation DFS Client-server model NFS, CIFS, AFS, …

2nd generation DFS Cluster of servers ZebraFS, xFS, …

3rd generation DFS P2P CFS, Ivy, BT, …

4th generation DFS GFS, HDFS, …

33 Google File System (GFS)

34 Hadoop Distributed File System (HDFS)

35 Outline

• Dissecting Cloud Computing – Development of distributed systems – Inside a cloud • Server/Datacenter View – Technologies – Case studies • Client/Terminal View –IoT – Hardware – Software • Summary

36 Ubiquitous Devices

Handheld UMPC Tablet

Mobile Phone 3C Notebook Computer 電腦 Smart Phone Communication 通訊 Desktop eBook Consumer Electronics 消費性電子 Server

SetTopBox GameConsole Surveillance

37 Wearable Computing

38 Smart Home

39 Un-Manned Vehicles (UMV) Unmanned Aerial Vehicle (UAV, 60,000 - 90,000 ft.)

Google-owned Titan’s Solara-50 Facebook Self-driving Car

Dashboard / Head Unit / Car-Area Network 40 Internet of Things (IoT) • The network of physical objects or “things” – Embedded with electronics, software, sensors, and connectivity • Related terms: Internet Appliance, Embedded Systems, Ubiquitous/Pervasive Computing, Sensor Networks, … – Being able to collect and exchange data via Internet • Things-generated data v.s. Human-generated data • The term “Internet of Things” coined by British entrepreneur Kevin Ashton in 1999 Anything IoT Digitalized 5G Anytime 50 50 Anywhere

Connected 41 IoT – Wiki Definition

• Wiki: interconnection of uniquely identifiable embedded computing devices within the existing Internet infrastructure – ‘Things’-oriented rather than computer-oriented – Internet-based • Uniquely identifiable • Always v.s. On-demand connected • Intelligent/Smart devices (Automatically manageable)

42

Cloud Computing Big Data IoT Internet of Things Artificial Intelligence

2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016

https://www.google.com/trends/ Trending Stories rely on technology from the Knowledge Graph across , , and YouTube to detect when topics are trending on these three platforms 43 IoT Visions • UN (2005): “A new era of ubiquity is coming where humans may become the minority as generators and receivers of traffic and changes brought about by the Internet will be dwarfed by those prompted by the networking of everyday objects” • ITU: ‘‘From anytime, anyplace connectivity for anyone, we will now have connectivity for anything” • EU: ‘‘Things having identities and virtual personalities operating in smart spaces using intelligent interfaces to connect and communicate within social, environmental, and user contexts” • US National Intelligence Council: ‘‘By 2025 Internet nodes may reside in everyday things – food packages, furniture, paper documents, and more”

Anything Digitalized SoC-Inside Anytime / Anywhere Connected Internet-Outside

44 About Internet of Things

• Intel’s Video (2014/3/12) What Does The Internet of Things Mean? https://www.youtube.com/watch?v=Q3ur8wzzhBU

• Universidad de Deusto (2011/8/19, Espain) Internet of Things https://www.youtube.com/watch?v=Cpbbrpgwu2I

45 IoT: Transport Big Data of Small Things under Cloud

Cloud / Big Data

Client Service Application/Software SaaS Platform PaaS Virtualization Infrastructure IaaS

Hardware Software Server

46 IoT Architecture

Application Merchandise Environment Intelligent Tele- Intelligent Smart Layer Tracking Protection Search medicine Traffic Home

Cloud Computing Platform

Network The Information Layer Mobile Internet Network Telecom Network

RFID Sensor Network GPS

Sensing Layer RFID Label Sensor Nodes Road Mapper

47 Applications IoT Applications

Smart Cities Smart Farming

Smart Grid Industrial Control

Smart Environment Smart Logistics

Smart Water Smart Retail

Safety and Security Customer Service

eHealthcare Smart Homes

2 7 48 World of Internet – Edge Views

User- centric data

Internet Software- Access Defined Networks Things- Networks centric data Sensors / Sensor Actuators Networks

Device-to-Device Things

49 Elements of an IoT-Enabled Object SoC Memory Unit Power

RAM ROM • Solar / Wired / Contactless • Battery • Charging CPU (User) Input I/O Output Devices Devices Devices BigData

(Storage) Cloud Sensors Networking Actuators

•Analog/Digital Signal v.s. IP Packet •Things-generated Data v.s. Thing (Physical Object) Human-generated Data •D2D/M2M Communication •Identification •Layer 2 / 3 / 5 50 What to Be Equipped

Output User Machine Speaker / Display / Input Vibrator Actuators Printer User Keyboard / Mouse / Computer Internet Appliance Touchpad / Microphone / Scanner / Camera Machine Embedded Devices + Sensors Cloud Computing Internet = IoT

Computing → Storage → Networking → Sensing and Acting User-data → Machine data (Sensed data from devices / Control data to device)

51 How to Connect

• No – standalone • Communication with analog signals • Communication with digital signals (Layer 1 or Layer 2) • Communication with Internet packets (Layer 3)

52 WLAN and WPAN (Layer 1 and Layer 2)

• Short-range point-to-point communications – IrDA (Infrared Data) – RFID (Radio-Frequency Identification) – NFC (Near Field Communication) – based on RFID – Wireless USB – DSRC (Dedicated Short Range Communication) • Wireless sensor networks / WPAN (802.15) – 802.15.1 - BlueTooth – 802.15.4 (Low Rate) - ZigBee – 802.15.3 (High Rate / Ultra-Wide Band) • WirelessHD / Intel WirelessDisplay (WiDi) – 802.15.5 (Mesh Networking / Ad Hoc) – 802.15.6 (Body Area Networks) – 802.15.7 (Visible Light Communication) • WLAN (802.11) – WiFi / WiGig (802.11) 53 Internet of Computers and Internet of Things

Application Layer CoAP: 4+

TCP: 20 UDP: 1 UDP: 8 Transport Layer +1 IPv4: 20 Network Layer 6LoWPAN: 2 IPv6: 40 MAC: 5 Ethernet: 26 Link Layer Ethernet(802.3) ZigBee(802.15.4) Physical Layer PHY: 6 • Full Internet device • Limited Internet device • High performance • Low rate Preamble Dest. Source Proto Payload CRC Address Address Type 8 6 6 2 46 – 1500 4

1 + 127 Bytes (max) 54 Wireless Communications

Unlicensed

Licensed

Source: http://file.scirp.org/Html/1-4000110_65802.htm , 2016 55 Mobile Communications: 1G to 5G

Year Technology/Standard Rate Usage 1G 1980’s Analog radio N/A Voice AMPS/TACS 2G 1991 Digital Radio < 100 Kbps Voice, SMS GSM,GPRS,EDGE People 3G 2003 CDMA 200 kbps MMS, Video Call, Internet WCDMA/CDMA2000 - 3 Mbps 4G 2013 All-IP 10 Mbps Broadband Internet LTE-A/802.16m - 1 Gbps 5G 2020 Unified, Aggregated > 1 Gbps eMBB (enhanced Mobile LTE-5G Broadband) People mMTC (massive Machine Type and Communications) Things URLLC (Ultra-Reliable and Low (IoT) Latency Communications)

56 ai framework Basic he osbefeunybands frequency possible Three – kbit/s 250 to up rate Transfer bytes 127 – to up Frames meters 10 – to up Range – Topologies – types node Two – lse re ehnetwork mesh tree, Cluster networks • hoc ad for basis (point-to-point): Peer-to-peer • •Star FFDs with relay communicates to only coordinator (RFD): a device as Reduced-function serve can • (FFD): device Full-function • use worldwide MHz: 2400–2483.5 • America North MHz: 902–928 • Europe MHz: 868.0–868.6 • revision in added rate kbit/s 100 • defined Initially • pt ite hnes(03 2006) (2003, channels sixteen to Up (2006) thirty – to extended (2003), channels ten to Up – 2011) 2006, (2003, channel communication One – MHz 2450 in rate MHz kbit/s 868/915 250 in kbit/s 40 – and 20 – otn o ietysupported directly not Routing – 802.15.4

Link Layer 57 IoT Standards • IEEE 802.15.4e • BlueTooth Low Energy 4.0+

• K. S. J. Pister and L. Doherty, “TSMP: Time Synchronized Mesh Protocol,” in International Symposium on Distributed Sensor Networks, DSN, November 2008 • HART Communication Protocol and Fundation , Available online: http://www.hartcomm2.org

• J. Nieminen, T. Savolainen, M. Isomaki, B. Patil, Z. Shelby, C. Gomez, IPv6over BLUETOOTH(R) Low Energy, IETF RFC 7668, Octobor 2015 • N. Kushalnagar, G. Montenegro, and C. Schumacher, IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals, IETF RFC 4919, August 2007 • G. Montenegro, N. Kushalnagar, J. Hui, D. Culler, Transmission of IPv6 Packets over IEEE 802.15.4 Networks, IETF RFC4944, September 2007

• T. Winter, P. Thubert, A. Brandt, J. Hui, R. Kelsey, P. Levis, K. Pister, R. Struik, J. P. Vasseur, and R. Alexander, RPL: IPv6 Routing Protocol for Low-Power and Lossy Networks, IETF RFC 6550, March 2012 • J. P. Vasseur, M. Kim, K. Pister, N. Dejean, and D. Barthe, Routing Metrics Used for Path Calculation in Low-Power and Lossy Networks, IETF RFC 6552, March 2012

• Z. Shelby, K. Hartke, C. Bormann, and B. Frank, Constrained Application Protocol (CoAP), IETF RFC 7252, June 2014 • M. Belshe, R. Peon, and M. Thomson, Hypertext Transfer Protocol Version 2 (HTTP/2), IETF RFC 7540, May 2015 58 IoT Operating Systems

• Embedded/Real-Time OS – Mainly for MCU – i.e. FreeRTOS, TinyOS, Contiki, RIOT – ARM mbed • Generic OS – For ARM or above CPU – Linux-based / Apple iOS / Microsoft’s Windows 10 IoT – Google Brillo • Protocol • https://developers.google.com/brillo/ 59 Mobile OS

Feature iOS Android Windows Phone BlackBerry OS

Open Handset Company Apple, Inc Microsoft BlackBerry Ltd. Alliance/Google

OS family Darwin Linux Windows NT 8+ QNX

Supported ARM, x86, MIPS CPU ARM, ARM64 and 64-bit variants ARM ARM architecture of all three

XNA (.NET C/ C++/Qt, HTML5/ Programmed C, C++,Objective- C, C++, Java C#),Silverlight, Javascript/CSS, in C, Swift native C/C++ Java

60 Android Overview

• Unveiled by Google along with the founding of Open Handset Alliance to advance open standards for mobile devices – Early SDK was released on 12 November 2007 • iPhone firstly announced on January 9 2007 – Google acquired Android Inc. on August 17, 2005 – The first Android-powered phone was sold in October 2008 • Designed primarily for touchscreen mobile devices such as smartphones and tablet computers – As of Q3 2012, there were 500 million devices activated and 1.3 million activations per day • Building on open-source Linux – Android code released as open source, under the Apache License

61 Android Versions

Version Code name Release date API level

6.0 Marshmallow October 5, 2015 23

5.0-5.1.x Lollipop November 3, 2014 21,22

4.4 KitKat October 31, 2013 19

4.3 July 24, 2013 18 4.2.x Jelly Bean November 13, 2012 17 4.1.x July 9, 2012 16 Ice Cream 4.0.3–4.0.4 December 16, 2011 15 Sandwich

2.3.3–2.3.7 Gingerbread February 9, 2011 10

2.2 Froyo May 20, 2010 8

62 Android Platform Building Blocks • Device Hardware – Including smart phones, tablets, and set-top-boxes – Processor-agnostic, but taking advantage of some hardware-specific security capabilities such as ARM v6 eXecute-Never • Android Operating System – The core operating system is built on top of the Linux kernel – All device resources, like camera functions, GPS data, Bluetooth functions, telephony functions, network connections, etc. are accessed through OS • Android Application Runtime – Most often written in Java and run in the Dalvik virtual machine – But core Android services and applications are native applications or include native libraries – Both Dalvik and native applications run within the same security environment, contained within the Application Sandbox • Applications get a dedicated part of the filesystem in which they can writeprivatedata, including databases and raw files • Android Runtime (ART) – Introduced by Android 4.4 but not enabled by default • the only runtime in Android 5.0 – Uses ahead-of-time (AOT) compilation to entirely compile the application bytecode into machine code upon the installation of an application 63 Android Development

• Android consists of – A kernel based on the Linux kernel 2.6 and Linux Kernel 3.x (Android 4.0 onwards) • Does not have a native X Window System nor does it support the full set of standard GNU libraries • a power management feature called wakelocks • The flash storage is split into several partitions, such as "/system" for the operating system itself and "/data" for user data and app installations • Android device owners are not given root access – With middleware, libraries and APIs written in C and • Dalvik virtual machine with just-in-time compilation to run Dalvik dex-code (Dalvik Executable), which is usually translated from Java bytecode – Application software running on an application framework which includes Java-compatible libraries based on Apache Harmony – The main hardware platform for Android is the ARM architecture

64 Android Applications

• Applications are usually developed in the Java language using the Android Software Development Kit – Native Development Kit for applications or extensions in C or C++ – Installed from a single file with the .apk file extension • Android applications run in a sandbox – Assign a unique user ID (UID) to each Android application – Run it as that user in a separate process • Two primary sources for applications – Pre-Installed Applications – User-Installed Applications • Either through a store such as or the Amazon Appstore, or by • Downloading and installing the application's APK file from a third-party site

65 Android Architecture - Software Stack

Java applications running on a Java-based object-oriented application framework on top of Java core libraries running on a Dalvik VM featuring JIT compilation 66 Summary - IoT

• IoT – A New Thing with Many Old Objects – Open, Interoperability, Scalability – Security and Privacy • IoT – A Big Thing – Big Technology? – Big Value? • IoT – More Small Things, really – Small challenge? – Small entry barrier? • IoT – Right Thing, actually – Right idea – Right solution – Right time and right place 67 Summary - Cloud

• Cloud Computing: yet another model of distributed systems – Not surprised from distributed system view • Yet another market-oriented term – More serious? • There are opportunities! – But challenges here • Never stop to find the next wave

68