From cloud to edge: Why cloud-native application development matters in supporting IoT
David Bericat Erik Jacobs Chief Architect Data Analytics (AI/ML) • Edge • IoT Principal Technical Marketing Manager, OpenShift Global Partner Solutions Cloud Platforms BU Red Hat Red Hat
Thursday May 9th THE INTERNET IS ALL THINGS YOU SIMPLY DON’T REALIZE IT YET... AGENDA
● What has Red Hat been doing in IoT
● From IoT to end-to-end Analytics (AI/ML) to Edge computing
● Red Hat’s next generation cloud-computing development
● Dreaming exercise: serverless & FaaS at the “edge” RED HAT’S IoT STRATEGY OVERVIEW
● Customers use our parts of our portfolio in a variety of ways to address IoT challenges on a hybrid cloud infrastructure.
● We do not claim to provide an IoT platform. We work with our commercial partner ecosystem to define more complete solutions and bring them to market.
● We take a leadership role in open source communities to build IoT technology.
Cloud Partner Open Ecosystem Source KEY FUNCTIONALITY FOR AN END-TO-END IoT ARCHITECTURE
Device Management Intelligent Edge Processing Advanced Analytics Business & Application & Connectivity & Analytics & Machine Learning Integration Securely connect, authenticate Apply analytics at the edge with Centralize IoT data processing, Enable integration with enterprise and and manage disparate machine learning and business rules analytics and machine learning business applications to bridge the connected devices that speak to enable local, low-latency decision to enable deep business insights and gap between OT and IT different protocols making actionable intelligence and reduce complexity
End-to-End Security & Compliance Tools to enable end-to-end data security, compliance, authorization and authentication OPEN END-TO-END IoT ARCHITECTURE INTEGRATING OT, IT , DATA MANAGEMENT, ANALYTICS &, APPLICATIONS
IoT IoT APPLICATION DEVELOPMENT, EDGE INTEGRATION HUB DELIVERY, & INTEGRATION
Cloud-native Traditional DATA MANAGEMENT & apps apps ANALYTICS PLATFORM
• Modular, secure, end-to-end architecture • Streaming analytics and machine learning public, private, hybrid cloud • Open, interoperable on hybrid cloud • Modern application development and agile integration END-TO-END ANALYTICS PUSHING AI/ML FROM CORE TO EDGE
Protocol Intelligent Translation Filtering Aggregation Routing APPLICATION DEVELOPMENT, CONNECTED IoT IoT DELIVERY, & INTEGRATION “THINGS” EDGE INTEGRATION HUB
Application Integration Cloud-native Traditional apps apps Application Telemetry Data Data
Real-Time Data ML Model Data Ingest Deep data Processing Storage analysis & Machine Data Actions Machine Real-Time Learning Analytics Security insights ML Model Learning Prediction / Alert DATA MANAGEMENT & ANALYTICS PLATFORM FUNCTIONALITY OVERVIEW
CONNECTED IoT IoT APPLICATION DEVELOPMENT, “THINGS” EDGE INTEGRATION HUB DELIVERY, & INTEGRATION App Cloud-native applications Traditional applications integration Developer ERP services IOT INTEGRATION Integration FRAMEWORK Management Orchestration & CRM IOT EDGE API mgmt FRAMEWORK Device DevOps DBs Field Telemetry management connectivity Device Telemetry connectivity CONTAINER-BASED Cloud APPLICATION PLATFORM connectivity Edge Data analytics Edge integration applications Machine DATA MANAGEMENT & ANALYTICS learning Management Telemetry CONTAINER-BASED Data Data APPLICATION PLATFORM engineering warehouse Security & Operational Data science governance database Machine Storage learning Machine learning model Services ENTERPRISE DATA HUB HOW RED HAT PORTFOLIO CAN HELP
CONNECTED IoT IoT APPLICATION DEVELOPMENT, “THINGS” EDGE INTEGRATION HUB DELIVERY, & INTEGRATION App integration
Apps Management
Edge Telemetry analytics Telemetry Machine learning
Management LINUX Telemetry
Machine learning model DATA MANAGEMENT & ANALYTICS AGILE INTEGRATION STANDARDIZING THE “WILD, WILD WEST”
CONNECTED IoT IoT APPLICATION DEVELOPMENT, “THINGS” EDGE INTEGRATION HUB DELIVERY, & INTEGRATION
Cloud-native Traditional MQTT applications applications Telemetry HTTP Integration AMQP & 1.0 API mgmt LoRaWAN Commands
CoAP CONTAINER-BASED APPLICATION PLATFORM Device Registry DATA MANAGEMENT & ANALYTICS PLATFORM
public, private, hybrid cloud AGILE INTEGRATION STANDARDIZING THE “WILD, WILD WEST”
CONNECTED IoT IoT APPLICATION DEVELOPMENT, “THINGS” EDGE INTEGRATION HUB DELIVERY, & INTEGRATION
Cloud-native Traditional applications applications MQTT Interconnect Integration & HTTP API mgmt
LoRaWAN Broker CONTAINER-BASED APPLICATION PLATFORM CoAP Streams Device Registry PORTABILITY ACROSS ANY INFRASTRUCTURE
CONNECTED IoT IoT DATA MANAGEMENT & “THINGS” EDGE INTEGRATION HUB ANALYTICS PLATFORM
Telemetry
• Linux containers • Kubernetes-based orchestration • Deployment flexibility Management • Automation • Scalability • Persistent storage Container Container Container Container Container
IoT Services IoT Services IoT Services IoT Services IoT Services
OS dependencies OS dependencies OS dependencies OS dependencies OS dependencies
RHEL RHEL RHEL RHEL RHEL Guest VM Virtual Machine Virtual Machine Virtual Machine
LAPTOP BARE METAL VIRTUALIZATION PRIVATE CLOUD PUBLIC CLOUD APPDEV & CONTINUOUS DELIVERY
APPLICATION DEVELOPMENT, DELIVERY, & INTEGRATION BUILD TEST DEPLOY Cloud-native applications Traditional applications Developer services
Orchestration
DevOps Self-service Consistent Automated CI/CD Configuration App logs & Provisioning environments build & deploy pipelines management metrics
CODE REVIEW MONITOR
SPRING & JAVA EE MICROSERVICES FUNCTIONS ● Application development & management LANGUAGES DATABASES APPLICATION SERVICES ● Polyglot, multi-language support ● Self-service provisioning LINUX WINDOWS* ● Linux containers ● Container portability * coming soon ● Deployment flexibility ● Kubernetes-based orchestration ● Automation ● Scalability ● Persistent storage APPDEV WITH CODEREADY WORKSPACES PLANNING, CREATING, AND DEPLOYING HYBRID CLOUD SERVICES The collaborative OpenShift-Native IDE. Free for any customer of OpenShift Dedicated or OpenShift Container Platform.
Container Workspaces DevOps Integrations Protect Source Code
Workspace replicas to end Reference developer Full access to source code “works on my machine” and workspaces from any issue, without any of it landing on enable team collaboration. failed build, or git notification. hard-to-secure laptops.
Based on the open Eclipse Red Hat Linux and Plugin model for Serverless support Che project Application Infrastructure extensibility (coming later)
Use It To: Replace VDI for devs, and enable true container-based DevOps. EDGE CONTINUOUS DEPLOYMENTS
1. Create App / microservice / function Who: Developers Where: CodeReady Workspaces
3. Execute at the edge
App / Microservice / Function 2. Push to the edge WHAT IS THE EDGE ANYWAYS?
What is Edge Computing Why choose Red Hat for Edge computing? RED HAT EDGE COMPUTING PoV
***
*** Minimum of 3 nodes required today BEST EDGE COMPUTING FOUNDATION? CLOUD-NATIVE DEVELOPMENT DRIVING SERVERLESS / FaaS FROM CORE TO EDGE
K KNATIVE SERVERLESS BUILDING BLOCKS "...an extension to Kubernetes exposing building blocks to build modern, source-centric, and container-based applications that can run anywhere".
Build Serving Eventing A pluggable model for An event-driven model Common infrastructure for building artifacts, like jar that serves the container consuming and producing files, zips or containers with your application and events that will stimulate from source code. can "scale to zero". applications. KNATIVE EVENTING FLOW SERVERLESS ADOPTION OK, WE HAVE THE BUILDING BLOCKS, NOW WHAT?
62.9 % Node.js
20.8 % Python
6.1 % 6.4 % Go Java 6.1 % Java
3.8 % C#
https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/ QUARKUS SUPERSONIC SUBATOMIC JAVA
A Kubernetes Native Java stack tailored for GraalVM & OpenJDK HotSpot, crafted from the best of breed Java libraries and standards
100x faster startup, 10% of the memory in native mode 10x faster and ½ the of the memory on Hotspot/OpenJDK
Minimal footprint Java applications -> Native vs Quarkus+OpenJDK JVM vs Traditional JVM QUARKUS HOW IS THIS POSSIBLE? Polyglot, Native or JVM, Embeddable Quarkus enables Java developers to easily use the most popular frameworks and standards directly on Sulong (LLVM) SubstrateVM without any hassle. Truffle Graal Compiler JVM CI Substrate VM Java HotSpot VM
BUILD HotSpot Runnable & Image Compile Provision Wiring & Assemble AOT Native Executable PROCESS Native & Image Compilation
app.jar Frameworks Runnable Java App native-app APACHE CAMEL K SERVERLESS INTEGRATION
● A lightweight platform for directly running Camel integration DSL in a cloud-native way ● Based on (ex Core OS) operator-sdk ● Works on Openshift and Kubernetes ● Create Event Sources, use EIPs, define Integration Functions
K CAMEL K OVERVIEW Time to run an integration using different strategies (in seconds) File routes.groovy from(“telegram:bots/bot-id”) .transform()... .to(“kafka:topic”);
from(“kafka:topic”) .to(“http:my-host/api/path”);
$ kamel run routes.groovy
Lower is better :) DEVICE EDGE WHAT CAN WE DO WITHOUT KNATIVE/K8s?
● Run native functions in containers at the edge
● Benefit from low footprint and fast startup
IOT EDGE Edge Edge Machine FRAMEWORK applications analytics learning Field K connectivity Cloud connectivity Edge analytics Edge applications Machine learning Linux Containers Linux CALL TO ACTION
● https://try.openshift.com/ ● https://developers.redhat.com/ LET'S BUILD ● https://knative.dev/docs/ ● https://quarkus.io/ CLOUD NATIVE ● https://github.com/apache/camel-k APPS
CASE STUDY - Smart Manufacturing - Deep Dive Integrating open source IoT operating technology, data management, analytics, and applications
• Data ingest • Stream / batch processing • Persistent data storage • Machine learning and Sentry YARN real-time analytics
Spark IoT Edge IoT Integration Hub
• Device connectivity • Device management, TCP/IP • Data transformation TCP/IP security, and access control Kafka Spark Kudu Field • Intelligent routing • Data aggregation Kafka Protocol • Business logic mqtt • Event processing • Edge analytics & real-time • Integration services (API’s) Impala TCP/IP decisions Mqtt / OPC-UA
Integrate Store Analyze
Unified Services Layer
Data Science Workbench Model Deployment
30 Knative Overview - Serving
● Configurations represent the ‘floating Service HEAD’ of a history of Revisions (my-function)
● Revisions represent immutable snapshot manages of code and configuration
Route ● Routes configure ingress over a collection (name) Configuration of Revisions and/or Configurations Routes traffic to 10% ● Services (nope, not K8s services) are Revision records top-level controllers that manage a set of 90% history of Routes and Configurations to implement a Revision network service Revision SERVERLESS ADOPTION
62.9 % Node.js
20.8 % Python
6.1 % 6.4 % Go Java 6.1 % Java
3.8 % C#
https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/ ENTERPRISE JAVA WAS DESIGNED FOR 3-TIER ARCHITECTURE
Presentation Logic HTML Javascript Web
Inventory Catalog Cart Business Logic
Promo Ratings Orders
Data Access Logic Data Access
APPLICATION SERVER / JVM
OPERATING SYSTEM HOW APPLICATION SERVERS DEPLOYED JAVA APPS
HTML Javascript Web HTML Javascript Web
Inventory Catalog Cart Inventory Catalog Cart
Promo Ratings Orders Promo Ratings Orders
Data Access Data Access
APPLICATION SERVER / JVM
OPERATING SYSTEM MICROSERVICES CHANGED HOW WE DEPLOY APPS
HTML Javascript
Order Web Promo Ratings Cart Inventory Catalog
Data Store Data Grid Data Grid Data Store Data Access Micro- Spring Micro- Spring Java EE NodeJS Reactive Profile Boot Profile Boot
CONTAINER ORCHESTRATION THE HIDDEN TRUTH ABOUT JAVA IN CONTAINERS
Node Node Node Node NodeJS Go Go Go Quarkus Quarkus Quarkus Quarkus Quarkus Traditional Cloud-Native Java Stack NodeJS Go Go Go Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Quarkus Traditional Cloud-Native NodeJS Go Go Go Java Stack Quarkus Quarkus Quarkus Quarkus Quarkus NodeJS Go Go Go Quarkus Quarkus Quarkus Quarkus Quarkus Traditional Cloud-Native NodeJS Go Go Go Java Stack Quarkus Quarkus Quarkus Quarkus Quarkus NodeJS Go Go Go Traditional Cloud-Native Quarkus Quarkus Quarkus Quarkus Quarkus Java Stack NodeJS Go Go Go Quarkus Quarkus Quarkus Quarkus Quarkus
CONTAINER ORCHESTRATION
https://developers.redhat.com/blog/2017/03/14/java-inside-docker/ FAAS & SERVERLESS CHANGES HOW WE DEPLOY APPS IN THE FUTURE
Service Service Service Service Service Service Service Service Service Service Service Service Service Service
Service Service Service Service Service Service Service Service Service Service Service Service Service Service
Service Service Service Service Service Service Service Service Service Service Service Service Service Service
Function as a Service QUARKUS NATIVE DEPLOYMENT
Node Node
Quarkus Quarkus Quarkus Quarkus Quarkus Traditional Cloud-Native Java Stack Quarkus Quarkus Quarkus Quarkus Quarkus
Quarkus Quarkus Quarkus Quarkus Quarkus Traditional Cloud-Native Java Stack Quarkus Quarkus Quarkus Quarkus Quarkus
Quarkus Quarkus Quarkus Quarkus Quarkus Traditional Cloud-Native Java Stack Quarkus Quarkus Quarkus Quarkus Quarkus
Quarkus Quarkus Quarkus Quarkus Quarkus Traditional Cloud-Native Java Stack Quarkus Quarkus Quarkus Quarkus Quarkus
CONTAINER ORCHESTRATION HOW IS THIS POSSIBLE? Polyglot, Native or JVM, Embeddable DEVELOPING NATIVE APPLICATIONS FOR SUBSTRATEVM IS PAINFUL
Quarkus enables Java developers to easily use the most popular frameworks and standards directly on SubstrateVM without any hassle. FRAMEWORK OPTIMIZATIONS
● Moved as much as possible to build phase ● Minimized runtime dependencies ● Maximize dead code elimination ● Introduced clear metadata contracts ● Spectrum of optimization levels (all -> some -> no runtime reflection)
Optimizations benefit both GraalVM (SVM) and HotSpot
IMAGE CREDITS
bmw - https://www.flickr.com/photos/pinemikey/8850948516 android - https://www.flickr.com/photos/microsiervos/15350193299 nest - https://www.flickr.com/photos/161156731@N05/45096474951 question - https://www.flickr.com/photos/dharmabum1964/3108162671 SECTION BREAK SECTION BREAK SECTION BREAK CONTENT SLIDE