Preface

The Internet of Things (IoT) has transformed how businesses think about and interact with the world. Sensors can measure the performance of high-volume industrial manufacturing operations or the daily environmental health of a remote island. The IoT makes it possible to study the world at various levels of precision and enable data-driven decision making anywhere. Machine learning (ML) and Elastic cloud computing have accelerated our ability to understand and analyze the huge amount of data generated by the IoT. With edge computing, data analytics and ML models can process information locally at the source where the data is generated.

This book will teach you to combine the technologies of edge computing and machine learning to deliver next-generation cyber-physical outcomes. You'll begin by discovering how to create software applications that run on edge devices using software from Amazon Web Services, such as AWS IoT Greengrass. As you advance, you'll learn how to process and stream IoT data from the edge to the cloud and use it to train ML models using Amazon SageMaker. The book also shows you how to optimize these models and run them at the edge for optimal performance, cost savings, and data compliance.

By the end of this book, you'll be able to scope your own IoT workloads, bring the power of machine learning to the edge, and operate those workloads in a production setting.

Who this book is for

This book is for IoT architects and software engineers responsible for delivering analytical and machine learning-backed software solutions to the edge. Amazon Web Services users who want to learn and build IoT solutions will find this book useful. Intermediate experience with running Python software on Linux is required to make the most of this book.

What this book covers

Chapter 1, Introduction to the Data-Driven Edge with Machine Learning, introduces concepts such as the edge and how machine learning has a unique value when run at the edge. It provides a high-level overview of use cases in consumer and industrial settings. It sets the context for the fictional scenario that will guide hands-on activities for the book.

Chapter 2, Foundations of Edge Workloads, provides an overview of key considerations for designing edge solutions and includes an introduction to the use of AWS IoT Greengrass.

Chapter 3, Building the Edge, dives into next-level details of building edge solutions through the more advanced use of AWS IoT Greengrass to author software components for your business logic.

Chapter 4, Extending the Cloud to the Edge, introduces how to build edge solutions with native cloud connectivity and deploy software to remote devices over the internet. It also introduces software components provided by AWS for abstracting away common needs for edge functionality.

Chapter 5, Ingesting and Streaming Data from the Edge, introduces how to perform data modeling for IoT workloads and why it's important. It also introduces various architectural patterns and anti-patterns for collecting, ingesting, and processing data streams on the edge.

Chapter 6, Processing and Consuming Data on the Cloud, explains how the integration of IoT with big data technologies enables high-volume complex data processing in the cloud. It also dives deeper into how to extend the data processing design patterns from the edge to the cloud to unblock advanced use cases.

Chapter 7, Machine Learning Workloads at the Edge, introduces the concepts of machine learning in the context of IoT workloads. It also dives deeper into the different phases of machine learning workflow along with applicable design patterns and anti-patterns.

Chapter 8, DevOps and MLOps for the Edge, explains how the concepts of DevOps and MLops can be leveraged for IoT workloads to enable agile development practices from the cloud to the edge.

Chapter 9, Fleet Management at Scale, introduces the concepts of fleet management using cloud-native IoT toolchains. It also dives deeper into the different scenarios and mechanisms applicable for onboarding IoT devices at scale in the real world.

Chapter 10, Reviewing the Solution with AWS Well-Architected Framework, concludes the book with a synopsis of key lessons and steps in terms of how to approach reviewing a solution's design with a multi-faceted review framework from AWS. It also offers ideas on the next steps for IoT architects to take given the lessons learned from this book.

To get the most out of this book

You will need a personal computer running Windows, macOS, or Linux. This computer uses the AWS Command Line Interface in a terminal and the AWS Management Console through a web browser. A second, Linux-based system acts as the edge device and hosts the edge solution running AWS IoT Greengrass. This second system can be a local or remote virtual machine or an actual device like a Raspberry Pi. For the real IoT experience, we recommend using a Raspberry Pi 3B (or later) with a SenseHAT expansion board to complete the hands-on portions of the book. If you do not have a hardware device, you can use an Ubuntu Linux virtual machine instead. Ultimately, you can finish all hands-on steps with or without a second device.

The use of AWS for cloud-based services does incur a small cost. You will need access to an AWS account or create one yourself. Completion of all hands-on sections can accrue billing up to $25 US Dollars (USD). You can opt out of the ML training steps to reduce the cost to less than $5.

At the time of authoring, AWS IoT Greengrass v2 did not support Windows installation. The hands-on portions related to the edge solution are specific to Linux and do not run on Windows.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book's GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Intelligent-Workloads-at-the-Edge. If there's an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here:

https://static.packt-cdn.com/downloads/9781801811781_ColorImages.pdf

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "To use Amazon SageMaker Debugger, you must enhance Estimator with three additional configuration parameters: DebuggerHookConfig, Rules, and ProfilerConfig."

A block of code is set as follows:

#Feature group name

weather_feature_group_name_offline = 'weather-feature-group-offline' + strftime('%d-%H-%M-%S', gmtime())

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

@smp.step

def train_step(model, data, target):

       output = model(data)

       long_target = target.long()

       loss = F.nll_loss(output, long_target, reduction="mean")

       model.backward(loss)

       return output, loss

    return output, loss

Any command-line input or output is written as follows:

$ git clone PacktPublishing/Intelligent-Workloads-at-the-Edge-

Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: Keep in mind that when you use multiple instances in the training cluster, all instances should be in the same Availability Zone.

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read Intelligent Workloads at the Edge, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset