Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Edge Computing with Python: End-to-end Edge Applications, Python Tools and Techniques, Edge Architectures, and AI Benefits (English Edition)
Edge Computing with Python: End-to-end Edge Applications, Python Tools and Techniques, Edge Architectures, and AI Benefits (English Edition)
Edge Computing with Python: End-to-end Edge Applications, Python Tools and Techniques, Edge Architectures, and AI Benefits (English Edition)
Ebook565 pages4 hours

Edge Computing with Python: End-to-end Edge Applications, Python Tools and Techniques, Edge Architectures, and AI Benefits (English Edition)

Rating: 0 out of 5 stars

()

Read preview

About this ebook

The success of IoT and Industry 4.0 depends on edge computing and better network performance. The book, ‘Edge Computing with Python,’ intends to provide a fully-connected embedded environment in which readers can experience the applications of edge computing and IoT in a professional context.

In this book, readers will learn what edge computing is, what its possible applications are, and how advantageous it is. This book provides thorough instructions for using Python to build every potential edge application. The book begins by configuring the programming environment with tools like VS Code, Python, and several popular libraries like SciPy, NumPy, and Pandas. Then, the book explains gaining access to IO devices, data handling, data storage, cloud connectivity, and hosting ready and pre-trained machine learning models step by step.

The book delves into sophisticated ideas such as Docker Containers, MQTT, and FIWARE and how one can use them to construct Edge applications. In addition, the book details the Siemens Edge computing platform and how to use it for rapidly developing Edge applications. After reading this book, knowledge of Edge Computing's architecture, its benefits, and drawbacks will give readers a competitive advantage in the market.
LanguageEnglish
Release dateOct 14, 2022
ISBN9789355512017
Edge Computing with Python: End-to-end Edge Applications, Python Tools and Techniques, Edge Architectures, and AI Benefits (English Edition)

Related to Edge Computing with Python

Related ebooks

Programming For You

View More

Related articles

Reviews for Edge Computing with Python

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Edge Computing with Python - Abhinandan Bhadauria

    CHAPTER 1

    Understanding Edge Computing

    Introduction

    In this chapter, we will introduce Edge Computing, its evolution, and the use cases where it’s needed. Moving forward, we will be comparing Edge with Cloud Computing and look at the advantages and disadvantages of both. The basics of IoT, IIoT/Industry 4.0 with examples will be covered. Also, several types of Edge devices will be discussed while touching upon the concept of Fog Computing. The purpose is to get the readers familiar with Edge Computing and related terminologies.

    Structure

    In this chapter, we will discuss the following topics:

    What is Edge Computing?

    Evolution of Edge Computing

    Use cases of Edge Computing

    Advantages and disadvantages of Edge Computing

    What is Cloud Computing?

    Advantages and disadvantages of Cloud Computing

    What is the Internet of Things (IoT)? And its applications

    How IoT relates to Edge and Cloud Computing

    Industrial IoT or industry 4.0, and its applications

    Classification of Edge Devices and Fog Computing

    Objectives

    After reading this chapter, you should be able to understand Edge Computing, its applications, common terminologies, and other related technologies like Cloud Computing, IoT, and IIoT.

    Know the Edge Computing

    Wikipedia describes edge computing as Edge computing is a distributed computing paradigm that brings computation and data storage closer to the sources of data. This is expected to improve response times and save bandwidth. The term refers to architecture rather than a specific technology.

    Edge computing is an arrangement for bringing the computation and storage capabilities closer to the data source (typically a device), contrary to Cloud computing where these capabilities are provided at remote/central locations and accessed via the internet. Edge computing itself is not a special technology, it’s an architectural concept for computing infrastructure. Edge refers to the logical boundary where the device and network (typically the internet) join each other. Since computation takes place at this boundary (or Edge), it’s termed Edge Computing. Also, these devices can be distributed at different geographical locations with their computation capability. Hence, it comes under distributed computing paradigm.

    The Edge device could also be a PC/Laptop, smartphone/tablet, game console (PS or Xbox), network router, smart TV, Amazon Alexa, a vehicle, coffee machine, or some industrial equipment, etcetera. in the following Figure 1.1 shows the comparison between Edge and Cloud computing:

    Figure 1.1: Edge Computing

    Evolution of Edge Computing

    The term Edge is not new, it has existed for years. The world of computing has been moving around centralized and distributed architectures since the early days. The following Figure 1.2 shows the timeline of Edge computing evolution:

    Figure 1.2: Evolution of Edge Computing

    The 60s to 80s: decentralized

    Mainframe - All computing and storage used to be on the centralised powerful machine referred to as the mainframe. Dumb terminals were used at the edge to access this central computing power. Mainframes are still in use in highly specialized complex fields like scientific research. The supercomputer is the next level of the mainframe with much more processing and storage power in the center.

    The 80s to late 90s: decentralized

    Personal computers (PCs) - The introduction of microprocessors replaced dumb terminals with PCs and laptops. With their processing and storage power at the edge, centralized computing got decentralized.

    The late 90s to mid-2010s: centralized

    Client-server & cloud computing - The advancement in network infrastructure and the internet brought back the era of central computing and made client-server architecture popular. The client-server architecture further evolved into Cloud Computing. With Cloud Computing, the processing and storage power shifted from individual low-end edge devices to a centralized cloud.

    The mid-2010s to 2020s: decentralized

    Edge Computing - More and more devices are getting connected to the internet and sending a massive amount of data to the cloud. This amount of data is beyond the capacity of existing communication networks and cloud computing, that is how the term IoT gained popularity. So, to reduce the load on network and cloud, Edge Computing comes into the picture which brings computing and data storage closer to individual devices.

    Use cases of Edge Computing

    Edge computing is driven by use cases where quick (or real-time) response and high availability are primary requirements with no compromise. Additionally, it also enhances the privacy (or security) of sensitive data as data doesn’t travel outside or over the internet. The following are a few examples of use cases where Edge Computing is a must.

    Driver’s drowsiness detection

    Let us assume, there are special sensors mounted on a vehicle’s steering for acquiring ECG data (for example, HR, BP, etcetera.) from the driver’s hand. This data can be processed using some special algorithms for detecting the drowsiness state of the driver and raising an alert. In this case, a quick response from the algorithm is very much crucial so that an alert can be raised promptly, as any delay can cause a disaster. The following Figure 1.3 shows a vehicle with drowsiness detection capability using Edge computing:

    Figure 1.3: Drowsiness Detection

    Patient’s health monitoring

    During a surgical procedure, there are lots of sensors attached to the patient’s body that acquires health data like ECG. These health parameters are then used to analyze patients’ stability and alerts are raised in case of any anomaly. Here also, it is very crucial that health data gets processed near the patient and timely alerts are raised, any delay can cause a disaster. The following Figure 1.4 shows the patient health monitoring system using Edge computing:

    Figure 1.4: Patient Health Monitoring

    Autonomous or driver-less vehicles

    When the driver-less vehicle moves on the road it is very crucial to capture the road activities, process, and react quickly like putting brakes automatically if anything comes in front of the vehicle. Here also, it makes sense that processing of road activity and the reaction takes place within the vehicle itself and avoids any delays that can turn into a disaster. The following Figure 1.5 shows an autonomous vehicle equipped with various sensors and Edge computing:

    Figure 1.5: Autonomous Vehicle

    Content Delivery Network (CDN)

    It’s also important to talk about CDN as an Edge use case. It refers to the delivery of various content like news, e-com, and video streaming (OTT) via the internet. The popularity of the Cloud also paved the way for a rise in CDN. But there was a problem with earlier CDN, let’s say if the actual content source is in the US and people in India try to access it, then the response used to be slower due to long-distance, and various network parameters like bandwidth, congestion, etcetera. The following Figure 1.6 shows the earlier CDN system without Edge capabilities:

    Figure 1.6: Traditional Content Delivery

    For solving this problem, the concept of regional-level content proxy is used. The content proxy is placed in all regions like India, Germany, etcetera. This proxy maintains a cache of most accessed contents, it responds to all requests from the same region, this makes the response faster compared to the earlier approach, hence it’s also considered the Edge Computing approach. With this approach, it is also possible to deliver country/region-specific content as per govt norms. The following Figure 1.7 shows the Edge based CDN with regional proxies:

    Figure 1.7: Edge-based Content Delivery

    Advantages of Edge Computing

    Predominant advantages are as follows:

    Near real-time response: Edge computing is available near the source of data, so the response time of the applications running at the edge is very fast or nearly equal to real-time. For example, both the data source and edge computing are connected via the local network at the same location where network delays are much lesser compared to wider networks like the internet, hence the response time is always faster. The following Figure 1.8 shows data processing near the data source produces faster response:

    Figure 1.8: Real-time Response

    Lesser bandwidth: The devices that produce data forward the data to edge computing over the local network. This data is processed by edge computing and only the results are forwarded to the cloud or central computing over the internet, thus reducing the bandwidth requirement for the internet to a great extent. For example, if the data is video streaming and edge computing is in place, then it could save internet bandwidth up to a thousand times. The following Figure 1.9 shows that Edge computing saves internet bandwidth as less data needs to be forwarded to Cloud:

    Figure 1.9: Less Bandwidth to Cloud

    High availability: The chances of a fault within larger communication networks like the internet are much higher compared to the local network. For critical use cases like patient monitoring, the application must not fail due to any fault in communication, hence with edge computing, the overall availability is higher than in the cloud. The following Figure 1.10 shows that Edge computing works even if internet connectivity is lost:

    Figure 1.10: No effect on Edge on Internet failure

    Data privacy and safety: For the obvious reason, that data is not moving over the internet which is a public network. The data is processed and stored primarily within the local premises, hence privacy and safety are ensured.

    Scalability at a lower cost: Each new device increases the bandwidth and computing requirements that need to be taken care of additionally (incur a cost) in case of cloud or central computing. With edge computing, it’s just a matter of plug-and-play devices and there is no need for any additional cost. For example, let’s assume one camera captures video and forwards it to the cloud, every new camera added will multiply the bandwidth and the computing requirement. Whereas, in the case of edge computing, each camera will have its computing network where bandwidth is also not required. Hence, the scaling cost is much lower.

    Disadvantages of Edge Computing

    Predominant disadvantages are as follows:

    High cost for setup and maintenance: Users need to invest capital in setting up the required hardware and software infrastructure. Also, experts need to be hired to manage this infrastructure. Maintenance cost is also high due to various devices at different times.

    Emerging technologies and standards: It is very difficult to cope with rapidly evolving technologies, standards, hardware, and software to keep the infrastructure up to date.

    Larger attack surface: Due to the large number of connected devices, there are multiple entry points for cyberattacks. This makes the attack surface larger. Any addition of a new device increases this surface further.

    Introduction to Cloud Computing

    As per Wikipedia, "Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Large clouds often have functions distributed over multiple locations, each location being a data center. Cloud computing relies on sharing of resources to achieve coherence and economies of scale, typically using a pay-as-you-go model which can help in reducing capital expenses but may also lead to unexpected operating expenses for unaware users."

    The following Figure 1.11 shows a high-level structure of Could and its different components:

    Figure 1.11: Cloud Computing

    As stated earlier, Cloud Computing provides computer resources like computing power and storage over the internet. These resources are not directly managed by the users but by different providers like AWS, Azure, Google, etcetera.

    The service-oriented architecture is followed, and all computer resources are provided as a service model. Broadly, the three standard service models offered by cloud providers are Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). The following Figure 1.12 shows the service model of Cloud computing:

    Figure 1.12: Cloud Computing Service Model

    Advantages of Cloud Computing

    Predominant advantages are as follows:

    Save investment and maintenance cost: Users don’t need to invest any capital directly in hardware, software, electricity, etcetera. for setting up the infrastructure on its premises, and there is no need to hire experts to manage this infrastructure. The pay-per-use model makes it easier for users to utilize resources efficiently and economically.

    Faster resource allocation: Computing resources are mostly provided ‘as a service on a need’ basis, so it takes a few minutes and mouse clicks to allocate/deallocate computing resources from anywhere in the world.

    Higher productivity: As the computing infrastructure is in the cloud, so there is no need of doing time-consuming tasks like hardware/software setup/maintenance, etcetera. The IT team can concentrate more on accomplishing core business objectives.

    Higher performance: Cloud computing works over the internet, which is a global network. Cloud is a state-of-the-art infrastructure equipped with the latest hardware and software; hence applications can achieve higher performance.

    Data reliability: In cloud computing, data redundancy can be achieved very easily and it’s cost-effective too. This makes the cloud a reliable solution for the data.

    Security: Security is managed by cloud providers using the latest technologies and policies which help to protect the user’s data and applications from cyberattacks.

    Disadvantages of Cloud Computing

    Predominant disadvantages are as follows:

    Dependency on the Internet: The accessibility of cloud computing resources is dependent on the internet, there is no other way to access these resources. If the quality of the internet connection is not good enough or there is any fault, then these resources cannot be accessed, which in turn can affect the business. The following Figure 1.13 shows that Cloud computing doesn’t work if internet connectivity is lost:

    Figure 1.13: Resources are not accessible in case of Network fault

    Migration from one provider to another: Each cloud provider has its platform, these platforms use different technologies, so it is not easy to migrate applications from one provider to another. Additionally, it can also incur high migration costs.

    Restricted authority: The cloud users have restricted authority on the cloud, only the cloud provider has absolute authority.

    Data privacy and security: As the data is forwarded to the cloud, it reaches the hands of a cloud provider which is a 3rd party here. Even though the cloud providers take maximum measures for best security, as the data moves in the public network there are chances of cyberattacks and data leakage. Another aspect to note is, that the cloud provider is responsible for the security ‘of the cloud’ (software, hardware, infrastructure, etcetera.), and the user is responsible for security ‘in the cloud’ (application data, identity & access management, firewall, encryption, etcetera.). The following Figure 1.14 shows the security responsibility in/of the Cloud:

    Figure 1.14: Security in/of the Cloud

    Introduction to the Internet of Things

    As per Wikipedia, the term Internet of things was coined independently by Kevin Ashton of Procter & Gamble, later MIT’s Auto-ID Centre, in 1999.

    "The Internet of things (IoT) describes physical objects (‘things’) that are embedded with sensors, processing ability, software, and other technologies that connect and exchange data with other devices and systems over the Internet or other communications networks."

    Here, physical objects refer to devices or IoT devices that can range from small gadgets to sophisticated medical/industrial equipment but not regular devices like computers, laptops, and smartphones. For example, smartwatches, fitness trackers, air conditioning, lock, light bulb, pacemakers, hearing aids, industrial controllers, etcetera. There are more than 7 billion connected IoT devices today. The following Figure 1.15 shows various types of industries where IoT is being used:

    Figure 1.15: Internet of Things

    IoT devices are simple sensors and actuators that are Internet-ready with very low or no processing and storage capability, and usually do not make decisions. They send data to remote computers, receive instructions, and are designed for some specific application.

    Applications of IoT

    There are several applications of IoT in every field. Here are a few examples:

    Health: The sensors are connected to patients (or even beds) and the data is forwarded to the cloud which allows the doctors to monitor the patient’s condition from a remote location. The IoT assists in healthcare improvement and avoidance of critical situations. The following Figure 1.16 shows IoT based remote patient monitoring system:

    Figure 1.16: IoT-assisted Remote Patient Monitoring

    Traffic management: When we use navigators such as Google Maps, our data is sent to the cloud which helps for traffic monitoring, showing different routes, and improving the routes information, distance, and estimated time of arrival. The following Figure 1.17 shows that IoT helps in traffic management:

    Figure 1.17: IoT-assisted Traffic Management

    IoT and Edge: In my opinion, Edge computing can be termed as an extension of IoT. The IoT devices are supposed to send data to remote computers and receive instructions to perform specific tasks. On the other hand, Edge devices are equipped with high processing and storage and can be programmed to perform complex tasks like AI. In other words, we can say that an IoT device can act as a data source for an Edge device, or both IoT and Edge can be embedded in a single device/unit. The autonomous vehicle which is described under the edge computing use-cases section is also an example of embedding IoT and edge computing in a single unit. The following Figure 1.18 shows the ties between IoT and Edge:

    Enjoying the preview?
    Page 1 of 1