2. Janko is the co-founder of Mainflux IoT open
source project. He is also chair of the Application
Work Group of Linux Foundation EdgeX project.
Janko has a 10+ years background in Project
Management, IT and Software integrations.
He holds MSc. In Telecommunications from
Belgrade University.
Janko
Isidorovic
MSc. Telecommunications
3. MAINFLUX
INTERNET OF THINGS PLATFORM
OPEN-SOURCE AND PATENT-FREE
DEPLOY ON-PREMISES OR IN THE CLOUD
Mainflux is highly secure, scalable, open-source IoT platform written in
Go and deployed in Docker.
It serves as software infrastructure and set of microservices for
development of the Internet of Things Solutions and deployment of
intelligent products.
https://www.mainflux.com/
https://github.com/mainflux
4.
5. EdgeX Foundry
EdgeX Foundry™ is a vendor-neutral open source project building
a common open framework for IoT edge computing.
At the heart of the project is an interoperability framework hosted
within a full hardware- and OS-agnostic reference software
platform to enable an ecosystem of plug-and-play components
that unifies the marketplace and accelerates the deployment of IoT
solutions.
https://www.edgexfoundry.org/
https://github.com/edgexfoundry
6. Scalable Architecture for the
Internet of Things
An Introduction to Data-Driven Computing Platforms
http://www.oreilly.com/programming/free/scalable-architecture-for-the-internet-of-things.csp
9. What is Internet of Things
The Internet of Things is the network of
dedicated physical objects (things) that
contain embedded technology to sense
or interact with their internal state or
external environment.
The IoT comprises an ecosystem that
includes things, communications,
applications and data analysis.
10. Internet of Things > M2M
Connectivity and embedded technology
The cost of connectivity and embedded technology is
becoming less of a barrier to adoption.
Broadband communication, Wi-Fi, Near Field
Communication (NFC), Bluetooth and mobile networks are
becoming ubiquitous and able to support large volumes of
IoT connectivity at little incremental cost.
• Low Cost Sensors
• Long Range - Low Power Radio Networks
12. “We completely restructured Intel to be a
cloud and Internet of Things company”
Raejeanne Skillern, vice president of
the Data Center Group and general
manager of the Cloud Service
Provider Business at Intel Corp.
March 2017.
28. Devices are Big - Industry, Energy, Cloud
• Large amount of data
• High throughput
• Real-Time analytics
• Device actuation
Old and new protocols:
• OPC-UA
• MODBUS
• DBUS
• BACNET
• Zigbee
• Etc...
33. Action Is On The Edge
“The edge of the IoT is where the action is. It includes a wide
array of sensors, actuators, and devices - those system end-
points that interact with and communicate real-time data from
smart products and services.”
Foundational Elements of an IoT Solution by Joe Biron and
Jonathan Follett (O’Reilly).
34. End of Cloud Computing
“Think about a self-
driving car, it’s
effectively a data center
on wheels.”
- Peter Levine, general
partner at Andreessen
Horowitz, “The End of Cloud
Computing”
35. Reasons For The Edge
• Low latency (immediate response)
• Perishable data (loses value after few seconds)
• Big amount of data (impossible and/or expensive to transfer)
• Network segmentation (organization)
• Private network installation
• Local security and firewalls
36. Cloud vs On Premise vs Edge
Edge
• Low memory footprint (RAM)
• Small size binaries
• Low Latency
• Hi Performance
• Deploy only microservices
you need for the project
On Premise / Cloud
• Scalability
• FT and HA
• Big Data
40. Where and Why Go?
• Single code base runs everywhere - Intel, ARM, Windows,
Linux, MacOS
• Easy to code
• Small footprint
• Maintainable
• High performance
41. Go vs Java in EdgeX
Results clearly indicate Golang as more performant and efficient
as measured by number of factors above.
Release Metrics (Jim White, Senior Software Architect at Dell)
42. Mainflux RPi Example
drasko@Marx:~/go/src/github.com/mainflux/mainflux$ make -j 8 GOOS=linux GOARCH=arm GOARM=7
GOOS=linux GOARCH=arm GOARM=7 go build -ldflags "-s -w" -o build/mainflux-manager cmd/manager/main.go
…
drasko@Marx:~/go/src/github.com/mainflux/mainflux$ ls -lh build/
total 23M
-rwxr-xr-x 1 drasko drasko 4.0M Mar 14 17:29 mainflux-coap
-rwxr-xr-x 1 drasko drasko 4.7M Mar 14 17:29 mainflux-http
-rwxr-xr-x 1 drasko drasko 6.1M Mar 14 17:29 mainflux-manager
-rwxr-xr-x 1 drasko drasko 7.7M Mar 14 17:29 mainflux-normalizer
drasko@Marx:~/go/src/github.com/mainflux/mainflux$ file build/mainflux-manager
build/mainflux-manager: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
43. Mainflux `FROM scratch` Dockerfile
FROM golang:1.9-alpine AS builder
ARG SVC_NAME
RUN apk update
&& apk add git
&& go get github.com/mainflux/mainflux
&& cd /go/src/github.com/mainflux/mainflux/cmd/$SVC_NAME
&& CGO_ENABLED=0 GOOS=linux go build -ldflags "-s" -a -installsuffix cgo -o /exe
FROM scratch
COPY --from=builder /exe /
ENTRYPOINT ["/exe"]
44. Mainflux Docker Images
drasko@Marx:~/go/src/github.com/mainflux/mainflux/docker$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mainflux/http latest fa4368588610 2 days ago 5.94MB
mainflux/normalizer latest 7fe785bc947f 2 days ago 9.79MB
mainflux/manager latest eac8a24c1372 2 days ago 7.77MB
nginx 1.13-alpine 537527661905 2 weeks ago 17.9MB
postgres 10.2-alpine 400ef39e0dbf 3 weeks ago 39.5MB
mainflux/mqtt-adapter latest 5d0f098f76e9 8 weeks ago 123MB
nats 1.0.2 3e5d0988d123 6 months ago 5.7MB
47. IoT Problems - On Premise
• Data from multiple Edge locations
• Company/Government Policy - No Cloud
• ERP Integration
• Enterprise Data Analytics
• Filter data and then push to cloud for advanced analytics
• Utilize existing hardware
• Hybrid solution - On premise and cloud
49. IoT Problems - Cloud
• “Infinitely Scalable”
• High Latency
• Network connectivity can be lost
• Advanced Data Analytics
• Is Cloud also a “device” connected to the IoT Platform?
51. Why is Unified Architecture Important?
• Lower Entry Barrier
• Decrease Number of Technologies
Used
• Decrease Development Team Size
• Increase Security
• Simplify Code Maintenance
Bottom Line:
- Reduce Time To Market
- Lower TCO
52. IoT Problems - Diversity
• Hardware Scale - Constrained to Server to Cloud
• Hardware Architecture - Intel, ARM
• Network Topology - Mash, Star
• Network Connectivity - IP, no IP
• Wireless Networks - WiFi, LoRa, BLE, Zigbee, 6LoWPAN
• Security - Physical, Network, Application, Data Security
• IoT Protocols - MQTT, CoAP, OPC-UA, BACNET, MODBUS...
55. Mainflux Architecture
• Microservices
• Modular design
• Support for different
messaging databases
• Deploy Native or in
Container
• Stateless Containers easy
to scaleout
56. Mainflux - Messaging Subsystem
Messaging subsystem is composed of
following microservices:
• HTTP Server
• WS Server
• MQTT Broker
• CoAP Server
• NATS Broker
• Database Adapter and Storage
It’s role is to distribute messages
between various clients that can connect
via various protocols - i.e. it makes a
messaging bridge between them.
57. Mainflux - Reverse Proxy
• Load Balance - scaling, HA, Fault
Tolerance
• Reverse Proxy
• SSL termination - keep these certs at
one place. MQTT is pure TCP, and
CoAP is UDP
58. Mainflux - Manager
• Policy Based Auth
• Grouping devices by connection to
channels
• Channel corresponds to MQTT topic
• JWT and Certs for Devices
• JWT (short TTL)
• Bearer Token
• Uses SQL Database
• Evaluate support for OAuth 2.0
for Apps
60. Mainflux - Scalability
• Mainflux runs on Kubernetes
• Scaling is Easy - even across multiple datacenters
• Independently Scale each of the microservices depending on
the load
• Distributed Deployment