Skip to content
ImagineWorld

Data Has Weight and Inertia

node_idnode-book_edge-computing-patterns-for-solution-architects_chapter-06-data-has-weight-and-inertia
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num6
chapter_titleData Has Weight and Inertia
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Whether audio, visual, sensory, or telemetry, edge computing is all about data. Whether the data is processed or otherwise transformed at the source where it is generated, stored for later analysis, or used to build models in the future, data is the lifeblood of edge computing. Since data is so valuable, organizations need to store and analyze it before determining relevancy. However, it needs to be done both securely and while actively protecting it in order to meet regulatory compliance regulations. This chapter will discuss considerations about data in its various states. Decisions you make about data will affect where data is primarily stored (data at rest) and how it is stored. Thus, how it is accessed or transferred (data in motion) becomes a secondary consideration, and tracking how it is used and transformed (data in processing) is critical to having confidence in its trustworthiness.

In this chapter, we will cover the following main topics:

  • Data encryption
  • Data storage and management
  • Using data to build machine learning models
  • Connectivity and the data plane

In this section, we will discuss the driving factors for encrypting data, emerging techniques for protecting data while increasing its value, and how to have confidence that data has not been unintentionally or surreptitiously modified. You will learn about protecting data during processing without decrypting. By the end of the section, you should be aware of which techniques work well on the edge.

Data is encrypted so that unintended parties cannot read and ultimately use the data. Since the data does not belong to those third parties, nor do they have permission to use it, they should not be able to benefit from the usage of that data – also known as the concept of data ownership. It’s about the principle of ownership and the data owner being able to determine to what ends the data and derived value should be put – data sovereignty. Therefore, encryption of data is a method for the data owner to prevent, and to show that they are actively attempting to prevent, unauthorized access to their data and its derived value – to ensure data privacy.

It is similar in intent and purpose to a locked gate and fence around a field. The locked gate is not impervious or impenetrable. Unauthorized visitors could potentially bypass the gate or force it open, for example, but its presence is a clear indication that someone is attempting to prevent access to the field. Circumventing that gate is an act that acknowledges the presence of that barrier and is an overt expression of an intent to bypass that barrier in order to gain entry to the field. Likewise, the presence of encrypted data is an indication that persons without the key are not intended to access the data, and bypassing that encryption is an action showing the intent to use the data despite a lack of permission.

To ensure both that third parties cannot read the data and that they cannot eavesdrop on the data while it is transiting networks or being manipulated in working memory, the data must not only stay encrypted but also be processed in protected memory and be transferred over encrypted and isolated networks – a concept known as data integrity. Additionally, (Perfect) Forward Secrecy is a technique that provides additional protections to data in motion by using a new session key to encrypt information each time. This ensures that even if one session’s encryption between two parties is compromised, all other sessions between them are still protected. In a perfect world, methods such as those provided by Fully Homomorphic Encryption would be available to process that data and derive value from it without ever decrypting it.

When it comes to edge computing, and especially at the user edge, the expense of encrypting and decrypting data may be higher than at any other location due to less capable hardware driving higher data transmission latencies and slower processing. Additionally, decision-makers may be under the impression that there is no pressing need for their data to be encrypted. To help mitigate this misconception, and to ensure that potential vulnerabilities are minimized, it is important that User Experience (UX) and software development teams be trained in the concepts behind Security and Privacy by Design (SPbD) and Security and Privacy by Default.

But just encrypting data at rest and data in motion may not be sufficient.

Protecting data without making it difficult to use

Section titled “Protecting data without making it difficult to use”

Protecting data at rest and in transit can be covered by encrypting the data itself, made more secure by also encrypting transmissions. But this still leaves a potential gap or vulnerability during processing, since the data needs to be decrypted before performing operations on it. But what if the data didn’t need to be decrypted to perform computations such as multiplication and addition?

The promise of Fully Homomorphic Encryption (FHE) is efficient algorithms that can produce encrypted results of calculations that only the owner could subsequently decrypt using the encrypted data as input. This seemingly impossible approach protects data while in processing since the data is never decrypted and the key used to originally encrypt it is not known by the FHE algorithms.

When first developed, FHE tools were needed for financial privacy. They were also thought of as allowing third parties to provide services to perform operations on sensitive and private data without violating confidentiality. However, a new case for FHE has emerged with the practice of training Machine Learning (ML) models on data. By using FHE, which supports floating point math operations, models can be trained on data that cannot be directly read, and that only the data owner could then subsequently decrypt and use.

A drawback to the use of FHE, especially on the edge, is the amount of processing required, and the amount of time it may take to process. This means that using FHE for near real-time calculations will likely require cloud-based resources. But if the use case isn’t as time-critical, edge computing may be sufficient for these techniques.

So, making data difficult, if not impossible, for an untrusted party to read and use is a great start. But how do you know whether the data has been manipulated by others?

Ensuring that data modifications are noticeable

Section titled “Ensuring that data modifications are noticeable”

Protecting data is not just about preventing others from reading and using the data. It’s also about knowing where the data came from (provenance), whether it has been modified since it was generated, by whom, and whether the parties in the chain of custody can be trusted (lineage). One mechanism to collect and report on all that metadata is a Data Confidence Fabric (DCF).

DCFs can generate data confidence scoring values to indicate how likely it is that a piece of data came from the indicated origin, and assurance about which subsequent systems and applications it has traversed, thus giving a degree of certainty that the documented chain of ownership has been correctly captured. DCFs can also indicate the likelihood of whether and when data has been modified, based on a collected history of annotations written to immutable storage by trust insertion technologies and thus associating the history of the data record with the record itself.

Consequently, data with a high confidence score is likely to be trustworthy, and data with lower scores is either known to be untrustworthy or of unknown provenance and lineage. In any event, only data with high scores is unlikely to have been manipulated and is thus objectively trustworthy. The benefits of using a DCF include being able to trust data sourced from a third party, and knowing how data has traveled, along with any modifications along that journey.

Since data from sensors, actuators, and other IoT sources are typically generated at the edge, this is the primary location to begin implementing a DCF-based solution. To do so, base your planning on four considerations:

  • Choose a trusted DCF solution (such as Project Alvarium, https://alvarium.org/) used by organizations in the same type of business, vertical, or industry.
  • Ensure the IoT devices that you use can support a hardware-based root of trust or similar technology that definitively identifies the device. Build in a device attestation strategy, utilizing a chain of certificates to confirm both the integrity and trustworthiness of every device.
  • Identify all locations where you need to integrate trust insertion technologies.
  • Deploy trust insertion only in configurations with reliable, stable, and constant network connectivity to the DCF.

A positive consequence of using DCFs is that compliance with privacy standards becomes much easier due to the proof it provides of what has and has not been done to the data. In the next section, we will cover solutions to manage your data.

In this section, we cover data storage considerations, viable alternatives to data retention, and data catalogs/governance/policy enforcement in edge computing. You will learn about considerations to weigh when implementing data management solutions. By the end of the section, you should be able to articulate what data management processes you will follow and what tools you plan to use to enforce the processes and policies.

Strategies for defining and enforcing data policies

Section titled “Strategies for defining and enforcing data policies”

Over the last several years, we’ve seen governments around the world propose and implement legislation aimed at protecting private data, beginning with the EU’s General Data Privacy Regulation (GDPR). This type of legislation has encouraged organizations to be more intentional about what data they collect, how they store, use, and share it, and for how long and where it is retained.

For organizations to comply with these privacy regulations, there are three foundational solution components that should be used. These include a data catalog, data policy sets comprised of rules, and data policy enforcement mechanisms to ensure that those rules are followed without exception. Let’s explore each one of these to understand the scope of responsibility of each of these data management solutions, and briefly discuss how edge computing may affect deployment considerations.

Data catalogs are solutions that collect descriptions of collected data, data types, sources, data purposes, collection timestamps, access rules, storage formats, and other metadata related to answering the questions “What data is being collected, from whom, and why”? There are at least three considerations that will affect what data catalog solutions you choose to employ and where they should be deployed:

  • Consideration 1: These catalogs are typically accessed by data scientists and others doing research, analysis, and business intelligence reporting and summarizing, which means that they are typically centrally located
  • Consideration 2: They may also be accessed by automated systems querying and enforcing data policies, which means that they should be located near data storage, especially if connectivity is not always available
  • Consideration 3: In the case of distributed data storage strategies where the data is kept as close to the source as practical, this implies that a description of that data should accompany the storage or querying capability

Data policy sets and rules are a way of encoding an institution’s official procedures for data access, usage, retention, and movement in a machine-readable format so they can then be enforced. The policy sets and rules also serve as proof of intent that the organization knows data should be protected and is actively striving to do so.

These data policy rulesets, like the catalog, need to be centrally located and accessed but also need to be available in offline scenarios. For this reason, we recommend a central ruleset storage location with caching or distribution to edge locations. Or, alternatively, using a solution that generates rules as code and distributing the resulting application to edge locations.

To have a complete data governance solution, you not only need to know what the data is, its provenance and lineage, and how it should be used, but you also must enforce those rulesets. This requires that data reads, writes, and deletes must be mediated by logic that understands the complete context of the transaction: who is requesting it, for what purpose, in what geographic location, with what consuming application, and for what (data) purpose. That logic must understand the data, its metadata, the request context, and applicable data policy rulesets.

In light of the above discussion of data governance rules, the resulting policies constitute the maximum length of time that personal or private data may be kept. The minimums are more flexible and can be based on the cost of data retention, the amount of available storage, and other practical considerations. An exception to those bounds may be data that your organization is legally required to retain.

With the restrictions that privacy legislation requires come limitations on how the data can be used. However, there are some techniques available that would provide similar outcomes to using personal data without violating the data subject’s privacy. Those data usage options will be discussed next.

Usage options ranging from real to synthetic data

Section titled “Usage options ranging from real to synthetic data”

Many years ago, architects and developers working at a top website were reviewing the web server infrastructure access logs to determine what statistics and site/section/page usage data to surface. Product managers would need to learn how visitors interacted with the site, how long they lingered on various pages and sections, and what pages they likely visited accidentally, or were navigational dead-ends. Technical staff would need to see which pages were generating errors for visitors, and which were too large or taking too long to load. Information architects and SEO staff would evaluate the URLs, seeing how the site was indexed and read by machines (site crawlers, indexing routines, and screen readers), and ensuring that all content was translated equally into all supported languages.

Every one of those persons needed insights from the log files, but some of the information contained therein was considered personal data and could reasonably be used to positively identify a specific person (which would violate their expectations of privacy). Except for the singular case of resolving technical support issues, none of the staff needed access to information classified as Restricted Data (IP address, location data, date and time of request, authentication, usernames, and even some referral information). So the challenge for the architects was determining the most efficient method of surfacing the required information without revealing the sensitive data. Here are some heuristics we developed to ensure that we didn’t inadvertently break any rules, violate user privacy, or even display or use information that we shouldn’t.

The first and most obvious option is not to store or otherwise persist any data if it is not going to be used or should not be used. Next would be retaining data that can be stored, but should not be viewable by all persons with access. Third would be masking any sensitive information when displaying records to those authorized to view portions of the data. Fourth would be preventing access to the data by unauthorized parties. And fifth would be removing the data when its retention period had expired or the data subject had requested its removal. Let’s examine each of these rules of thumb in turn:

  • Keep only the data you need. The next topic to be covered in this chapter section will be data retention strategies for the edge. This topic will address how to categorize your data and then determine rules for each category.
  • Restrict access to your data. This requires data policies and enforcement solutions to be implemented as discussed in the preceding Data storage and management section.
  • Data access rules should be granular. The solutions that display data should have filtering solutions in place that know each viewer and what data they are or are not authorized to view. The presentation of sensitive data should then be blocked or masked when it should not be viewed in that context.
  • Actively prevent some data access. This may mean having your data access solution return an error message when access should be prevented, or blocking access at a higher level in the application stack.
  • Prune your data. Don’t assume that data is immutable, given that some records will need to be removed at a time short of the data retention limit. Always ensure that records marked for removal can either be removed in an acceptable amount of time or that they can be dereferenced and not otherwise retrieved.

However, there are times when a change in the way you use your data can remove the complexity the preceding rules of thumb require. If you were able to modify the data that you collect before using and storing it so that all restricted data is replaced with equivalent fictional data that would give statistically equivalent results in the aggregate, then many data access and restriction rules could potentially be relaxed. This would also result in your data management overhead being proportionately reduced. This type of replacement data is termed synthetic data.

Synthetic data can be used to replace usage data on the whole but not individual personal or account records. It may also have the potential to reduce the overall amount of data that needs to be retained. However, you will still need to have active data retention processes and governance in place for your data as a whole. Let’s look at those considerations now.

A connected car expert recently said that when roughly half of the billion cars on the road today are comprised of connected cars, they will generate 30 zettabytes of data a year. How much of that data is analyzed, or even needed?

You can classify data in many ways, depending on your vocation, industry, or practices. In data science, data is classified based on what is known about it:

  • Context-based: When aspects of its creation are known and affect the data
  • Content-based: When the contents of the data affect the category it is assigned to
  • User-based: When a human labeling the data determines its usage

Data comes in two forms: structured and unstructured. Structured data is organized to fit a data schema or model, and unstructured data is not. Management of data in storage systems categorizes data by its retention needs: short-term data, long-term data, and useless data. Compliance and security professionals also label (classify) data as one of the following five types: restricted, confidential, internal-only, private, and public.

Unlike data science classification, data on the regional and user edge falls into one of two types: system data and user data. System, or operational, data can be used to configure and operate architectural elements. System data is structured and persisted as needed. User, or generated, data is created or captured by edge devices. User data can be structured (temperature readings) or unstructured (acoustic monitoring). See Figure 6*.1* for strategies on deciding how to manage edge data.

Figure 6.1 - Thinking about data retention at the edge by data origin and usage

Based on the preceding chart, if data is not used to configure or operate solutions, is not processed for a business intelligence purpose, and is not required to be retained, then you might not need to store the data after initial processing is complete.

Next, let’s discuss how edge data can be used for model generation and training, and strategies for model-based inferencing on the user and regional edges.

Using data to build machine learning (ML) models

Section titled “Using data to build machine learning (ML) models”

In this section, you will read about techniques for efficient (re)training, inferencing, deployment, and customizing ML models. We will also discuss what has prevented high levels of demand from being met, and what is being done to resolve that.

Before we dive into the topic, it’s appropriate to briefly review Artificial Intelligence (AI) and what distinguishes it from ML and Deep Learning (DL). IBM describes AI as “ leverage[ing] computers and machines to mimic the problem-solving and decision-making capabilities of the human mind.” See “ What is Artificial Intelligence (AI)?” in the Suggested pre-reading material section at the beginning of the chapter for a deeper explanation and some background history. ML is a branch of AI and a component of the field of data science that uses data and algorithms to imitate the way we believe human brains acquire knowledge. ML typically uses structured or labeled data and human intervention (supervised learning) to learn and make predictions (infer a result). DL consumes large amounts of unstructured data and may not need supervised learning to create useful models. Both ML and DL models typically cover a single domain of knowledge and are thus highly specific to one type of task.

Three factors that delay or prevent widespread adoption of ML-powered automation include long training times and the cost, steep learning curves and limited expert availability, and big resource requirements using expensive Graphical Processing Unit (GPU) hardware for inferencing using the models. Every advance made that addresses those factors has the potential to make these tools less expensive to operate and thus more profitable to use, enabling employees to be more productive by accomplishing more tasks with greater accuracy in less time.

Foundation models, unlike ML and DL models, are trained on very large sets of data, which are usually unlabeled. The resulting models can then be fine-tuned for many different (but related) purposes, unlike single-purpose ML and DL models. This can make foundation models more efficient and quicker to initially build, but also to repurpose for other tasks.

The promise is that instead of groups of humans curating large amounts of source data and then spending weeks or longer training ML or DL models just to solve a specific problem, an enterprise can use fewer people to train a single foundation model and then fine-tune it to solve many problems. To shorten the process even further, an organization could start with an existing foundation model from a trusted source and only add the needed fine-tuning for its specific purpose. Thus, leveraging foundation models requires fewer persons and can reduce the time to value for a business from weeks to days.

The trade-off with foundation models is that they are so large that they need to be run in a cloud environment or large data center. Conversely, some ML models can be optimized to run on single machines or even highly constrained devices. Therefore, ML models could be deployable to the user edge, while DL models might be deployable to the service provider edge.

Additionally, using federated learning techniques allows multiple data sources (such as distributed data, for example) to be used to train a single deep learning model. This horizontal federated learning approach works by having each data source trained on its local data using a single shared model, and then sending the results back to the original model source (usually in the cloud). This can be more efficient and faster than sending the data to the source for training.

How small and efficient can we make models?

Section titled “How small and efficient can we make models?”

While there is plenty of demand for the usage of ML to perform repetitive tasks and surface insights as close to where the data originates as possible, there are several factors preventing this. First is the availability of GPUs and other accelerators. Second is the cost of purchasing and operating that hardware. And third is the lack of general-purpose tools that will customize and train the ML models as close to where they are needed as is practical. Fortunately, teams are actively working to solve all of these challenges.

At the time of writing this chapter, a new article was just posted showing how MIT, IBM, and researchers in China just created a new technique named EfficientViT for semantic segmentation (object detection) that improves performance over traditional approaches nine-fold. They anticipate that this innovation will allow near real-time object detection locally with improved accuracy on constrained edge devices. Solutions like this one will affect both cost and availability at the edge by more efficiently utilizing existing hardware.

Just this year, it has become common to see single-purpose ML models no larger than a few hundred megabytes (MBs) in size created to run on inexpensive microcontrollers, which are not typically thought of as capable of running these workloads. Factories are now using inexpensive consumer-grade mobile phones, instead of specialized hardware, to run visual inspection tasks using ML models less than a gigabyte (GB) in size and optimized for the onboard GPU.

Customizing existing models for each deployment

Section titled “Customizing existing models for each deployment”

When determining the optimum parameters to consider when evaluating a model, you should consider the factors of size (as it impacts both storage and deployment speed), (re)training cost, operating cost, and the inference speed of the model when matching to the desired hardware it will run on. Your KPIs should be used to assign the appropriate weights to each category. For example, if your primary concern is operating cost and the speed of inferencing isn’t critical, then it’s acceptable to weigh operating efficiency much higher than performance.

Just as important are the types of models that the GPU or other accelerators support. If there is any incompatibility, the inferencing environment will likely fall back to using the CPU, which will incur a significant performance penalty. Even slight differences in how a model was created, including quantizing methods, could affect the performance, so careful attention to model creation parameters should be prioritized. Given the heterogeneous nature of hardware on the edge, it is likely that there will be incompatibilities.

Thirdly, choose a model deployment solution that can deliver model assets to the consuming edge node. This will both guarantee confirmation of artifact delivery to the endpoint and also allow the deployment solution to communicate attributes of the edge node including GPU type, available storage space, and computing power to the delivery pipeline so that accurate placement decisions can be made. This type of model deployment solution is a good example of a general-purpose platform, which is our next topic.

Using general-purpose platforms rather than single-purpose applications

Section titled “Using general-purpose platforms rather than single-purpose applications”

When decision-makers set out to use their data to build ML models (especially for edge-based operations), they are usually being tactical and attempting to either solve a single problem or a class of related problems. Starting the evaluation process with constraints like these limits the potential range of solutions being considered to a set of competing single-purpose applications. In fact, considering an application to solve the particular problem at hand is the typical knee-jerk reaction. Instead, we’d like to propose an alternative course of action.

On a recent community call discussing the Open Retail Reference Architecture (ORRA), I heard an insight delivered in an off-hand manner that got my attention. Kristen Call, senior industry advisor at Intel Corporation, while discussing the value of edge-based platforms, said: “Don’t buy a purpose-built solution. Your data is the solution, build on it.” Her point was that it is easy to find a single tool that solves a particular problem, but that is the end of the value that it provides. Each application installed consumes finite resources on edge computing nodes (devices and clusters) and must be carefully considered. A question each architect should ask is: “Does this tool provide value for more than just this one solution”?

Solutions should not be siloed, and potential derived insights should not be lost. But if a store were running a general-purpose edge computing platform that enabled sensor fusion, it could export insights and generate business rules dynamically in a way that provides value to both the store and the shopper in a manner that no single application could.

For example, if on one trip to your grocery store, you were to purchase three items – steak, corn, and beer – the platform could store that information and note that those three items were purchased together by a shopper. One insight could be that they might be preparing to cook out. Another could be recommendations that in similar situations, other shoppers also purchased napkins, single-use tableware, condiments, tablecloths, and dinner candles. A third would be matching to current store specials and promoting those related items. If the shopper had the store application installed on their phone, it could push those recommendations to the shopper when they make a shopping list or when they enter the store or approach the checkout.

The point of the preceding scenario is that none of those would be possible if the purchase data were stored in a single application. Surfacing of the data insights would not be possible without a general-purpose platform. Using the insights to create solutions is a lot simpler with the tools a platform provides when compared to the cost and maintenance of integrating single-purpose solutions – if their interfaces even enable that. Ultimately, a platform that enables innovation, especially if it provides a low-code or no-code interface, provides a flexible foundation while at the same time promoting efficient use of edge computing resources on-premises.

Since we’ve now mooted that your data is the solution, let’s move on to discussing how to optimally access that data while minimizing its movement.

In this section, we cover issues related to data at rest and in motion, specifically from the perspective of edge computing, data virtualization and the edge, and transparent progressive failover starting at the edge and moving cloudward. You will learn about various options available to edge computing architectures that will assist in automating data management, placement, and migration capabilities.

Optimizing data availability without connectivity

Section titled “Optimizing data availability without connectivity”

Part and parcel of manipulating and storing data is the movement of data, which necessarily includes connectivity. But what if that connectivity is not available, is intermittent, or is slow with low throughput and high latency? How can you ensure that all local data is available to all services and applications that can access it even while remote data is not?

One technique to consider is using a data virtualization solution that can access local data in any format and allow SQL-like querying of structured and unstructured data. While that data could be persisted in an object store, it does not have to be. There are several solutions available that implement data virtualization and querying functionality like this.

Another technique would be to ensure that all functionality is available without an internet connection. In Chapter 3 ’s Disconnected operation section, we touched on the AgriRegio Projekt’s “offline-first principle.” Let’s examine that in more detail and look at the impact on and considerations for data collection and transfer as a best practice approach. See Figure 6*.2* for an overview of the farm deployment.

Figure 6.2 - How the farm box (Hofbox) manages data without the internet

On the typical small farm under consideration (less than five acres on average), there will be sensors deployed to measure moisture, sunlight, and water depth in a stream, capture images, and so on. These sensors will be placed semi-permanently (moved fewer than 13 times a year), permanently, or temporarily. They collect data measurements at rates ranging from once a minute to once a day. These sensors should be able to store or buffer that data for a limited amount of time – usually, not more than a week’s worth of data before potential data loss occurs.

The data that is captured is the property of the farm owner and should be controlled by the owner. The farm owner’s dwelling would contain an edge gateway server named the Hofbox that would be the central storage, processing, and reporting location for all collected data. We anticipate that data will be transferred from the sensors to the Hofbox in one of three manners: direct transmission from sensors to server by Wi-Fi or LoRa, indirect transmission by network mesh (Wi-Fi, LoRa, Bluetooth), or manual transfer by connecting a mobile device to the sensor with USB to retrieve the data and then subsequently connecting the mobile to the server with Wi-Fi. Of note in the preceding scenarios is that no internet connection of any kind is needed to collect and transmit the data.

The data management is provided by containerized applications running on the farm server, which may include object recognition and other visual analytics aided by ML models. An internet connection would only be needed to transmit collected data to a regional hub if the farmer opted in, to install new applications, and to update existing applications and re-trained models. That internet connection would only need to be active during the transmission period.

This approach is possible when following edge-native architectural principles, as discussed in Chapter 1. For a more detailed discussion of thriving in situations with ambiguous connectivity, see Chapter 9.

Aggregating data versus keeping it distributed

Section titled “Aggregating data versus keeping it distributed”

When IoT devices first began to be connected to the internet, cloud- and data center-based central aggregation and processing of the data was best practice. This was because the resulting solution could be highly available and scalable, and could be relatively inexpensive to operate. At the time, there was no capability for any reasonable processing to happen outside of the cloud or regional data centers, and cloud-native development was still in its infancy.

Now, almost a decade since that time, two advancements have completely altered the solution landscape. The first change is the ability to generate insights from data streams in stages, at the source and then, optionally, regionally before consuming the results and/or aggregating in the cloud (if needed). The second change is the ability to virtualize and thus query the data where it is generated without transferring to, or aggregating the data at, a central location. This ability to extract value and insights directly from the data source simplifies solutions, delivers results faster, and reduces expenses dramatically.

This edge computing data virtualization revolution began with the GaianDB open source project. Since then, it has seen several iterations and subsequent expansions and improvements. Other organizations have combined that approach with additive innovations such as ad hoc P2P network underlays and embedded device support.

We are now at the point where IoT routers and IoT hubs (see Chapter 3 for a detailed discussion on these elements) are now largely obsolete as data on fixed-function devices can be injected directly into a data virtualization solution at the source and immediately queried from any edge or cloud node. This is a drastic simplification over the former process of legacy protocol support, data ingestion into an IoT platform, data transformation, message queueing, transport, and finally, importing into a database to be queried. And yet, data virtualization has yet to be widely adopted, and there are few enterprise-grade solutions available that stretch from the cloud to the edge. We expect a sea change in this regard within the next few years as architects recommend, and CXOs embrace, this approach to upgrade, modernize, and automate existing solutions.

One other reason not to keep data distributed in the past was the need to aggregate data in a single location for training machine learning models. Using federated learning techniques to incrementally and independently train models has now eliminated another objection to keeping data distributed.

As stated earlier in the chapter, when looking for solutions, prefer a general-purpose platform or tool over a single-purpose application (off-the-shelf or homegrown) since it will provide more flexibility with less maintenance. And if that general solution adheres to open or industry standards, so much the better. We’ve covered querying and streaming data records, both locally and remotely. Now it’s time to turn our attention to data files.

A typical challenge when accessing files locally on edge devices is determining when and how to archive the files, where to put them when archiving so that it does not take too long to retrieve them nor incur excessive or unbudgeted costs in doing so, and how to access them later without knowing deterministically where to look for them. Let’s examine those issues one at a time.

Automatically archiving files on a schedule when they pass a certain age threshold since creation, or when the filesystem volume passes a pre-specified percentage full, is a technique typically used. This approach can work when files are added in a predictable manner, provided that the process doesn’t fail silently. However, it is not adequate when new files are added between scheduled times. Most tools also do not intercept attempted writes and force a cleanup/archiving routine while pausing the write until the cleanup operation is complete. Conventional methods completely fail if the file is larger than the target storage volume.

Determining where to put the files is an issue when you have multiple potential destinations, such as hot, warm, and cold storage options, regional storage options, and multiple cloud vendors with variable pricing.

Knowing where files are currently located would require following a specified formula, using a global lookup mechanism, or trying each location sequentially while falling back when not found. Each one of these options can incur a latency penalty and require complex configuration and maintenance.

Thus, the best practice approach would be to use a general-purpose edge-native unified storage solution that stores files locally, regionally, and globally (example: Nexoedge https://lfedge.org/projects/nexoedge/). This solution would need to function as a proxy on the edge nodes and allow local file operations to act on the files no matter where they are currently stored. The solution would need to move files in the background as they are accessed more or less frequently, and as space, connectivity, and costs allow.

In this chapter, we covered the states of data at rest, data in motion, and data in processing. You have learned about how, when, and why to encrypt data, including the ability to perform operations on the data without decrypting it using fully homomorphic encryption. You were introduced to the idea of data trustworthiness using a data confidence fabric, which can be implemented on the least powerful machines on the user edge where data is born.

You learned about data storage and management approaches, including data governance, policies, and enforcement, as well as ways to simplify management and lower costs with synthetic data. You were also introduced to a way of thinking about data retention on the edge that will lead to simplified decisions.

We also covered how to optimize machine learning models for the edge. This could include using foundation models to simplify and speed up training. And we touched on model federation. We discussed the benefit of general-purpose platforms over single-purpose applications.

Then, we talked about how connectivity affects data collection and usage. We gave an example of how to use edge-native architecture principles to ensure constant access to data by decision-makers. We showed how data does not need to be aggregated northward but can be queried as needed while keeping it distributed. We also touched on ways to migrate data and files automatically.

In the next chapter, we’ll discuss how to efficiently put these lessons into practice by automating (almost) everything.