You are on page 1of 19
7 MopuLe Data Collection, Storage and Computing Using a Cloud Platform Learning Objectives L064 Outline cloud computing paradigm for data collection storage and computing services 1062 Describe cloud computing service models in a software archite everything asa service (XAAS) 106.3 Explain the usage of oud platforms for loT applications and services with exampled, of Xively (Pachube/COSM) and Nimbits The concepts learnt in previous chapters can be summed up as follows—large magnitude of data is generated from large number of devices, es from machines... ustrial plants, embedded components data from larg f automobiles, ‘health devices in ICUs or wireless sensor networks, and s0 on. the data, col e in servers, data « e d Organised in a relational database or other structured or unstructured forma applications, services and processes use data for comput LAP, analytics, business processes, business intelligence an "Section 6.2 descri §6.2 CLOUD COMPUTING PARADIGM FOR Different methods of data Resource refers to one th: Le Doe Collection, Storage ond Comping Using © Cloud Plotorm 208 INTRODUCTION 6.1 Cloud is a new gener: loud cor . Section 63 and ser "Simecor caruisgpanoan | aa econ sonseardeanpng DATA COLLECTION, STORAGE AND COMPUTING Dedicated data store es [Cloud computing paradigm is a great evolution i Technology (ICT). The new paradigm uses XAAS at the Internet cons collection, storage and computin a Following are the key terms and their meanings, which need to be understood Jeaming about the cloud computing platform. read (used), ae zed) or executed ten (created of chang: pater may have usta single instanve, The data po 1od can also be a resource. ‘204 internet of Things: Architecture and Design Fincples Data Collection, Storage ond Com form may provide a browser and APIs which can be used as a base on which othe Saag (er be t the frontier of computing ap, nodes fo IoT data generating ri ans Cloud infrastroctare atlogielextemes of the network. ToT device nodes ate pished by rents inert, eorna ‘messages and datas collected for enrichment, storage and computation hee nese centralised database nodes, Pushing the computations from centralised nodes enables the a {ig of resources at device nodes, which could be a requirement in case of low rome veel lossy networks. The processing can also be classified as. ‘edge computing at local coud, rid or mesh computing. The nodes may be mobile or ofa wireless steer newer c, cooperative distributed in peer-to-peer and ad-hoc networks, to computing and usage of resources which are distributed at Tener multiple computing environments o Internet. The resources are logic lated, — ‘high means communicating among themselves using message passing and tanepareney, Newark concepts and arecooperating witheach other movable without aflecing thecompatsion, = server and can be considered as one computing system (location independen) poe Serscesasoftyrare which provdesthecapa Network Distibued ination ies called by an application Tor Database hasaaescription and discovery methods, such as ade ‘Device! passa a service broke none Disibued (provider end 5} Date Web Service, acco eden described and di nBUage © WSDD-AWweb ser esand ap; Susing XML messages g jects using Internet protocols. XML- Belenable Markup! and exchanges the ol __ Bittorent architecture consists of components which are implemented as independent Services: bonded and orchestrated, and which possess loosely 'e communication between them uses messages. rocess which predefines an order of calling the services {in and the data and message exchanges. ica Figure 63 Devicesr sensors etvork ita colton t device " ‘store, at a coordinating node, a local node of a distributed DBMS {fdstacerte seer or dtibted nese odes croc computing using resources at computing environment of web es over the Internet, a computing refers rogram execution or both. Fors ya -S°¥2r(6) or web s an Open programming environment for Beagle! ndows environme: ected grid of computing place of web servers. to computing using focus on service levels with optimum ted when required and takes the help of pooled resources and ‘environments for hosting applications. The applications utilise the services, jons in Python or Java, - Platform denotes the basic hardware, operating system and network, and_is used | 7 je on definition at htpswwtechopediacom/efinion 34 206 torn of Things: Achitectre and Design Prin Polo Collection, Storage and Compuing Using « Cloud Patou 257 of the remotely connected cloud services wi XAAS is a software architectural concept that en: loud model refers: to acce: envionment by defined at separate SLAs tses pays separately, |The following subsections describe |___ models. S | 6.2.1. Cloud Computing Paradigm z= eed QoS and KPIs, which are Resource pooling is done by the users but each ‘computing the cont age moves to a location with hen developer of Hing means during, loud-service provider. The infrastructure services environment that includes network, sy Ist as we—users of electricity —do mi structure for electricity supply se ton need not know how the Jnich can be measured for co resource or service. ig and enables report of the delivery rent computing nodes in a cluster or clusters refers to integrat i the automatic migration of the processes from one to other Ihomogencous nodes. System software on each computing node should ensure same: storage representation and same results of processing. computer, loud, as part ofthe KPIs in presence ofthe id and protecting the serv yjnode in a network gives the meaning of res position, etc, after being bent, compressed oF Ce Dota Collecion, Storage and Computing Using @ Cloud Mor 208 eteret of Things: Architecture and Design Princ A 9 The following Equation 6.1 describes a simple conceptual framework of the Internet \-€joud Computing Features and Advantages 3 os dd storage and computing are: Bese tures of ice to users forthe provision of storage, computing ser 7 xy and server time : i Resource pooling tenant model Resour oS cesibility in vrtualised environment toheterogencous users clients, systems and devices Elasticity Massive scale availability Internet Cloud + Clients = User appli ‘no boundaries and no wal os 64 them on a common platform and running environment. (Goud storgeand comping enviroent fsa ied ronne ronment made to appear as one to all applications and services, but in fact physically two or moe running enionments and pletrms may be presen] Virtualisation A characteristic of virtualised environment is that Jatform with virtualised environment for enterprises and _ een Service Level Agreements (SLAS) ries econ |-_« Resilient computing =| Advanced security + Low cost ‘Cloud Computing Concerns © Concerns in usage of cloud computing are: ‘+ Requirement of a constant high-speed Internet connection «Limitations of the services available + Possible data loss ry as per defined SLA specified performance Different APIs and protocols used at different clouds environment needs high trust and low risks ‘user application or servi communications are present. tions need not be aware of the platform, just Internet connect ES es called cloud platform, is requited. The storage is called cloud storage. The. computing is called cloud computing. The services are called cloud services in line with the web services which host on web servers) is vice accesses physical storage using _ rive or disk drive, though in storage may be accessible using mt terfaces or servers, For example, Apple: ‘group that enables the sharing of albums, music, videos yyment models: ied by educational {Gougaapioymant™ government ions OF model maybe pubse, businesses or enterprises and is open for publi use vat, community oF 3 ‘oud: This model is exclusive for use by institutions, yb usinesses or enterprises and is meant for private sation by the employees and associated users 0 ‘This model is exclusive for use by a ns, Industries, businesses or enterprises, and foF u 7m, employees and associated users. The community specifies security ce considerations. ion (NFV) means a user apy resourees apPEATM WS UT OME Titwork, though the network access tothe resources be through multiple resources and networks. jon accesses not only one server but Virtualised desktop means t though the access by the use may be through multiple OSs and pl rms or remote computers. - ; seenet of Things: Architecture ond Design Principles - ies ice . ete Coleen, Serage end Computing Wing @ Cloud Plo 212 + clouds (public private or communi relat bind between them t0 deploy the data stores and applicat rd technology. Self-Assessment Exercise ed network architecture consisting of a cluster tres and Service Level Agreements (SLAs) between, and manages resources, and dynamically provisions form applications and network s% compat, wid and distributed services. Examples of cloud platforms are Amazon EC, 4 Compare the relative mente fan as aes Microsoft Azure, Google App Engine, Xi AWS IOT, CISCO Io, IOx and Fog 5. What are theconerne ut oor IBM IoT Foundation, TCS Connected Universe Platform. a 6. How do you define doul empting? How doe alls computing? ! * * networksand servers. 4X teal Bangle 5.1 and list the features of the Microsoft cloud platform. 6.3 EVERYTHING AS A SERVICE AND CLOUD SERVICE MODELS ae ee tion see a ashe ee eee (cc ompating rk sanctions, data store, processing functions, sures Figure 62 shows four Goud sory ee ne natn: Bee the Cloud computing can be considered by a simple equation: . —_ Cloud Computing = SaaS +Paas+laaS+DaaS...6.2_-Foursonice nodes SaaS means Software ‘Software, Platform, rar meapaealtwareas.aService.Thesofwareismadeavailable tnrasture ang Ola where A SUBE ESET On mand 35's sevice model | abe Serves and are made av. services (Windows Azure for compute, nd (iv) Global foundation services (Hardware, networking, deloymes ‘includes development tools (Visual Studio, Windows serves, Vi se management services) tions services). The plat ‘Reconfirm Your Understanding ‘¢ Computations need resources, computing environment and platform. : Applications and services may require multiple platforms and environments, and mults resources. iS ‘s The computing paradigms which are deployed for applications and services, are edge con tributed computing, grié computing, : 1s cloud service connects devices, data, APs, applications, services, processes, persons, ent emai . ae ears ae Tae sofare businesses and eveything 2 a service. Tesponsibilities of the cloud service provid © Cloud services offer 2 virtualised environme nt through the Internet on demar ‘ons. The platform, network, resources, maintenance, upd: ‘The infrastructure (data stores, servers, data centres loud com ihleeee sor ilable toa user or developer of application ondemand. Developer ‘amazon EC2, Microsoft Azure, Google App Engine, Xively and Nimbits are the exam@h services, V/ Dato Collection, Soroge and Computing Using w Cloud Piao any + 212 Internet of Things: Architecture ond Design Principles Google App Engine, 1S Azure, Nivel, Pintormasa. & <> NL Seniee [| De Se “hrm Web Sewics and Vital Serves, GoGrid Virtual servers, EC2,Clo.com Open ical Source aa, Cisco laaS frau rud.com open source 1925, TCS Transfor ure service that automate fluctuating demands for ucture and Data as Services |cormmunications, Goris vinaal servers, Amazon such as CISCO, Oracle, 18M, Google, Amazon, Microsoft, TCS, and Tata oO Viral Serves, £C2 loud Psa. extensible CRM 6 Figure 6.2 aS, a5, laaS and DaaS Cloud Service model [OW—Data Warehouses; DB—Databases; EC2—Elastic Computing Cloud; SW—Software, 'MS-—MicrosotsCRM—-Customer Customer Relations Management) 5 Self-Assessment Exercise Recall Examples 23 and 5.4 for In corresponding cloud se1 List the service models Why isan SLA necessary How will you deploy the cl Management, Business Intelligence and Business Processes in Internet of waste containers? tion and controls them at the infrastructure. = ns develop or use the infrastructure le through the Internet on demand on rent (pay as per use in mi by a developer or user. laaS computing systems, network and security are the responsibilities of the cloud service provider. installs the OS image, data store and app! _ loT CLOUD-BASED SERVICES USING physical security are the respot THE XIVELY, NIMBITS AND OTHER Example 6.2) 1 computing. Saas, PaaS, 1235, DaaS service models for clu data points, messages ‘also provisions for the rat jggers and feeds to the user. syed at the edges (device nodes) which communicates the feeds to the cloud service. qstivice provides for data coll Eind/calculation objects. The serv Solution SaaS Applications Exchange Labs, TCS Management (CRM) 5 Docs for ontine office, MS Windows Live for online office applications, Mss tegrated I-as-a-Service), Salesforce.com for extensible Customer Relatonizs woe ee ee 1 ond Design Priniples generates a new data each ‘corded. A feed means a 54 Teds of messages and alerts agers and feeds for the ILS at the cloud. controle receives the feeds (Central Controller command activate the streetlight yes oF no) 2, feed 10, ime anew sensed Gigud service deplors 3. feed.10,stietServerID and steetratficDensity datastream fr Traffic_Lights Control Senet. “if be the Xv Nib and ter dud porns Sst Ausercreatesanaccour and other functions, An ey Pachube is a platform for data capture in 1 form that enables loT de' Xively provides services for logging, sharing and displaying sensor d Finds using an HTTP based API Dota Collection, Storage and Computing Using @ Clo latin 215 6.4.1 loT Cloud-based Data Collection, Storage, Computing using Xively of con (is an open-source prototyping ibedded applications and ToT? is based on ARM Cortex-microprocessors. The is an open sor data to ata of al a ON 222 ng De Cleon, Soregs end Computing Wing @ Claud Fam ay, 220 Inne of Things: Architecture and Design Fries ‘ “we ite's points and data in their tre (if they set the objects permission level lo publicor ~y connection viewable) aya Nimbis 366 introduced Hz database engine. Nimbits 28.10 includes H2 database SQL database. APIs are in pure Java, The main features of H2 ark 3pen source, JDBC Al Data Channels 5 Embedded ond server modes; in-memory databases + Encrypted database | Dasa Fe Chanel provisions for in-memory or éncrypted ILL) is nearly 4 MB. (JAR means Java archive while DLL stands for brary.) 0 version launched in June 2015 provisions for the breakthrough ty. Section 33.3). A user apy alerts and messages can. sent over XMPP using the ig Means Pushing the alerts or messages down quickly o pushing repeatedly. Each F message is assigned a Jabber 1D, called JID. Each JID consists of three # (required) and resource Figure6.3. Connected devices, sensor nodes, network datapoints, Nimbis server deploy jcnode>"@”" Jedomain>["/" ACVH_ID@ ACVM_Node.domainhdies “resourceName>. imbits clients at applications generates on subscriptions to XMFFServerL 4L When (1.6) ActiveStatus (for ACVM status = active or inactive) = funetioning problem. 2. Hourly alerts as long as (1.6) AciveStatus = 3, When (1.4.2) Next Preventive Maintenance_Date « TimeDate 4 5. ‘Section 12.2.4 describes AWS IoT, IBM IoT Found. i ; IBM IoT Foundation, Cisco IoT, 1Ox and Fog, TCS which have many features but not open source for apes I (0 due to some ACVM device (0 or Next Preventive Maintenance_Dote = DayDate pally alerts as long as (14.2) TimeDate > Next_Freventive Maintenance. Date When (2.1 toc2.1.5) FAFlHourlyStatus, FAFlouryStatus, FIIHoury Stats Mrlsoaystats fs below the 20% ofthe maximum fil space foreach favour choco below 10% and falls below 5%. a 6. When any of the (3.1) to (4 chocolate. Messages generate 2 (C6) and their data fields. XMPPServers receiv ) e and catelation objects for each ACVM device nodes. data chanel fees from NimbitsSeres and RSET 1d server at edge computing node at sensor nodes network teams, alerts, and feeds sunged a pois, sans and alerts Fed oe tules for filtering and calculations. “ oe i other ToT |, graphical LXMPPServert for the ach Nimbits Client at application receives the 64.3. Using Public Cloud loT Platforms nd eque ToT Cloud Analytics Kit are also cloud platforms which ean be ww available for oT: Table 6.1 give foxgarising and analytics by clints/aplications. Many cloud PaaS and SaaS platforms are no examples of cloud-based platforms. = =i 178 oT Physical Devices & Endpoints | TA Whatis an loT Device devices are connected tothe Internet ir surroundings (eg. information sensed er devices sfstorage) of allow nnd them remotely. Some examples of, ‘on device that allows remotely monitoring the status of appliances and controlling the appliances. «+ An industrial machine which sends information abouts ts operation and health ‘monitoring data toa server. ‘A car which sends information about to acloud-based service. JA wirelessenabled wearable device that measures data about a person such as the ‘number of steps walked and sends the data to a cloud-based service. io bie o0s sa Bl yt hed 7.AA_ Basic building blocks of an loT Device ‘An loT device can consist of a number of modules based on functions «Sensing: Sensors canbe either on-board the oT device oratached mation from the on-board oF ‘pased serversistoape. «Actuation: Io devices can have various types of actuators attached that allow taking fctions upon the physical ents inthe vicinity ofthe device. Fr example, a relay Sitch connected toan1oT device can tum an appliance ono based on the commands seat tothe device. « Communication; Communication modules are responsible for sending collected daa to other devices or cloud-based servertorage and receiving data from oer devices y remote applications. seing: Analysis and processing modules ae responsible for making. available from multiple vendors. Further c programming and use both on te Internet and in other textbooks. The principles we teach in Banga & Madisei, © 205 = Raspberry Pi (1 7,2 Exemplary Device: Raspberry Pi 173 ing potty lt elsins. ination sry Paka bg ard computer (SBC) based IoT device. t Faw 71 sows a eer ek dag of ingle oul nme (580 pte (00) bed tor de bat nces CPU, GPU, RAB, ge an vases of mee od om, blocks of a generic singl ee Pi runs various flavors of Linux and can perfor sktop computer ean do. In aditon to this, Raspberry Pi also allows interfacing sensors ‘and actuators through the general purpose VO pins. Since Raspberry Pi rons Linux operating Syste ipports Python “out of the box". ‘nteret of Things A Hands-On Approach 7.4 Linux on Raspberty Pi 181 SD card access } 33V Powers present : Full duplex LAN connected Link/Network act 100 Mbit LAN connected 180 oT Prysical Devices & Ensvoints 7.3. About the Board Figure 72 shows the Raspherry Pi hoard withthe various componentsperipherals labeled. « Processor & RAM : Raspberry Piis based on an ARM processor, The lt Raspberry Pi (Model B, Revision 2) comes with 700 MHz Low Power ARM processor and + USB Ports: Raspbery Pi come ican provide a curry ih wo USB 2.0 pons, The USB purtson Raspberry io 100A. For connecting devices that draw current more 5B powered hub is required. ‘Table 7.1: Raspberry Pi Status LEDs USB Wifi adapter to prov port on Raspberry Pi + Raspberry Pi comes wih a composite vdeo ouput with both PAL and NISC video ouput. The RCA jack canbe jon that have an RCA input oly erry Pi bas 3.5mm audio output jack. Tis ai jacks used for providing andio output to old televisions along with the RCA jack for video. The audio quality fom inferior tothe HDMI ouput ‘+ GPIO Pins : Raspberry Pi comes wih a numberof general purpose inpuvouput pins. Figure 7.3 shows the Raspberry Pi GPIO headers. There ae four types of pins on Raspberry Pi - tre GPIO pin, I2C ineface pins, SP interface pins and serial Rx and ‘Tx pins. + Display Serial Interface (DSI): The DSI interface canbe used to connect an LCD panel 0 Raspberry Pi + Camera Serial Interface (CSI): The CSI interface canbe used to connect a camera _modle to Raspberry Pi. + Status LEDs : Raspberry P has five status LEDs, Table 7.1 lists Raspberry Pi staus Audio Output Figure 7.2: Raspberry Pi board 7.4. Linux on Raspberry, Pi Raspberry Pi supports various flavors of Linox ‘+ Raspbian Raspbian Linux is a Debian port optimized for Raspberry Pi. This. js the recommended Linux for Raspberry Pi. Appendix-1 provides instructions on setting up Raspbian on Raspberry Fi operating sytem and storage {nan SD cad loaded with a Linux image tothe SD car slot. AppendiA tructions on seting up New Outof-the-Box Software (NOOBS) on ey Pi, You will equirealleastan 8GB SD card for setting up NOOBS, «« Power Input : Raspberry Pi has a miero-USB connector for power input. » Pidora : Pic ‘ RaspBMC : RespBMC is an XBMC media-center distribution for Raspberry Pi OpenELEC : OpenELEC isa fast and user friendly XBMC media-cener « RISC OS : RISC OS isa very fast and compact operating system. ‘Bahga & Madsen, © 2015 Intemet ef Things -A Hands-On Approach 182 st Figure 7.3: Raspberry Pi GPIO headers i@ ie fw ah 1@ [te fm [Olle fm Figure 7.4: Rasbian Linux desktop Bahga & Madiseti, © {7.4 Linux on Raspberry Pi Figure 7.6: Console on Raspberry Pi Re "nel of Things «A Hands-On Approach io1 Prysical Deviows & Endports 7.4 Linux on Rasphony PF 185 cedisable SSH server and change boot behavior. It is recommended to expand the root fle-system so that you can us the entire space onthe SD card Figure 7.7: Browser on Raspberny M1 de tet is 0 6 Figare 7.8: Raspberry Pi configuration toot + the Raspbian Linux desktop on Raspberry Pl. Figure 7.5 shows TRaspbian, Figive 7.6 shows the default console on Rasp Figure 7, ‘keyboard la an ere ‘Bahga & Madsen, ©2015 loT Physical Devices & Endpoints yep ee 7.6 Programming Respbery Piwith Python 167 7.6 Progemming 7.5 Raspberry Pi Interfaces nected to GPIO pin 18, Raspberry Pi has serial, SPI and 12C interfaces for data transfer as shown in Figure 73, Raspberry Pi every on Raspberry Br. Ia (ig eps Serial face on Raspherry Pi has receive (Rx) and transmit (Tx) pins for communication | 4 for sending data to the 1y master to synchronize data transmission shh be HE low you to connect hardware mouules. I2C interface iso pins - SDA (data line) and SCL (clock lie) 7.6 Programming Raspberry PI with Python Figure 7.9: Controlling LED with Raspberry Pi = Box 7.1: Switching LED oniott from Raspberry Pl console fe wie vie of 4 2c and seal meres nyt tom be Sef i procul id various actions can Be ken fo | nding an email, triggering a relay switch. a ith abasic examph the schematic diagram of connecting an LED to Raspberry Pi. ‘eternt cf Things - A Hands-On Approach loT Physica! Devices & Endpoints STS 7 5 programming Raspbazty Pi with Python rio. oe10.001) oil 7 look at a more detailed example involving an LED and a switch that is used to ‘control the LED. connected to Raspberry Ps pressed. pineal bade Cai a i [ie Python program for controling an LED wth sith [>= setnode (GP10.50™) Figure 7.10: Interfacing LED and switeh with Raspberry Pi Baga & Madisets, © 2015 Intenet of Things A Hands-On Approach i 1 _________loT Physi! Deviees & Entpoins $I" 2.6 programming Raspberry Pi with Python 191 a [2 Python program for sending an email on switch press a= escent Heyboasatncersupe [~ smtplib t 4 from tame import sleep import RPS.cPI0 as GPTO from sys import exit 7.63. Interfacing @ Light Sensor (LDR) with Raspberry Pi So far you have leamed how to interface LED and switch with Raspberry Pi, Now let us Jook at an example of interfacing a Light Dependent Resistor (LDR) with Raspberry Pi and tuming an LED onfoft based fromemat} = ‘’ wilt. Suiteh pressed on Raspberry Pi* usernane = ’ password = ‘ 25 o> Hs lb ola a a 826 ceaotoa proplens = berver.quit () white True: plente List, Feading-readingsd Feturn reading Subject, essage, Sseenane, pessword, server) steep(.01) Ee Banga & Made, © 20 ete ot Things A Hands-On Aapcach P 7.1 Othor lol Devices \T Devices ini-computers which area Figure 7.12: peDuino Figure 7.11; Interfacing LDR with Ras toad aui-computer that comes witha sfrmsance and cost effective device = Avan Ov Aon 194 at Devices & Endpoins bis Be, sid Figure 7.14: Cubieboard ta hat runs PC like OS such as Ubuntu and Android ICS. Like, Raspberry Pi, video/audio interface. peDuino supports various programming languages {vith GNU toolchain), ava (with standard Android SDK) and Python 7.7.2. BeagleBone Black BeagleBone Black{106] is s with a | GHz ARM Cortex: systems, Like Raspberry to Raspberry Pi, but a more powerful device ‘processor and supports both Linux and Android oper ‘has HDMI video/audio interface, USB and Ethernet pots 7.7.3 Cubieboard Cubieboard (107s powered by a dual core ARM Cortex A7 processor and hes 8 interfaces including USB, HDMI, IR, serial, Ethemet, SATA, and Sosa nerface,Cuigboad ls provides SATA spon. The board can ran bh SS nd Andtoid operating systems oS Inthis chapter you leamed about Raspberry Pi which isa low-cost supports various flavors of Linux ope 7.7 Other loT Devices ‘Summary ports, = Review Questions 1 2, Whi 1 is Raspberry Pi different from a desktop computer? the use of GPIO pins? Things - A Hands-On Approach

You might also like