O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Industrial Internet Application Development

Book Description

Your one-stop guide to designing, building, managing, and operating Industrial Internet of Things (IIoT) applications

Key Features

  • Build IIoT applications and deploy them on Platform as a Service (PaaS)
  • Learn data analytics techniques in IIoT using Spark and TensorFlow
  • Understand and combine Predix services to accelerate your development

Book Description

The Industrial Internet refers to the integration of complex physical machines with networked sensors and software. The current growth in the number of sensors deployed in heavy machinery and industrial equipment will lead to an exponential increase in data being captured that needs to be analyzed for predictive analytics. This also opens up a new avenue for developers who want to build exciting industrial applications.

Industrial Internet Application Development serves as a one-stop guide for software professionals wanting to design, build, manage, and operate IIoT applications. You will develop your first IIoT application and understand its deployment and security considerations, followed by running through the deployment of IIoT applications on the Predix platform. Once you have got to grips with what IIoT is, you will move on to exploring Edge Development along with the analytics portions of the IIoT stack. All this will help you identify key elements of the development framework, and understand their importance when considering the overall architecture and design considerations for IIoT applications. By the end of this book, you will have grasped how to deploy IIoT applications on the Predix platform, as well as incorporate best practices for making fault-tolerant and reliable IIoT systems.

What you will learn

  • Connect prototype devices to CloudStore data in IIoT applications
  • Explore data management techniques and implementation
  • Study IIoT applications analytics using Spark ML and TensorFlow
  • Deploy analytics and visualize the outcomes as Alerts
  • Understand continuous deployment using Docker and Cloud Foundry
  • Make your applications fault-tolerant and monitor them with New Relic
  • Understand IIoT platform architecture and implement IIoT applications on the platform

Who this book is for

This book is intended for software developers, architects, product managers, and executives keen to gain insights into Industrial Internet development. A basic knowledge of any popular programming language such as Python will be helpful.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Industrial Internet Application Development
  3. Packt Upsell
    1. Why subscribe?
    2. Packt.com
  4. Contributors
    1. About the authors
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. IIoT Fundamentals and Components
    1. IIoT fundamentals and components
      1. Impact of the IoT
      2. Overview of the IoT technology components
      3. IoT business models
        1. How the IoT changes business models
      4. IIoT use cases
        1. Healthcare
        2. Manufacturing 
        3. Aviation (quality control)
    2. Summary
  7. IIoT Application Architecture and Design
    1. IIoT applications – an introduction 
      1. The challenges of building an IIoT application
    2. IIoT system architecture
      1. Tier 1 – IIoT machines and sensors
      2. Tier 2 – Edge Gateway and cloud connectivity 
        1. Edge Gateway 
        2. Cloud Connectivity 
          1. MQTT Communication
          2. WebSocket communication 
          3. MQTT over WebSockets
          4. Event/Message hub-based connectivity
      3. Tier 3 - Cloud (IIoT application, data, and analytics)
        1. Microservice-based application design for IIoT cloud applications
          1. Platform as a Service (PaaS) 
          2. Overview of Cloud Foundry
          3. The Hello world application using Cloud Foundry 
        2. Data design for IIoT applications 
          1. Data ingestion
          2. Timeseries/telemetry data
          3. The in-memory, Blob, and OLTP data stores 
        3. Analytics for IIoT 
          1. Descriptive analytics – insight into device health
          2. Predictive analytics - understanding the future failure modes of the device
          3. Prescriptive analytics: advice on possible outcomes
    3. The anatomy of our first IIoT application 
      1. Edge Gateway triggering alerts
      2. Cloud connectivity using WebSockets 
      3. Cloud microservices aggregating the alerts 
    4. IIoT/IoT platforms overview
      1. Predix IIoT architecture
      2. AWS IoT application architecture
      3. Google IoT application architecture 
    5. Summary
  8. IIoT Edge Development
    1. Hardware for prototypes
      1. Variety and cost
      2. Modifications
      3. Comparing options
      4. Supported sensors
      5. Choosing hardware
      6. Community
      7. Choosing a data exchange protocol
    2. Application-level protocols – HTTP
      1. Assembling a device
      2. Preparing an SD card
      3. Running a sensor application on an RPi
      4. Running a receiver application on a PC
    3. Application-level protocols – WebSocket
      1. Assembling a device
      2. Preparing an SD card
      3. Running a sensor application on an RPi
      4. Running a receiver application on a PC
    4. Industrial M2M protocols – Modbus
      1. Preparing an SD card
      2. Running a hub application on an RPi
      3. Running a simulator application on an RPi
      4. Running a receiver application on a PC
      5. Running a receiver application in Predix
    5. Industrial M2M protocols – OPC UA
      1. Preparing an SD card
      2.  Running a simulator application on an RPi
      3. Running a receiver application on a PC
      4. Running a receiver application in Predix
      5. Running a hub application on an RPi
      6. Getting statistics
    6. Data management options in Predix
      1. Asset
      2. Event Hub
      3. Time series
      4. Database as a Service
      5. Blobstore
      6. Message Queue
      7. Predix cache
      8. Predix Functions
      9. Predix Message Queue
      10. Predix-Search
      11. Predix Insights
      12. Predix Columnar Store
    7. Summary
  9. Data for IIoT
    1. Data for IIoT
      1. Challenges in handling IIoT data
      2. Data architecture for IIoT
      3. Technology stack to handle data for IIoT
      4. Best practices and standards
      5. Sample code and frameworks for handling data
    2. Summary
  10. Advanced Analytics for the IIoT
    1. IIoT business use cases and analytics
      1. Power plant performance using heat rate
      2. Manufacturing process
    2. IIoT analytics types 
      1. Reliable analytics
      2. Efficient analytics
      3. Profitable analytics
      4. Digital twins
      5. What-if – analysis and simulations
      6. Recommendation, notifications, and alarms
      7. Analytics catalog and market opportunity
    3. IIoT analytics – cloud and edge
      1. Cloud-based analytics
      2. Edge-based analytics
      3. Cloud and edge–analytics combined
    4. IIoT data for analytics
      1. Time series data
      2. Asset data
      3. Process, recipes, and steps
      4. Manufacturing Execution System (MES) data
    5. IIoT analytics – architecture
      1. Big data and analytics – technology stack
        1. Automation and cloud provisioning
      2. Big data and analytics – architecture
        1. Data ingestion
        2. Data streaming
        3. Data computing
        4. Data persistence
        5. Data search
        6. Applications 
      3. Analytics definition
      4. Streaming and batch analytics
      5. Event-driven analytics
      6. ETL pipelines 
      7. Analytics orchestration
    6. Advanced analytics – artificial intelligence, machine learning, and deep learning
      1. Building a model
        1. Exploratory data analysis
      2. Analytics life cycle
      3. Machine learning model life cycle
        1. Training a model
        2. Testing a model
        3. Validating a model
        4. Predictions using a model
        5. Retraining a model
      4. Model performance
        1. Hypertuning parameters, or the optimization of model parameters
        2. Model performance metrics
      5. Determining outliers and offset management
      6. Continuous training of a model
      7. ML pipelines and orchestration
        1. IIoT data
        2. ETL
        3. Feature extraction process
        4. Model generation process
        5. Storing the model
        6. Developing an ML pipeline
      8. IIoT data variety
        1. Spatial analytics
        2. Image analysis
        3. Acoustics – based analytics
      9. Machine learning types
        1. Supervised learning
        2. Unsupervised learning
      10. PMML for predictive analytics 
      11. Event – driven machine learning model 
        1. Event – driven model architecture 
      12. Building models in offline mode
        1. Reference architecture 
      13. Real-time model tuning and deployment
      14. Machine learning as a service
        1. Creating an ML model endpoint
          1. Step 1
          2. Step 2
          3. Step 3
      15. Containerization of machine learning models
        1. Legacy analytics and challenges
        2. Containerization for legacy analytics
        3. Data for legacy analytics
        4. Analytic Orchestration - Architecture
        5. Analytics orchestration
        6. Data flow
        7. Pros and cons of this approach
      16. Time series data-based analytics 
        1. Windows-based calculations
        2. Forecasting of time series data points 
      17. Developing a neural network using Keras and TensorFlow using Jupyter
        1. Environment setup
        2. Developing the neural network
      18. Developing an analytics for analyzing time series data using Spark
        1. Environment setup
        2. Creating a Spark-based Notebook and creating the Spark session
      19. Developing streaming analytics using Spark
        1. Environment setup
        2. Developing the streaming analytics
    7. Summary
  11. Developing Your First Application for IIoT
    1. Developing and modeling assets using the S95 standard
      1. ISA-95 control levels
      2. Exchange of asset data as represented in S95
    2. Selecting a storage
      1. Relational DBMS
      2. Key-value stores
      3. Advanced forms
      4. Document stores
      5. Graph DBMS
      6. Time series DBMS
      7. RDF stores
      8. Object-oriented DBMS
      9. Search engines
      10. MultiValue DBMS
      11. Wide column stores
      12. Native XML DBMS
      13. Content stores
      14. Event stores
      15. Navigational DBMS
      16. Blockchain
      17. Important considerations
    3. Time series storage
      1. Using InfluxDB as a time series storage
    4. Creating instances of assets and adding time series data
    5. Understanding the analytics
      1. Exploring descriptive analytics with InfluxDB
        1. Example – count the field values associated with a field key
        2. Example – calculate the mean field value associated with a field key
    6. Deploying your first analytics
      1. Examples of queries with InfluxDB analytical functions
        1. Example – select all fields and tags from a single measurement
        2. Example – group query results by a single tag
      2. Running a query
    7. Visualizing time series data and charts
      1. Visualizing time series data with Highcharts
      2. Visualizing time series data with Grafana
        1. Grafana building blocks
        2. Running Grafana
        3. Configuring a Grafana visualization
        4. Graph panel
    8. Visualizing the outcomes of the analytics as alerts
      1. Configuring email notifications
      2. Configuring notifications via Slack
      3. Configuring alerts in Grafana
    9. Summary
  12. Deployment, Scale, and Security
    1. IIoT security practices
      1. Key principles of securing IIoT applications
        1. Phase 1 – third-party and architecture risk assessments
        2. Phase 2 – technical security assessments
          1. Static analysis security testing (SAST)
          2. Dynamic analysis security testing (DAST)
          3. Open source scans
        3. Phase 3 – secure by design
        4. Phase 4 – penetration testing
      2. IIoT device security design and architecture
        1. IIoT device and IIoT device management
        2. IIoT device communication and privacy controls
          1. IIoT device communication and encryption
          2. IIoT device user privacy controls
        3. IIoT device placement in the network
      3. IIoT Gateway security principles
        1. TPM
        2. TEE
        3. IIoT Gateway network security
        4. IIoT Gateway authentication
      4. IIoT cloud security architecture and design
        1. IIoT API security
        2. IIoT access control 
        3. IIoT identity store
        4. IIoT security analytics
    2. IIoT application deployment
    3. IIoT applications at scale
      1. Capacity planning
      2. Testing for load/performance
      3. Measure and identify bottlenecks
      4. Scale individual components
        1. X-scaling or horizontal duplication
        2. Y-axis scaling
        3. Z-axis scaling
    4. Summary
  13. Reliability, Fault Tolerance, and Monitoring IIoT Applications
    1. Complexity of an IIoT system
    2. Art of building reliable and resilient IIoT applications
      1. Designing for reliability on the cloud
        1. Programming for network latency using the circuit breaker pattern
          1. Issues and considerations
          2. When to use this pattern
          3. Example
        2. Handling for bandwidth constraints and transport costs using the API Gateway pattern
          1. Issues and considerations
          2. When to use this pattern
          3. Example
        3. Enabling discoverability of the microservices to handle topology changes using Eureka
          1. Issues and considerations
          2. When to use this pattern
          3. Example
    3. The art of building a fault-tolerant IIoT device and edge gateway
      1. Designing for reliability at the sensors and devices
        1. Challenges in building reliable connectivity for devices in industrial environments
        2. Designing for reliable communication
      2. Designing for reliability at the gateway
    4. Monitoring IIoT applications (edge and cloud)
      1. Monitoring IoT services on the cloud
        1. Monitoring microservices using health endpoints
        2. Example using Spring Actuator
      2. Monitoring IoT devices and gateway strategies
        1. IoT device management and provisioning strategies
          1. Device onboarding and discovery
        2. IoT device monitoring and control strategy
    5. Summary
  14. Implementing IIoT Applications with Predix
    1. Basics of asset modeling with the Asset service
      1. The Asset service in detail
      2. An example of a classification object
    2. Developing your first asset model with GE's Predix
      1. Creating an instance of the Asset service
      2. Binding an Asset service instance to your application
      3. Enabling a UAA client to use the Asset service
    3. Creating instances of assets
      1. Adding an asset to the Asset service
      2. Introducing changes to an asset
      3. Viewing an asset
      4. Deleting an asset
      5. Additional capabilities of the Asset service
    4. Adding Predix time series data to assets
      1. Building an app to read time series data
      2. Creating an instance of the Time Series service
      3. Enabling an app to send data to the Time Series service
      4. Validating data ingestion
    5. Deploying your first GE Predix analytics
      1. The Analytics Framework service
      2. Creating an instance of the Analytics Framework service
      3. Binding an instance of the Analytics Framework service to your application
      4. Building an analytical application to work with Analytics Framework
      5. Creating tests for an analytical application
      6. Adding the analytical app to the Analytics Catalog
      7. Validating, testing, and deploying an analytical app
      8. Executing the analytical application
    6. Advanced visualization using GE's Predix web components
      1. Predix Design System
      2. Building a web application
      3. Creating an instance of the Views service
      4. Adding and managing UI elements with the Views service
      5. Creating a card
      6. Creating a deck
      7. Linking a card to a deck
      8. Displaying a multicard deck
      9. Adding more UI components to the created web application
    7. Summary
  15. Best Practices for IIoT Applications
    1. Best practices for API development
      1. The API endpoint should be descriptive
        1. Getting the list of devices
        2. Adding a new device
        3. Updating the attributes of an existing device
        4. Deleting a device
    2. Sorting, filtering, searching, and versioning
      1. Sorting of devices by name
      2. Filtering attributes of the device
      3. Searching given an input
      4. Versioning and documentation
    3. The power of polyglot programming
      1. Eventual consistency for higher performance
    4. Strategies to handle multiple versions of the @scale application 
      1. Blue-Green deployment
      2. DB migration best practices 
      3. The advantages of using established trust between microservices
      4. Client Credentials Grant flow
      5. UX strategy for application adoption
      6. Tracing and logging end to end
      7. Application logs
        1. Tracing of application logs
      8. Runtime logs
      9. Platform logs
      10. Logging architecture guidelines
    5. Summary
  16. Future Direction of the IIoT
    1. Introduction
      1. Emerging use cases
      2. IoT industry standards and their evolution
      3. IIoT security challenges and opportunities
      4. Blockchain for the IoT
      5. Machine learning and the IoT
        1. IoT data types
        2. Future IoT applications
        3. IoT data analytics algorithms
        4. A use case highlighting these three problems
      6. The IIoT landscape and market direction
        1. The industrial IoT – from horizontal platforms to vertical AI-powered solutions
        2. IoT connectivity – key infrastructure progress
        3. Cloud for the IoT
        4. Edge computing for the IoT
    2. Summary
  17. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think