Model-driven engineering for
Industrial IoT architectures
Jordi Cabot, Abel Gómez, Ivan Alfonso Díaz, Javier
Cánovas, Hamza Ed-douibi + the rest of the SOM team
@JordiCabot – jordicabot.com
Why MDE is the way to go in IIoT
Accidental complexity in IoT
Internet of Things 4
There will be 5.3
billion internet users
in 2023
(Cisco Annual Internet
Report)
But
we’re
paying
a high
price!!
AIOTI report on IoT Standards landscape
Not even
standards
will save
us
MDE to the rescue
• Grady Booch – history of softwre engineering
The entire history of software engineering is that of
the rise in levels of abstraction
- Grady Booch
Also true for IoT -> MDE is the
best tool to manage the
complexity of the IoT landscape
To model, or not to model, this is the WRONG
question
- Shakespeare
Model
Rapid prototyping
Static analysis
Code generation
Automated testing
Refactoring/
Transformation
Documentation
[Illustration by Bernhard Rumpe]
MDE = Models as key elements in all aspects of
Software Engineering
Interoperability
What is a model
13
City of Nantes = “system” to be
modeled
A map is a model of this system
Its legend is the grammar/
metamodel
Different maps can focus on
different “views” of the city
Not so different from languages
MDE Grammarware
MOF
(metametamodel)
UML
(metamodel)
ABank.uml
EBNF.g
Java.g
MyProgram.java
The MDE equation
Models +
Transformations =
Software
Original
model
1st
refinement
nth
refinement
Model-to-model
Transformation
Model-to-text
Transformation
...
Requirements
Use Case
Class Diagram
Java Project
MDE Benefits
+productivity +quality -maintenance ….
2X – 8X 1.2X – 4X 80%
MDE for IoT - Design time
The importance of the
message
Subscribe!
Publish!
Broker
An illustrative example
A Gómez, M Iglesias-Urkia, A Urbieta, J Cabot:
A model-based approach for developing event-driven
architectures with AsyncAPI. MoDELS 2020
Iotbox/box1/monitor
An illustrative example
{
"id": "Line A",
"presses": [
{
"id": "Press A1",
"ts": "2020-05-
11T18:01:06.158Z",
"value": 10.0
},{
"id": "Press A2",
"ts": "2020-05-
11T18:01:06.329Z",
"value": 15.5
}
]
}
An illustrative example
An illustrative example
Iotbox/box1/monitoring
{
"id": "Line A",
"Press A1": {
"ts": "2020-05-11T18:01:06.158Z",
"value": 10.0
},
"Press A2“: {
"ts": "2020-05-11T18:01:06.329Z",
"value": 15.5
}
]
}
Iotbox/box1/monitor
{
"id": "Line A",
"presses": [
{
"id": "Press A1",
"ts": "2020-05-
11T18:01:06.158Z",
"value": 10.0
},{
"id": "Press A2",
"ts": "2020-05-
11T18:01:06.329Z",
"value": 15.5
}
]
}
It is difficult to maintain consistency:
• Deviations in the topics:
• Lost messages
• Deviations in the message format:
• Information loss
• Runtime problems
• You can break the system but also the hardware!!! (monitoring
messages that are not properly received)
Message-driven APIs
A modeling toolkit for
message-driven architectures
https://www.asyncapi.com/
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
{
"asyncapi":
"2.0.0",
"info": { … },
"servers": {
…
},
"channels": {
…
},
"components": {
…
}
}
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"info": {
"title": "IoTBox API",
"version": "1.0.0"
},
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"servers": {
"production": {
"protocol": "mqtt",
"url":
"example.com:1883"
}
},
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": ...,
"schema": { "type":
"string" }
}
},
"publish": { ... },
"subscribe": { ... }
}
},
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"publish": {
"operationId": "publishStatus",
"message": {
"$ref":
"#/components/messages/statusMessage"
}
},
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"components": {
"messages": {
…
},
"schemas": {
…
}
}
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"messages": {
"statusMessage": {
"description": "Status of a given
subsystem",
"payload": {
"$ref":
"#/components/schemas/lineInfo"
}
}
},
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the
subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this
subsystem",
"items": {
"$ref":
"#/components/schemas/pressInfo“
}
}
}
},
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in
Pascals"
}
}
}
{
"asyncapi": "2.0.0",
"info": { "title": "IoTBox API", "version": "1.0.0”},
"servers": {
"production": { "protocol": "mqtt", "url": "example.com:1883" }
},
"channels": {
"iotbox/{id}/monitor": {
"parameters": {
"id": {
"description": "The ID of the IoTBox",
"schema": { "type": "string" }
}
},
"publish": {
"operationId": "publishStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
},
"subscribe": {
"operationId": "subscribeStatus",
"message": { "$ref": "#/components/messages/statusMessage" }
}
}
},
"components": {
"messages": {
"statusMessage": {
"description": "Status of a given subsystem",
"payload": { "$ref": "#/components/schemas/lineInfo" }
}
},
"schemas": {
"lineInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the subsystem"
},
"presses": {
"type": "array",
"description": "Info of presses in this subsystem",
"items": { "$ref": "#/components/schemas/pressInfo" }
}
}
},
"pressInfo": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the press"
},
"ts": {
"type": "string",
"title": "Timestamp"
},
"value": {
"type": "number",
"description": "Pressure of the press in Pascals"
}
}
}
}
}
}
AsyncAPI toolkit
A model-based approach for developing
message-driven architectures with
AsyncAPI
AsyncAPI toolkit
A grammar for the AsyncAPI specification
AsyncAPI:
{AsyncAPI} '{‘ (
( '"asyncapi"' ':' version=VersionNumber ','? )
& ( '"info"' ':' info=Info ','? )
& ( '"servers"' ':' '{' servers+=Server (',' servers+=Server)* '}' ','? )?
& ( '"channels"' ':' '{' channels+=Channel (',' channels+=Channel)* '}'
','? )?
& ( '"components"' ':' components=Components ','? )?
) '}';
Info:
{Info} '{' (
( '"title"' ':' title=AnyString ','? )
& ( '"version"' ':' version=AnyString ','? )
& ( '"description"' ':' description=AnyString ','? )?
& ( '"termsOfService"' ':' termsOfService=AnyString ','? )?
& ( '"contact"' ':' contact=Contact ','? )?
& ( '"license"' ':' license=License ','? )?
) '}';
A grammar for the AsyncAPI specification
A metamodel for the AsyncAPI specification
Defining an event-driven architecture
Equivalent API model
And you can always
bootstrap
the AsyncAPI model from an
existing data model
The generated code
The generated code
package main;
import java.time.Instant;
import iotbox._id_.monitor.PublishStatus;
import iotbox._id_.monitor.PublishStatus.PublishStatusParams;
import schemas.LineInfo;
import schemas.PressInfo;
public class Publish {
public static void main(String[] args) throws Exception {
LineInfo payload = LineInfo.newBuilder()
.withId("Line A")
.addToPresses(
PressInfo.newBuilder()
.withId("Press A1")
.withTimestamp(Instant.now().toString())
.withValue(10.0)
.build()
)
.addToPresses(
PressInfo.newBuilder()
.withId("Press A2")
.withTimestamp(Instant.now().toString())
.withValue(15.5)
.build()
)
.build();
PublishStatusParams params = PublishStatusParams.create().withId("box1");
PublishStatus.publish(payload, params);
}
}
{
"id": "Line A",
"presses": [
{
"id": "Press A1",
"ts": "2020-05-11T18:01:06.158Z",
"value": 10.0
},{
"id": "Press A2",
"ts": "2020-05-11T18:01:06.329Z",
"value": 15.5
}
]
}
MDE for IoT - Runtime
New requirements in IIoT
Application areas of IoT
53
• Education
• Agriculture
• Mobility
• Manufacturing
• Healthcare
• Mining
• Tourism
IoT in Mining Industry
• Cost optimization and improved productivity
• Ensure the safety of people and equipment
• Moving from preventive to predictive maintenance
54
https://www.biz4intellia.com/iot-in-mining/
Dynamic environment
• Mobility of devices or
machines connected
to the system
• Changes in monitoring
frequency
• Aging software
55
https://www.freepik.es/
Traditional IoT Architecture
56
Network
device
Network
device
Network
device
Network
device
Network
device
Network
device
Cloud
Physical Layer
Collecting data
Sensors and actuators
Cloud Layer
Data processing and analysis
Business logic
Data storage
Data centers
Cloud
Distributed IoT Architecture
57
Fog node Fog node Fog node
Edge
device
Edge
device
Edge
device
Edge
device
Edge
device
Edge
device
Cloud Layer
Big data processing
Business logic
Data warehousing
High
latency
Low
latency
Fog Layer
Local network
Local IoT analytics
Local storage
Edge Layer
Real time data
processing
Micro sata storage
Low latency
Physical Layer
Collecting data
Sensors and actuators
https://www.winsystems.com/cloud-fog-and-edge-computing-whats-the-difference/
Cloud
A DSL for modeling self-
adaptative IoT architectures
We propose a DSL to
• Specify multi-layered IoT infrastructures
• Define adaptation rules to ensure the
optimal performance of the system
State of the Art 60
Reference
Execution
Environment
Deployment
modelling
Modelling time
Run-time
adaptation
Intelligent allocation
decisions
Deployment
patterns
Argon Cloud DSL Design-time No No No
Sledziewski et al. Cloud DSL Design-time No No No
CAML2TOSCA Cloud CALM Design-time No No No
DICER Cloud UML profile Design-time No No No
MORE Cloud DSL Design-time and run-time Yes No No
Cianciaruso et al. Cloud DSL Design-time and run-time Yes No No
CloudMF Cloud CloudML Design-time and run-time Yes No No
Holmes Cloud DSL Design-time and run-time Yes No No
Erbel et al. Cloud OCCI model Design-time and run-time Yes No No
Lee et al. Edge No Design-time Yes No No
Foggy Fog DSL Design-time Yes Memory, CPU, and latency No
SMADA-Fog Fog Node-Red Design-time and run-time Yes No No
Ernst et al. Cloud Kubernetes Design-time No Kubernetes scheduler No
Santos, J. et al. Fog Kubernetes
(YAML file)
Design-time No Latency and bandwidth No
Our proposal Cloud, edge,
fog
DSL (Blended
modelling)
Design-time and run-time Yes Memory, CPU, latency,
bandwidth, energy
consumption
Yes
Metamodel (multilayered-architecture)
RoomA1 RoomB1
Floor1 – HotelA
Stairs
App2
FogHotelA
App3
DB1
Cloud01
Smoke sensor
Temperature sensor
Water valve
Alarm
Node
Container
S1-A1
S2-A1
S3-A1 A1-A1 A1-B1
S2-B1
S3-B1 S1-B1
A1-F1
Edge01A1 Edge01B1
App1
App1
Regions
Nodes (tabular notation)
Metamodel (self-adaptation rules)
Structure – Adaptation Rule Concept
Adaptation Rules
Ongoing: reusing
adaptation patterns
(e.g. canary
deployments)
Code generation for Kubernetes
Still missing the
generation of code to
enforce the rules at
runtime
REST APIs for IoT
REST
Representational state transfer (REST)
ProgrammableWeb:
more than 21 000
APIs
…consortium of forward-looking
industry experts who recognize
the immense value of
standardizing on how REST APIs
are described…
…is focused on creating,
evolving and promoting a vendor
neutral description format…
https://www.openapis.org
75 Problem statement
Compositi
on
Awesome!….but
Many resources without APIs
Many APIs without OpenAPI
definitions
Testing REST APIs is hard
Limited support for
generating REST APIs
Limited composition
approaches
N
O
APIfication
Discovery
Testing
Generation
Compositio
n
76 Approach
uses
77 OpenAPI
T h e O p e n A P I m e t a m o d e l
78 APIDiscoverer
A p p r o a c h
APIDiscoverer
Discovery
&
Enrichme
nt
Generatio
n
OpenAPI
model
Example 1
call 1
response 1
Example
provision
Example 2
call 2
response 2
Example
provision
Example n
call n
response n
Example
provision
OpenAPI
definition
79 APIComposer
OData request
OData response
End-users
OpenAPI
OData
80 APIComposer
P r o c e s s
GET http://restcountries/alpha/ES
GET Battuta.medunes.net/region/ES/all
{"@odata.context":"$metadata#Country",
"name": "Spain",
"code": "ES",
"population": 46538422,....
"regions":[
{"name": "Andalucia"},
{"name": "Aragon"},
{"name":"Canary Islands"},,...]
}
"name": "Spain",
"code": "ES",
"population": 46538422,....
{"name": "Andalucia"},
{"name": "Aragon"},
{"name":"Canary Islands"},...]
MDE + AI  Smart IoT
Artificial Intelligence
Machine
Learning
Natural
Language
Processing
Domain Modeling
assist
Autocompletion to define your IoT models
An NLP-based architecture for the autocompletion of partial domain models
L Burgueño, R Clarisó, S Gérard, S Li, J Cabot - CAiSE’21
Input your data + available
84
Partial
model
Text
preprocessing
algorithm
preprocess
A.1
Domain corpus
of text
Domain
docs NLP method for
word embeddings
train
A.2
Morphological
analysis &
lemmatization
NLP models
contextual
knowledge
general
knowledge
NLP components
Get suggestions for new model elements
85
Model Recommendation Engine
NLP method for
word embeddings
train
A.2
Morphological
analysis &
lemmatization
NLP models
contextual
knowledge
general
knowledge query
B.2
B.1
B.2
B.3
B.4
B.5
C.2
uses
use
s
Partial
model
Text
preprocessing
algorithm
preprocess
A.1
Domain corpus
of text
Domain
docs
Add class named Plane
Add class named Airline
Add class named Airplane
…
M
M
M
Conversational interfaces for IoT infrastructures / Smart cities
A
P
I
A
P
I
A
P
I
M
A
P
I
BOT
Give me all
apartments near an
electric station and
bicing
Ok, give me a minute
These are the
apartments I’ve found:
…
H Ed-Douibi, J L Cánovas, G Daniel, J Cabot:
A Model-Based Chatbot Generation Approach to Converse with Open Data Sources. ICWE’21
Give me all
apartments near an
electric station and
bicing and NO NOISE
jordi.cabot@icrea.cat
@JordiCabot
jordicabot.com
Ongoing Projects
AIDOaRT
AIDOaRT supports
requirements,
monitoring, modelling,
coding, and testing as
part of a continuous
system engineering
(CSE) in Cyber-Physical
Systems (CPS) via AI-
augmented automation
TRANSACT
It will transform local safety
critical CPS into distributed
safety-critical CPS
solutions with a
heterogeneous architecture
composed of components
along a device-edge-cloud
continuum.

Model-driven engineering for Industrial IoT architectures

  • 1.
    Model-driven engineering for IndustrialIoT architectures Jordi Cabot, Abel Gómez, Ivan Alfonso Díaz, Javier Cánovas, Hamza Ed-douibi + the rest of the SOM team @JordiCabot – jordicabot.com
  • 2.
    Why MDE isthe way to go in IIoT
  • 3.
  • 4.
    Internet of Things4 There will be 5.3 billion internet users in 2023 (Cisco Annual Internet Report)
  • 6.
  • 7.
    AIOTI report onIoT Standards landscape Not even standards will save us
  • 8.
    MDE to therescue
  • 9.
    • Grady Booch– history of softwre engineering The entire history of software engineering is that of the rise in levels of abstraction - Grady Booch Also true for IoT -> MDE is the best tool to manage the complexity of the IoT landscape
  • 10.
    To model, ornot to model, this is the WRONG question - Shakespeare
  • 12.
    Model Rapid prototyping Static analysis Codegeneration Automated testing Refactoring/ Transformation Documentation [Illustration by Bernhard Rumpe] MDE = Models as key elements in all aspects of Software Engineering Interoperability
  • 13.
    What is amodel 13 City of Nantes = “system” to be modeled A map is a model of this system Its legend is the grammar/ metamodel Different maps can focus on different “views” of the city
  • 14.
    Not so differentfrom languages MDE Grammarware MOF (metametamodel) UML (metamodel) ABank.uml EBNF.g Java.g MyProgram.java
  • 15.
    The MDE equation Models+ Transformations = Software
  • 16.
  • 17.
    MDE Benefits +productivity +quality-maintenance …. 2X – 8X 1.2X – 4X 80%
  • 18.
    MDE for IoT- Design time
  • 19.
    The importance ofthe message
  • 21.
  • 22.
    An illustrative example AGómez, M Iglesias-Urkia, A Urbieta, J Cabot: A model-based approach for developing event-driven architectures with AsyncAPI. MoDELS 2020
  • 23.
    Iotbox/box1/monitor An illustrative example { "id":"Line A", "presses": [ { "id": "Press A1", "ts": "2020-05- 11T18:01:06.158Z", "value": 10.0 },{ "id": "Press A2", "ts": "2020-05- 11T18:01:06.329Z", "value": 15.5 } ] }
  • 24.
  • 25.
    An illustrative example Iotbox/box1/monitoring { "id":"Line A", "Press A1": { "ts": "2020-05-11T18:01:06.158Z", "value": 10.0 }, "Press A2“: { "ts": "2020-05-11T18:01:06.329Z", "value": 15.5 } ] } Iotbox/box1/monitor { "id": "Line A", "presses": [ { "id": "Press A1", "ts": "2020-05- 11T18:01:06.158Z", "value": 10.0 },{ "id": "Press A2", "ts": "2020-05- 11T18:01:06.329Z", "value": 15.5 } ] }
  • 26.
    It is difficultto maintain consistency: • Deviations in the topics: • Lost messages • Deviations in the message format: • Information loss • Runtime problems • You can break the system but also the hardware!!! (monitoring messages that are not properly received) Message-driven APIs
  • 27.
    A modeling toolkitfor message-driven architectures
  • 28.
  • 30.
    { "asyncapi": "2.0.0", "info": {"title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 31.
    { "asyncapi": "2.0.0", "info": { …}, "servers": { … }, "channels": { … }, "components": { … } } { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 32.
    "info": { "title": "IoTBoxAPI", "version": "1.0.0" }, { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 33.
    "servers": { "production": { "protocol":"mqtt", "url": "example.com:1883" } }, { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 34.
    "channels": { "iotbox/{id}/monitor": { "parameters":{ "id": { "description": ..., "schema": { "type": "string" } } }, "publish": { ... }, "subscribe": { ... } } }, { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 35.
    "publish": { "operationId": "publishStatus", "message":{ "$ref": "#/components/messages/statusMessage" } }, { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 36.
    "components": { "messages": { … }, "schemas":{ … } } { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 37.
    "messages": { "statusMessage": { "description":"Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 38.
    "lineInfo": { "type": "object", "properties":{ "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo“ } } } }, { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 39.
    "pressInfo": { "type": "object", "properties":{ "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } { "asyncapi": "2.0.0", "info": { "title": "IoTBox API", "version": "1.0.0”}, "servers": { "production": { "protocol": "mqtt", "url": "example.com:1883" } }, "channels": { "iotbox/{id}/monitor": { "parameters": { "id": { "description": "The ID of the IoTBox", "schema": { "type": "string" } } }, "publish": { "operationId": "publishStatus", "message": { "$ref": "#/components/messages/statusMessage" } }, "subscribe": { "operationId": "subscribeStatus", "message": { "$ref": "#/components/messages/statusMessage" } } } }, "components": { "messages": { "statusMessage": { "description": "Status of a given subsystem", "payload": { "$ref": "#/components/schemas/lineInfo" } } }, "schemas": { "lineInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the subsystem" }, "presses": { "type": "array", "description": "Info of presses in this subsystem", "items": { "$ref": "#/components/schemas/pressInfo" } } } }, "pressInfo": { "type": "object", "properties": { "id": { "type": "string", "description": "Identifier of the press" }, "ts": { "type": "string", "title": "Timestamp" }, "value": { "type": "number", "description": "Pressure of the press in Pascals" } } } } } }
  • 40.
    AsyncAPI toolkit A model-basedapproach for developing message-driven architectures with AsyncAPI
  • 42.
  • 43.
    A grammar forthe AsyncAPI specification
  • 44.
    AsyncAPI: {AsyncAPI} '{‘ ( ('"asyncapi"' ':' version=VersionNumber ','? ) & ( '"info"' ':' info=Info ','? ) & ( '"servers"' ':' '{' servers+=Server (',' servers+=Server)* '}' ','? )? & ( '"channels"' ':' '{' channels+=Channel (',' channels+=Channel)* '}' ','? )? & ( '"components"' ':' components=Components ','? )? ) '}'; Info: {Info} '{' ( ( '"title"' ':' title=AnyString ','? ) & ( '"version"' ':' version=AnyString ','? ) & ( '"description"' ':' description=AnyString ','? )? & ( '"termsOfService"' ':' termsOfService=AnyString ','? )? & ( '"contact"' ':' contact=Contact ','? )? & ( '"license"' ':' license=License ','? )? ) '}'; A grammar for the AsyncAPI specification
  • 45.
    A metamodel forthe AsyncAPI specification
  • 46.
  • 47.
  • 48.
    And you canalways bootstrap the AsyncAPI model from an existing data model
  • 49.
  • 50.
    The generated code packagemain; import java.time.Instant; import iotbox._id_.monitor.PublishStatus; import iotbox._id_.monitor.PublishStatus.PublishStatusParams; import schemas.LineInfo; import schemas.PressInfo; public class Publish { public static void main(String[] args) throws Exception { LineInfo payload = LineInfo.newBuilder() .withId("Line A") .addToPresses( PressInfo.newBuilder() .withId("Press A1") .withTimestamp(Instant.now().toString()) .withValue(10.0) .build() ) .addToPresses( PressInfo.newBuilder() .withId("Press A2") .withTimestamp(Instant.now().toString()) .withValue(15.5) .build() ) .build(); PublishStatusParams params = PublishStatusParams.create().withId("box1"); PublishStatus.publish(payload, params); } } { "id": "Line A", "presses": [ { "id": "Press A1", "ts": "2020-05-11T18:01:06.158Z", "value": 10.0 },{ "id": "Press A2", "ts": "2020-05-11T18:01:06.329Z", "value": 15.5 } ] }
  • 51.
    MDE for IoT- Runtime
  • 52.
  • 53.
    Application areas ofIoT 53 • Education • Agriculture • Mobility • Manufacturing • Healthcare • Mining • Tourism
  • 54.
    IoT in MiningIndustry • Cost optimization and improved productivity • Ensure the safety of people and equipment • Moving from preventive to predictive maintenance 54 https://www.biz4intellia.com/iot-in-mining/
  • 55.
    Dynamic environment • Mobilityof devices or machines connected to the system • Changes in monitoring frequency • Aging software 55 https://www.freepik.es/
  • 56.
    Traditional IoT Architecture 56 Network device Network device Network device Network device Network device Network device Cloud PhysicalLayer Collecting data Sensors and actuators Cloud Layer Data processing and analysis Business logic Data storage Data centers Cloud
  • 57.
    Distributed IoT Architecture 57 Fognode Fog node Fog node Edge device Edge device Edge device Edge device Edge device Edge device Cloud Layer Big data processing Business logic Data warehousing High latency Low latency Fog Layer Local network Local IoT analytics Local storage Edge Layer Real time data processing Micro sata storage Low latency Physical Layer Collecting data Sensors and actuators https://www.winsystems.com/cloud-fog-and-edge-computing-whats-the-difference/ Cloud
  • 58.
    A DSL formodeling self- adaptative IoT architectures
  • 59.
    We propose aDSL to • Specify multi-layered IoT infrastructures • Define adaptation rules to ensure the optimal performance of the system
  • 60.
    State of theArt 60 Reference Execution Environment Deployment modelling Modelling time Run-time adaptation Intelligent allocation decisions Deployment patterns Argon Cloud DSL Design-time No No No Sledziewski et al. Cloud DSL Design-time No No No CAML2TOSCA Cloud CALM Design-time No No No DICER Cloud UML profile Design-time No No No MORE Cloud DSL Design-time and run-time Yes No No Cianciaruso et al. Cloud DSL Design-time and run-time Yes No No CloudMF Cloud CloudML Design-time and run-time Yes No No Holmes Cloud DSL Design-time and run-time Yes No No Erbel et al. Cloud OCCI model Design-time and run-time Yes No No Lee et al. Edge No Design-time Yes No No Foggy Fog DSL Design-time Yes Memory, CPU, and latency No SMADA-Fog Fog Node-Red Design-time and run-time Yes No No Ernst et al. Cloud Kubernetes Design-time No Kubernetes scheduler No Santos, J. et al. Fog Kubernetes (YAML file) Design-time No Latency and bandwidth No Our proposal Cloud, edge, fog DSL (Blended modelling) Design-time and run-time Yes Memory, CPU, latency, bandwidth, energy consumption Yes
  • 61.
  • 62.
    RoomA1 RoomB1 Floor1 –HotelA Stairs App2 FogHotelA App3 DB1 Cloud01 Smoke sensor Temperature sensor Water valve Alarm Node Container S1-A1 S2-A1 S3-A1 A1-A1 A1-B1 S2-B1 S3-B1 S1-B1 A1-F1 Edge01A1 Edge01B1 App1 App1
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
    Adaptation Rules Ongoing: reusing adaptationpatterns (e.g. canary deployments)
  • 68.
    Code generation forKubernetes Still missing the generation of code to enforce the rules at runtime
  • 69.
  • 70.
    REST Representational state transfer(REST) ProgrammableWeb: more than 21 000 APIs
  • 73.
    …consortium of forward-looking industryexperts who recognize the immense value of standardizing on how REST APIs are described… …is focused on creating, evolving and promoting a vendor neutral description format… https://www.openapis.org
  • 74.
    75 Problem statement Compositi on Awesome!….but Manyresources without APIs Many APIs without OpenAPI definitions Testing REST APIs is hard Limited support for generating REST APIs Limited composition approaches N O APIfication Discovery Testing Generation Compositio n
  • 75.
  • 76.
    77 OpenAPI T he O p e n A P I m e t a m o d e l
  • 77.
    78 APIDiscoverer A pp r o a c h APIDiscoverer Discovery & Enrichme nt Generatio n OpenAPI model Example 1 call 1 response 1 Example provision Example 2 call 2 response 2 Example provision Example n call n response n Example provision OpenAPI definition
  • 78.
    79 APIComposer OData request ODataresponse End-users OpenAPI OData
  • 79.
  • 80.
    GET http://restcountries/alpha/ES GET Battuta.medunes.net/region/ES/all {"@odata.context":"$metadata#Country", "name":"Spain", "code": "ES", "population": 46538422,.... "regions":[ {"name": "Andalucia"}, {"name": "Aragon"}, {"name":"Canary Islands"},,...] } "name": "Spain", "code": "ES", "population": 46538422,.... {"name": "Andalucia"}, {"name": "Aragon"}, {"name":"Canary Islands"},...]
  • 81.
    MDE + AI Smart IoT
  • 82.
    Artificial Intelligence Machine Learning Natural Language Processing Domain Modeling assist Autocompletionto define your IoT models An NLP-based architecture for the autocompletion of partial domain models L Burgueño, R Clarisó, S Gérard, S Li, J Cabot - CAiSE’21
  • 83.
    Input your data+ available 84 Partial model Text preprocessing algorithm preprocess A.1 Domain corpus of text Domain docs NLP method for word embeddings train A.2 Morphological analysis & lemmatization NLP models contextual knowledge general knowledge NLP components
  • 84.
    Get suggestions fornew model elements 85 Model Recommendation Engine NLP method for word embeddings train A.2 Morphological analysis & lemmatization NLP models contextual knowledge general knowledge query B.2 B.1 B.2 B.3 B.4 B.5 C.2 uses use s Partial model Text preprocessing algorithm preprocess A.1 Domain corpus of text Domain docs Add class named Plane Add class named Airline Add class named Airplane …
  • 85.
    M M M Conversational interfaces forIoT infrastructures / Smart cities A P I A P I A P I M A P I BOT Give me all apartments near an electric station and bicing Ok, give me a minute These are the apartments I’ve found: … H Ed-Douibi, J L Cánovas, G Daniel, J Cabot: A Model-Based Chatbot Generation Approach to Converse with Open Data Sources. ICWE’21 Give me all apartments near an electric station and bicing and NO NOISE
  • 86.
  • 87.
  • 88.
    AIDOaRT AIDOaRT supports requirements, monitoring, modelling, coding,and testing as part of a continuous system engineering (CSE) in Cyber-Physical Systems (CPS) via AI- augmented automation
  • 89.
    TRANSACT It will transformlocal safety critical CPS into distributed safety-critical CPS solutions with a heterogeneous architecture composed of components along a device-edge-cloud continuum.