Skip to content
ImagineWorld

Practicalities of Edge Computing

node_idnode-book_real-world-edge-computing_chapter-02-practicalities-of-edge-computing
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num2
chapter_titlePracticalities of Edge Computing
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 2 — Practicalities of Edge Computing

Section titled “Chapter 2 — Practicalities of Edge Computing”

Even the most perfect architecture can be a disaster if you aren’t familiar with the engineering challenges that are introduced by that architecture or don’t have a basic understanding of how to address them. New York City is full of beautiful examples of architecture in its skyline, with buildings that blend form and function in elegant and durable ways. There are hundreds of iconic examples with a myriad of sizes, shapes, materials, utilities, and statements.

And yet, each of these embodied significant engineering issues – whether that’s finding an economic balance between working space versus service space; managing the distribution of power, water, and ventilation; incorporating gravity-defying cantilevers; or dissipating wind shear. The point is that none of these magnificent structures would exist unless engineers had learned to recognize the various challenges of building construction and developed best practices for dealing with them.

And the same principle applies to the architecture of Edge computing as well. We will use this chapter to introduce you to the most common and significant challenges you will encounter with Edge computing. We will identify the things that could derail a successful Edge solution in your production environment. We will also use this chapter to help set you up for the best practices that we will be covering in the rest of this book.

In this chapter, we’re going to cover the following main topics:

  • Practical challenges with Edge computing
  • Organization considerations

As with the prior chapter, this chapter will depend on you having an appreciation for what Edge computing is about, and having a particular Edge solution in mind against which you can assess the challenges we will be covering in this chapter. We presume you know how to write software, have a basic background in Cloud computing practices, and have working experience with DevOps practices for deploying an application to an IT or Cloud production system.

In many ways, building out an Edge computing capability is very similar to creating software applications in the Cloud. However, there are a few important differences that we will enumerate here.

If you are familiar with modern, Cloud-native, software engineering practices, you will have a good start on designing and building for the Edge. However, several aspects of those practices need to be highlighted.

Unlike the Cloud, which has “virtually infinite” resources, Edge computing environments are inherently constrained. Componentization and containerization are critical to your software design to keep software components as compact and lightweight as possible. You must minimize redundant logic – leveraging reusable microservices wherever possible. This applies to your code as well as the underlying operating system itself – hence the importance of containerization.

Furthermore, the Edge environment is subject to a high degree of dynamism, such as sensors that are enabled and disabled at different times, updates to hardware configuration and generations, and unplanned outages – consider a worker that accidentally kicks the power cord out of its socket – and the potential for network failures. You must design your software to fail and operate gracefully even when it cannot access the Cloud or other backend resources. You may have to implement that software to be aware of specific I/O sensors that are important to the function you are creating.

You may use all the standard software engineering, versioning, and testing practices you would use for any other cloud project. However, you must keep in mind that your versioning may have to reflect on the variations in the types of devices you intend to use at the Edge. For example, you may have different types of point-of-sale devices at different stores – perhaps intentionally, or just as an artifact of the different generations of hardware or layout you have at different stores. You can reflect on these differences in your versioning schema or you can include conditional logic that is activated by different environmental variables. However, you must be aware of the impact that can have on the software footprint.

You may also need to support the same software implementation but compiled for different processor architectures – x86 versus ARM versus RISC-V, for example. In this case, you must include multiple compilations in your build process.

Application placement and life cycle management

Section titled “Application placement and life cycle management”

Unlike the cloud, the Edge is often composed of many individual devices and servers, with a high potential for variation from one site to another, and a high rate of change. You may have dumb cameras attached to an x86 server at some locations, and ARM-based intelligent cameras operating on their own in other locations. You may have some stores at an older generation of hardware, and other stores at more current generations. Machines may be updated with more memory, storage, GPUs, or other co-processors in the field. Different machines, even if they have the same architecture and configuration, may be dedicated to different purposes. Different geographies may have different localization or regulatory requirements that must be accounted for in the software you place in those locations.

Given all this diversity, your normal continuous integration/continuous deployment (CI/CD) processes must be reworked. The deployment process must consider what software needs to be placed where – factoring in differences in versions, differences in processor architecture, differences in machine configuration, as well as differences in available sensors, differences in purpose, differences in regulatory conditions, and the potential for local controls to affect those placement decisions.

Edge projects often start small – building software that will be hosted on one or two Edge devices or servers. We might do this to prototype an idea or to become familiar with the processes. Inevitably, a production deployment of Edge computing will grow to include hundreds of servers and thousands, maybe even tens of thousands, of devices in many locations distributed across many geographies.

When the project is small, you might get by with handling the deployment manually, or even with some simple scripts. However, these approaches to managing deployment will fail as the project grows. You must consider the deployment system at the earliest stages of your project. Make that decision an integral part of your project design scope from the beginning.

Exacerbating the issues of dynamism and diversity is the fact that Edge computing almost always occurs where there are no “IT people.” The Edge happens in factories, distribution centers, banks, and stores miles from any IT data center or central organization. These systems are in the wild – exposed to the public, workers, contractors, and third parties that neither have the training nor the inclination to keep these systems operating correctly. They may even interfere with the equipment, or worse, maliciously subvert the system. You won’t have someone there to guard them, let alone install and keep the software up to date, and in some cases, the equipment cannot be physically reached after it is deployed in operation.

Furthermore, much of the Edge computing hardware that’s leveraged in these environments is headless – that is, there are no keyboards or displays attached to the equipment making it difficult to perform any sort of command entry or graphical user interface (GUI) actions at the machine itself.

Your management processes must account for how to get the operating system installed, apply patches, and update the firmware, not to mention getting your workloads deployed and kept up to date. They must be autonomous, self-healing, and respond flexibly to changing conditions.

Your Edge workloads will likely leverage services in the Cloud – requiring access with API keys or other authorization credentials. Standard Cloud-native development practices already dictate that you must never hard-code API keys or other security credentials in your code. Rather, you should bind to credentials that are maintained in a local, secure vault.

On the other hand, in a dynamic and diverse environment where you may not know in advance exactly where your software or what version will be deployed, you also don’t want to put a vault in every Edge device or server with a complete copy of every key that any software that might end up at that location will need. Your deployment system must include a mechanism for securely distributing the secrets your workload will need to just those devices and servers where your workload is placed.

Since your workloads will be deployed in far-flung and remote locations, they will be transmitted over the network during deployment. You must protect against that software being tampered with during transmission.

Furthermore, since most Edge devices and servers have a communal purpose – to serve the operations of the business – they often won’t have a single user. Software hosted at the Edge must rely on the authenticity of the device to be legitimate and used for authorized purposes, but without relying on a user to prove that veracity. Edge machines must be able to be self-attesting so that you know that your software is being deployed to the equipment you expect, and not some rogue equipment inserted into the network attempting to masquerade as something legitimate.

Finally, despite all the protections you’d expect to have in place at the Edge to ensure a secure hosting environment for your business workload, if someone manages to hack into a particular machine, you need to limit the potential damage they can cause.

The most common use cases for Edge computing involve collecting data from sensors, analyzing that data, and providing conclusions that can be applied to process decisions. Sensor data often doesn’t discriminate the things that matter from the things that are superfluous to their purpose.

An obvious example of this is a camera placed over a production line to perform quality checks. While that camera may be focused on the work in question, it is easy for that same camera to also pick up images of people walking around in the background, or inventory being handled in the field of view. Either way, that superfluous data can be highly sensitive – either exposing the personal information about the worker in view, what they’re doing, or the state of the business.

Moreover, transmitting that data to another location, even if unintentionally, may violate certain privacy regulations. For example, in Australia, a business may use facial recognition to provide customer personalization benefits, such as improving the conversation interaction with that customer resulting from that additional context. However, in Australia, it is illegal to transmit the facial data that’s used for that recognition outside of the store where it is collected.

Your workload design must account for this – by either redacting superfluous information or, if it is necessary to transmit, ensuring that data is encrypted properly before transmission.

Many use cases at the Edge involve the use of machine learning (ML) or artificial intelligence (AI) 1 algorithms. One property of ML-based algorithms is that they are driven by training models – that is, weighted-value tables that help the algorithm recognize patterns and make predictions based on training data. The model is as important as the algorithm itself and even though the algorithmic logic and the model are distinct, there is a strong correlation between the structure of the algorithm and the structure of the model.

1 These terms are often conflated and used interchangeably. More accurately, ML is a general algorithmic approach to analyzing data for patterns and making predictions. AI may use ML algorithms to analyze unstructured data representing various forms of human experience to exhibit a form of human-recognizable intelligence. That distinction is not significantly important to this book, so we will just follow the contemporary trend to use the AI and ML terms interchangeably to mean anything that depends on training models to inform the analysis.

Moreover, the resulting analysis is only as good as the data that was used to train the model. Often, the training data is constantly evolving. The quality and strength of the analysis are constantly being improved by adding new experiences to the data and re-training the model. In essence, the model has a life cycle that is generally much shorter than the algorithm.

For this reason, it is important to separate the algorithmic logic (placed in a container) from the model (placed in a separate data file) and deploy them together. However, to avoid re-deploying the same algorithmic logic every time you update the model, your deployment system must enable you to version the model and deploy it separately from the algorithmic logic container that depends on that model.

While Edge devices and servers may need to operate for extended periods without connectivity back to the Cloud or other IT data centers, they will almost always connect at some point. Connectedness is an integral part of Edge computing. Connections between devices and servers at the Edge, and to intermediate servers in the network Edge, or back to the Cloud or IT data center, must be secure and managed. More importantly, given the dynamism and diversity outlined previously, connectivity must be secured between the individual workloads that are deployed at the Edge and the services they depend on.

Connectivity between one workload on an Edge server and a service in the Cloud does not necessarily mean connectivity between a different workload on that same server and a service in another cloud should be allowed. This is also relevant to the discussion in Security at the Edge about limiting the blast radius of an attack. The permissions for connecting a legitimate workload to the backend must not be something rogue software can hijack. Doing so can create a back door into the enterprise that could be exploited to compromise that business.

We use the term connected Edge to refer to the principle that Edge devices and servers are connected, at least for some of their time.

The connected Edge enables secure connectivity between individual workloads and the services they depend on. The connected Edge recognizes where workloads are deployed, and how that workload is migrated to different Edge nodes based on the dynamics of the environment and placement decisions for where to run that workload. The connected Edge automatically moves secure connectivity with the workload whenever that workload is migrated to a new location.

Multiple networking options may be available between an Edge location and the Cloud or IT data centers they depend on. A network operator may provide public or private broadband over copper or fiber links. The advent of 5G networks has introduced the potential for connecting over a wireless network. Private 5G makes this even more tenable for many institutions, even at a higher cost if doing so provides a higher level of isolation and avoids costly cabling. Other options, such as Wi-Fi 6, LoRaWAN, LPWA, Thread, and LTE-M are emerging with different trade-offs.

For a period, it was common for institutions to leverage satellite networking as a fallback in case their primary wired connectivity was disrupted. This is less prevalent now but is still part of our heritage, and with the acceleration of Low Earth Orbit (LEO) satellite internet options such as Starlink and Telesat coming online, this may become more prevalent across the industry.

The connected Edge recognizes that the underlying network between locations may have different types and levels of service quality – different levels of reliability, bandwidth, latency, security, and transmission costs. The connected Edge will automatically leverage whatever underlying network is available to it, based on policies that are specific to the workload and institution, and automatically load-balance, route around congestion and failures, and optimize for performance, cost, and quality of service requirements.

The connected Edge accommodates the fact that sometimes, the Edge is disconnected for long periods – either accidentally or intentionally.

When embarking on an Edge project, it is important to consider how to structure it. We will outline some of the key considerations here.

CloudOps and DevOps roles and responsibilities

Section titled “CloudOps and DevOps roles and responsibilities”

The CloudOps and DevOps roles for Edge computing are largely the same as they would be for any Cloud-native development effort. DevOps is generally responsible for creating and maintaining the workload software and building and operating the CI/CD pipeline for integration, testing, and delivery into production. CloudOps is responsible for deploying the infrastructure, allocating or creating the necessary resources for different projects, monitoring and optimizing capacity and availability, and ensuring adherence to compliance policies and regulations.

The following are some significant considerations for Edge computing:

  • Infrastructure is highly distributed in remote locations, and generally resource-constrained.
  • Devices may employ a variety of different processor architectures, including x86, ARM, and RISC-V.
  • Infrastructure capacity and configuration may vary between locations.
  • Specific infrastructure may be allocated for specific purposes in particular locations.
  • The same software may run on one device or server, or many different devices and servers. Either way, the decision of where to place that software is made late in the CI/CD cycle and may be highly dynamic.
  • The decision for where to place workloads may be further influenced by business operations managers and their schedules (in addition to classic CloudOps teams).

These considerations may have an impact on how DevOps and CloudOps are performed – primarily in terms of driving the need for automated placement and deployment processing, which can dynamically sense and respond to changing conditions in real time.

The primary driver of Cloud computing is the economic flexibility it provides for dynamically allocating and deallocating the availability of resources as utilization demands vary over time. The elasticity that Cloud computing provides stems from its ability to share resources over a large pool of compute capacity that gets dynamically suballocated (and re-allocated) for different users. In turn, this presumes a high degree of uniformity of those resources in that pool, the ability to virtualize those resources, and the assumption that software is written to be agnostic to physical dependencies.

Edge computing, on the other hand, tends to leverage specific compute resources at individual devices and servers that are both resource-constrained as well as highly diverse – both in terms of the processing architecture as well as resource configuration. The ability to elastically allocate and deallocate resources for a set of workloads is more limited. That doesn’t invalidate the utility of Edge computing; it just puts more emphasis on the importance of keeping software lightweight, portable to (compiled for) different processing architectures, and agnostic to being run on Edge devices versus Edge servers.

As with Cloud computing, the extent to which larger capacity servers can be provisioned at the Edge – either in the on-premises location of the production process or at a reasonably nearby network or metro Edge location, depending on the latency requirements of the use case – will provide a higher degree of flexibility and ability to exploit Cloud-like resource elasticity.

This should be combined with a system that makes automated placement decisions that factor in the operating constraints of the software itself – including, for example, the minimum resource and sensor requirements of the software, the processor architectures to which it has been compiled, localization priorities, and the latency requirements of the use cases that depend on that software.

The primary rationale for Edge computing is to address the needs of businesses to be responsive, protective, and resilient. Businesses must be able to operate at the speed of their markets lest they lose competitive advantage, or even the ability to stay alive. The ability to focus on and respond to market dynamics – changes in supply, quality issues, demand curves, economic impacts, even weather, and other external events – is paramount for many institutions.

That priority is reflected in the decisions these businesses make to invest in Edge computing. They need computing to remove latencies between the data collected and the decisions made on the line. These businesses need to ensure the cost of processing that data is kept low, their operating data is protected, and that they’re able to continue to operate even if their network connections are interrupted. Just as important, these businesses need to be able to update their operating processes frequently and quickly. They need their computing systems to enable the dynamism of their business – to both predict change as well as to enable them to respond quickly when it does change.

Edge computing is key to enabling this level of dynamism, but only if the underlying infrastructure is capable of rapid change. In turn, that requires a high degree of automation for things such as where to run different workloads, recovering from failure, and adjudicating the trade-offs between priorities and constraints – in other words, an automated, autonomous, workload placement and deployment system – especially where change must be driven faster than it can be achieved with human intervention at the levels of scale that most businesses operate.

At the end of the day, almost no business operates with skilled IT personnel in their operating environments – that is, at the locations where they conduct their core business activity. That’s not to say that everyday factory, distribution center, and retail store workers don’t have IT skills. Almost everyone these days has a smartphone or tablet or uses a laptop or PC at home. Many people have learned how to boot their computer, install applications, run a word processor and spreadsheet, and access the web through a browser.

However, those basic skills are probably not sufficient for installing an operating system, diagnosing and reporting a software bug, applying a security patch, or restoring a corrupted database. Moreover, even if they have the right skills, they may not be certified by the IT team for employing them (lest any mistakes they make could result in shutting down business operations), and in any case, they are not likely to be motivated to spend their time troubleshooting the IT infrastructure in their location versus focusing on their job responsibilities to the operation of the business.

Consequently, Edge computing must operate autonomously and remotely. IT operations teams must be able to install firmware and operating system updates remotely. They need Edge computers to automatically restart themselves in safe mode if they fail. They need to be able to remotely diagnose a problem. They must be centrally managed to get the right software workloads running on the right machines at the right time.

This all requires the right infrastructure and processes for Edge computing that recognize the unique challenges at the Edge.

You should now appreciate the various key challenges you will face in building and deploying your Edge solution to production. We have summarized the issues of software design, placement and life cycle management, scale, autonomous operations, security, data privacy, AI, connectivity, and organizational responsibilities that are particular to Edge computing.

While we have used this chapter to lay the groundwork for what Edge computing is and the challenges you will face in your Edge deployment, the rest of this book will focus on teaching the best practices for how to build successful Edge computing projects. We will address the practicalities and organizational considerations for building Edge-native solutions to real business problems. We will also leverage the most accepted best practices of cloud-native development and show you how to adapt them to the unique issues of Edge computing.

This book is going to prepare you to be an Edge ninja.

Next, we will build on the fundamentals that were established in this and the prior chapter by focusing on a set of key areas of importance for a successful Edge deployment. We will outline a sample infrastructure typical of Edge computing and the significance that the Linux operating system has taken as a foundation. We will discuss various key roles and responsibilities and describe a preferred enterprise architecture. In particular, we will highlight the use of containers as the primary packaging technology for microservices at the Edge.