Recent Enhancements of Node-RED for Rapid Development of ... · .2 . 2 0., 21 0 1 0 Recent...
Transcript of Recent Enhancements of Node-RED for Rapid Development of ... · .2 . 2 0., 21 0 1 0 Recent...
.2 . 2 0., 21 0 1 0
Recent Enhancements of Node-RED for Rapid Development of
Large Scale and Robust IoT Applications.
.
© Hitachi, Ltd. 2019. All rights reserved.
Agenda
1. Introduction to Node-RED2. Flow-based Programming in Node-RED3. Recent Features of Node-RED
2
© Hitachi, Ltd. 2019. All rights reserved.
Agenda
1. Introduction to Node-RED2. Flow-based Programming in Node-RED3. Recent Features of Node-RED
3
d 9R L R M )*0 2UU RP [ N[N NM
What is Node-RED?OSS Visual Programing Tool for IoT Applications DevelopmentpOriginally developed by IBM. Currently project under OpenJS FoundationpWorks on broad range of computers: Small IoT devices to Cloud Env.p Rapid development of Applications by connecting set of predefined nodes
4
d 9R L R M )*0 2UU RP [ N[N NM
Growing Use of Node-REDNode-RED users are growing continuously since its introduction:p Over 60K downloads/month in 2019p 1.8M accumulated downloads in 2019
01020304050607080
0
500
1,000
1,500
2,000
Jan '15 Jan '16 Jan '17 Jan '18 Jan '19
Numbe
r of
Accu
mula
ted Do
wnload
s
Numbe
r of
Down
load
s/Mon
th
NPM download Statistics of Node-RED
(K downloads) Accumulated(Left) Monthly(Right) (K downloads)
5
d 9R L R M )*0 2UU RP [ N[N NM
Production Use of Node-RED
Major IT companies adopting Node-RED for their products/services
For Edge Environment: In HITACHI:
Cloud Environment:
p Use Node-RED in "DevOps for IoT" application development env. of Lumada Solution Hub*
:3":3 4UX]M
2C C"2C C UX 5N[RPWN
4:B4" N TR
BRNVNW[" RWMB N N
]SR []"4 : 2
9:C249:" ]V M
:W NU":XC 8 N a
BRNVNW[": C ) )
8" NMR
B V[]WP"2AC:
CX[ RK"B : G
4"4 G:E
*: [1(( R L R LXV( N (LWN [(VXW ( )*0(),(*0),*/ VU 6
d 9R L R M )*0 2UU RP [ N[N NM
HITACHI's Contribution to Node-REDp HITACHI started OSS activities on Node-RED in 2017p Added features to Node-RED and contributed them to community
(over 51,000 lines of code)
Contributor's Ranking of GitHub: 5 from HITACHI in top 10 Contributions from HITACHI
0
10,000
20,000
30,000
40,000
50,000
Jan-16 Jan-17 Jan-18 Jan-19
Lines of codes in Node-RED repository
HITACHI startedcontribution
OtherIBMHITACHI
7
© Hitachi, Ltd. 2019. All rights reserved.
Agenda
1. Introduction to Node-RED2. Flow-based Programming in Node-RED3. Recent Features of Node-RED
8
d 9R L R M )*0 2UU RP [ N[N NM
Programming in Node-REDFlow-based Visual Programing Tool for IoT Applications Developmentp Rapid development by simply connecting set of predefined nodesp Over 2,100 nodes available1 FNK 2 : 8D: 5 PV ( XL MPN N L
&4 . &423
211
& 3 2
2
4
9
d 9R L R M )*0 2UU RP [ N[N NM
Flow-based Programming
Node-RED uses message based processing model
Node
Wire
message(JS object)
- -- -, ,
4XW XU UX N[[ PN UX
5 N[[ PN
E R KUN N[[ PN(4XW N
B NVNW XMN
]WL RXW XMN(BD3 F
SUBFLOW
FLOW
Comparison of Concepts
10
d 9R L R M )*0 2UU RP [ N[N NM
Available Node-RED Nodesp Over 2,100 nodes available: Web API, GUI, Data Mgmt./Proc., Edge, etc.p Nodes are easily installable from Node-RED Editor
Web API:
GUI:
Data Mgmt./Processing:
Edge Device:
Node-RED Library11
d 9R L R M )*0 2UU RP [ N[N NM
Node-RED Execution & Installationp XMN&A 5 R[ NK URL RXW X TRWP XW KX XO LUX]M WM NMPN [RMNp Easy to Install!
Cloud or edge or local env.
Flow data(json)
Execute
WEB editor
Runtime
Client on your browser
Editor page
## npmsudo npm install –g nodered; nodered –p 1880## dockerdocker run -p 1880:1880 nodered/node-red-docker
Installation: (Linux/MacOS/Windows)
12
© Hitachi, Ltd. 2019. All rights reserved.
DEMO: Weather Map of World Cities
Web API: Weather Data Web Browser
Node-RED
3. Plot data on map2. Handle weather data1. Get weather dataof cities
13
© Hitachi, Ltd. 2019. All rights reserved.
Agenda
1. Introduction to Node-RED2. Flow-based Programming in Node-RED3. Recent Features of Node-RED
14
© Hitachi, Ltd. 2019. All rights reserved.
New Features
Testing Framework (UI* & Flow†)Flow Validation (Lint)†
Quality Improvements*
Robustness
Message Sequence Nodes+
Persistable Context+
Dashboard Extension API+
Functionality
SUBFLOW Enhancements+
UI Widgets*+/Layout Tool*
Node Template Generation*
Productivity
Improved Node Representation+*
Internationalization+
Documentation+
Usability
15*: In current release (~0.20), +: In future release (1.0~), †: In discussion
© Hitachi, Ltd. 2019. All rights reserved.
New Features
Testing Framework (UI & Flow)Flow Validation (Lint)Quality Improvements
Robustness
Message Sequence NodesPersistable ContextDashboard Extension API
Functionality
SUBFLOW EnhancementsUI Widgets/Layout ToolNode Template Generation
Productivity
Improved Node RepresentationInternationalizationDocumentation
Usability
16
© Hitachi, Ltd. 2019. All rights reserved.
New Features
Testing Framework (UI & Flow)Flow Validation (Lint)Quality Improvements
Robustness
Message Sequence NodesPersistable ContextDashboard Extension API
Functionality
SUBFLOW EnhancementsUI Widgets/Layout ToolNode Template Generation
Productivity
Improved Node RepresentationInternationalizationDocumentation
Usability
17
d 9R L R M )*0 2UU RP [ N[N NM
Node-RED for Scalable Solutions
p Node-RED is a highly effective tool for rapid creation of new solutions.p On the other hand, we want to create basis for sharing common solution patterns useful for creating new custom solutions by novice IT users
Problem Solution NewProblem
Prototype
Abstraction &Refactoring Customize &
ApplySolutionPattern
18
d 9R L R M )*0 2UU RP [ N[N NM
Creating Custom Solutions
p Abstraction with current FLOW, SUBFLOW or Node is not sufficient p Needs a way to ease creation and customization of solutions
Creation CustomizationFLOW easy (visual editor) difficult (no specific customization point)SUBFLOW easy (visual editor) difficult (no specific customization point)Node difficult (HTML+JS) easy (node settings UI)
Problem Solution NewProblem
Prototype
Abstraction &Refactoring Customize &
ApplySolutionPattern
19
d 9R L R M )*0 2UU RP [ N[N NM
SUBFLOW Enhancements
By adding customization capability to SUBFLOW, SUBFLOW can define similar functionality to existing nodes using Node-RED editor GUI
Item Node SUBFLOW (ToBe)Logic JavaScript Flow (via GUI)Info Text(document)
HTML None → Markdown (via GUI)
Icon Any Picture None → Icon Font (via GUI)Category Any Category None → Any Category (via GUI)Settings UI HTML NoneColor Any Color None
20
d 9R L R M )*0 2UU RP [ N[N NM
SUBFLOW Enhancements
By adding customization capability to SUBFLOW, SUBFLOW can define similar functionality to existing nodes using Node-RED editor GUI
Item Node SUBFLOW (ToBe)Logic JavaScript Flow (via GUI)Info Text(document)
HTML None → Markdown (via GUI)
Icon Any Picture None → Icon Font (via GUI)Category Any Category None → Any Category (via GUI)Settings UI HTML NoneColor Any Color None
21*: under development. will be included in 1.0 release~
d 9R L R M )*0 2UU RP [ N[N NM
Settings UI Definition for SUBFLOW
Developing Settings UI definition feature which allowsGUI-based definition of SUBFLOW settings UI
SUBFLOW UI Definition Generated Input UI
Generate
22
d 9R L R M )*0 2UU RP [ N[N NM
Exporting SUBFLOW as Node
Enhanced SUBFLOW feature ease creating & sharing common solution patterns by novice IT users
CreateFlow
CreateSubflow
Node(JS+HTML)
npmrepository
Install npmmodule
Difficult fornovice users
Node fromSUBFLOW
copy & paste JSON data
Easy for novice users
Current Node Development
New Node Development
share solutionseasily
*: under design discussion 23
© Hitachi, Ltd. 2019. All rights reserved.
New Features
Testing Framework (UI & Flow)Flow Validation (Lint)Quality Improvements
Robustness
Message Sequence NodesPersistable ContextDashboard Extension API
Functionality
SUBFLOW EnhancementsUI Widgets/Layout ToolNode Template Generation
Productivity
Improved Node RepresentationInternationalizationDocumentation
Usability
24
d 9R L R M )*0 2UU RP [ N[N NM
Node-RED Dashboard p Node-RED provides capability to create simple GUIp To meet wider range of requirements, we created following features:
Plugin API for new UI widget, new UI widgets, and layout editor
UI widgets fromHITACHI
UI widgets from other OSS contributors
DashboardLayout Editor Node-RED Dashboard
25
Plugin API
d 9R L R M )*0 2UU RP [ N[N NM
Example UI Widget: Vega Noden Supports various kinds of data visualization described in JSONn Naturally fits with JSON based message processing of Node-RED
b [L NV 1RM 1 -))NRP 1 ))MMRWP 1 .
M 1 H
IV T[ 1 H
I
c
$1 ENP 1 [1(( NP PR ]K RX( NP (
Vega JSONSpecification
b [L NV 1RM 1 -))NRP 1 ))MMRWP 1 .
M 1 H
IV T[ 1 H
I
c
b [L NV 1RM 1 -))NRP 1 ))MMRWP 1 .
M 1 H
IV T[ 1 H
I
c
Data Visualization withVega Node
26
Node-RED Dashboard
Plugin API
d 9R L R M )*0 2UU RP [ N[N NM
Dashboard Layout Tool
27
p Creating complex GUI layout is cumbersome in current Node-RED p Dashboard Layout Tool allow intuitive layout of dashboard GUI
Order of Widgets (old) Layout Editor (new)
apply layout
Layout based on order of widgets
DEMO: SUBFLOW & Dashboard
����
/
© Hitachi, Ltd. 2019. All rights reserved.
Message from Node-RED Creators
29
Conclusion
Join Node-RED Community!p Node-RED: https://nodered.orgp Slack: https://node-red.slack.com/p GitHub: https://github.com/node-red
,*
32
© Hitachi, Ltd. 2019. All rights reserved.
Trademarks‒ IBM, Watson are registered trademarks of International Business Machines Corporation.
‒ AT&T is a registered trademark of AT&T Inc.‒ Fujitsu and COLMINA are registered trademarks of Fujitsu Ltd.
‒ Microsoft is a registered trademark of Microsoft Corporation.
‒ NEC and CONNEXIVE are registered trademarks of NEC Corporation.
‒ GE and Predix are registered trademarks of General Electric Company.
‒ Intel is a registered trademark of Intel Corporation.‒ Samsung is a registered trademark of Samsung C&T Corporation.
‒ Samsung Artik is a registered trademark of Samsung Electronics Co. Ltd.
‒ Siemens and SIMATIC are registered trademarks of Siemens Aktiengesellschaft.
‒ Toshiba is a registered trademark of Toshiba Corporation.
‒ SPINEX is a registered trademark of Toshiba Digital Solutions Corporation.
‒ MySQL is a registered trademark of MySQL Aktiebolag.
‒ MongoDB is a registered trademark of MongoDB
Limited.‒ Slack is a registered trademark of Slack Technologies, Inc.
‒ GitHub is a registered trademark of GitHub, Inc.‒ Twitter is a registered trademark of Twitter, Inc.‒ Docker is a registered trademark of Docker, Inc.
33