SlideShare a Scribd company logo
MILAN 21.11.2015
Monet: a NodeJS enterprise system for IoT
and Energy Management
MATTEO MURGIDA - SIEMENS SPA
MILAN 21.11.2015 - MATTEO MURGIDA
Table of contents
• What is Monet?
• Technology: why node?
• High Level Architecture
• Micro-services Architecture
• Cloud Architecture
• Façade
• Dispatcher
• MQTT & Gateway
• Leveraging The Cloud
• Deployment and Runtime Tools
• Future Improvements
MILAN 21.11.2015 - MATTEO MURGIDA
What is Monet? (1/2)
Monet, Smart Grid Energy Management Cockpit
Monet is a Cloud platform providing set of services for Energy Monitoring and
Energy Management following the Software as a Service model.
It is a solution for monitoring, controlling, and optimizing energy flows inside a
specific site or location being a Smart Grid, a Micro Grid, a Smart City or part of
it.
MILAN 21.11.2015 - MATTEO MURGIDA
What is Monet? (2/2)
Smart
Metering
Systems
Monet – Energy Management System
Building
Automation
Systems
Energy Monitoring / Energy
Reporting
Energy Efficiency / Demand
Response
Distribution
Network
SCADA
Systems
Site/Plant
SCADA
Systems
Other Smart
City Systems
(electric vehicle
infrastructure, public
lighting, …)
Home / IOT
Devices
Energy Profiling / Generation
Forecast
MILAN 21.11.2015 - MATTEO MURGIDA
Demo Time
Demo Time
MILAN 21.11.2015 - MATTEO MURGIDA
Why NodeJS?
“Node.js is a platform built on Chrome's JavaScript runtime for easily building
fast, scalable network applications. Node.js uses an event-driven, non-
blocking I/O model that makes it lightweight and efficient, perfect for data-
intensive real-time applications that run across distributed devices.”
MILAN 21.11.2015 - MATTEO MURGIDA
Table of contents
• What is Monet?
• Technology: why node?
• High Level Architecture
• Micro-services Architecture
• Cloud Architecture
• Façade
• Dispatcher
• MQTT & Gateway
• Leveraging The Cloud
• Deployment and Runtime Tools
• Future Improvements
Monet middleware
BUS
PremiseCloud
M2M
WebApp
Field
Monet Operation CenterNODE.JS
EXPRESS
MONGO
DB
REST Interface (Http/Https)
HTML5 / CSS / Javascript
Sencha ExtJS
MQTT
Monet OC Mobile
HTML5 / CSS / Javascript
Sencha Touch / Apache Cordova
CORE
Package
Energy Reporting
Package
Gen. Forecast
Package
Gateway
60870-5-104
Gateway
62056-21
Gateway
61850
Gateway
Modbus
Gateway
Archilede
Gateway
EMM
Gateway
STM
Gateway
Desigo
Green Button
Active Demand
Package
Gateway
Smart Info
MILAN 21.11.2015 - MATTEO MURGIDA
High Level Architecture
• Monet follows the Micro-Service Architecture pattern
• It has a service for each functionality package that expose a REST API
• It has jobs to perform background tasks and complex calculations
• Services communicate via the Dispatcher module and the Service Bus.
MILAN 21.11.2015 - MATTEO MURGIDA
Micro Services Architecture (1/2)
MILAN 21.11.2015 - MATTEO MURGIDA
Micro Services Architecture (2/2)
Monet Business Logic Tier
BUS
M2M
MQTT
MQTT
Feeds Broker
MONGO
DB
Monet Presentation Tier
Energy Reporting
Services
Things Service
Trends Service
Gen. Forecast
Services
Energy Service
Energy Job
REST REST
CORE
Services
Facade
REST
Trends Job
Graphics
Service
Assets ServiceNotifier Events Service
Dashboards
Sites Service
Authentication
Users
Stakeholders
Triggers Job
Forecast
Service
Dashboard(s)
Things
Management
Assets
Management
Energy
Management
Reporting Active DemandTicketingAdministration
Customers
Ticketing
Active Demand
Services
REST
Active Demand
Service
Active Demand
Job
Energy Rules
Service
MILAN 21.11.2015 - MATTEO MURGIDA
Cloud Architecture (1/2)
MILAN 21.11.2015 - MATTEO MURGIDA
Cloud Architecture (2/2)
MILAN 21.11.2015 - MATTEO MURGIDA
Table of contents
• What is Monet?
• Technology: why node?
• High Level Architecture
• Micro-services Architecture
• Cloud Architecture
• Façade
• Dispatcher
• MQTT & Gateway
• Leveraging The Cloud
• Deployment and Runtime Tools
• Future Improvements
MILAN 21.11.2015 - MATTEO MURGIDA
Facade
MILAN 21.11.2015 - MATTEO MURGIDA
Dispatcher
The EMS System via its M2M component is able to acquire data directly from
field devices.
Sometimes this is not possible or it is not convenient for several reasons:
§ devices own protocol is not “Internet of Things ready”
§ communication infrastructure
§ security
In these scenarios the EMS Gateway is able to collect data from devices and to
send them to the EMS-M2M in an optimized and secure way.
MILAN 21.11.2015 - MATTEO MURGIDA
Gateway (1/3)
MILAN 21.11.2015 - MATTEO MURGIDA
Gateway (2/3)
Mosca is used as MQTT broker. It is a powerful nodejs module that can be used
standalone or can be run inside a custom nodejs module.
MILAN 21.11.2015 - MATTEO MURGIDA
Gateway (3/3)
§ Gateway Configuration and Subscriptions flow:
§ The gateway has the basic info to connect to the MQTT Broker
§ It subscribes to the topic gw/gatewayMqttClientId/dr/+/conf
§ It subscribes to the topic dr/driverId/de/+/conf
mqttbroker
MILAN 21.11.2015 - MATTEO MURGIDA
Table of contents
• What is Monet?
• Technology: why node?
• High Level Architecture
• Micro-services Architecture
• Cloud Architecture
• Façade
• Dispatcher
• MQTT & Gateway
• Leveraging The Cloud
• Deployment and Runtime Tools
• Future Improvements
MILAN 21.11.2015 - MATTEO MURGIDA
Leveraging the Cloud
MILAN 21.11.2015 - MATTEO MURGIDA
Communication Strategies
Service A.1 Service A.2
Service B.1 Service B.2
Req 1
Req 1
Req … Res 1
Res 1Res 1
§ Monet is composed by several nodejs modules that are deployed as subfolders in
the main “backend” module.
§ Each module has its own conf file, that can be overridden by a common global conf
file
§ A “core” module colled Overlord reads the main configuration files and acts as
process / logging manager
§ Moving towards a more flexible and structured approach via npm private repository
MILAN 21.11.2015 - MATTEO MURGIDA
Deployment
§ Forever is a process monitor: it starts and watchdogs the desired nodejs processes
§ Bunyan is a json logging tool implementing a lot of different transports
MILAN 21.11.2015 - MATTEO MURGIDA
Runtime Tools
MILAN 21.11.2015 - MATTEO MURGIDA
The importance of using npm shrinkwrap
§ npm shrinkwrap command locks down the versions of a package's dependencies
so that you can control exactly which versions of each dependency will be used
when your package is installed.
§ Wildcards are commonly used when specifying dependencies in package.json.
These are very handy but can be very harmful when you have to deploy your stuff in
production environments
§ This is the only way you have to be sure to deploy the same thing every time you do
an npm install
§ You can always check for outdated dependencies using npm outdated
§ First of all: we must go towards having a repo per submodule, and a npm package
for each submodule using a private NPM repository. A good choice should be
sinopia.
§ Use git
§ Dockerize all this stuff
§ Use a cluster / processes manager like pm2 to manage all the different
subprocesse, resources and logging
MILAN 21.11.2015 - MATTEO MURGIDA
Future Improvements
MILAN 21.11.2015 - MATTEO MURGIDA
nodeschool
http://nodeschool.io/
https://github.com/nodeschool/italy/issues
http://nodeschool.io/italy
MILAN 21.11.2015
Matteo Murgida
SIEMENS SPA
@teomurgi
Thank You
MILAN 21.11.2015 - MATTEO MURGIDA
Leave your feedback on Joind.in!
https://m.joind.in/event/codemotion-milan-2015

More Related Content

What's hot (20)

PPTX
Optimized Energy Management and Planning Tools for the Iron and Steel Industry
Schneider Electric
 
PDF
Open source industrial IoT
Manolis Nikiforakis
 
PDF
Acti9 Communication System catalog
Schneider Electric India
 
PDF
The Software-Defined Data Center and it’s impact on the physical infrastruc...
Schneider Electric
 
PDF
[Case Study] Stedin (The Netherlands) - Underground Self-Healing Network
Schneider Electric
 
PDF
IEC 61850 Interoperability at information level: a challenge for all market p...
Schneider Electric
 
PDF
A single architecture that covers 3 automation models - Hannover Messe 2014
Schneider Electric
 
PPTX
Schneider electric automationcom pes ppt
Sharon Smith
 
PPT
New trends in video analytics and surveillance systems for the mining industry
Schneider Electric
 
PDF
Building IoT Mashups for Industry 4.0 with Eclipse Kura and Kura Wires
Eurotech
 
PPTX
AggreGate Power Engineering Application
Tibbo
 
PPTX
Will SCADA Systems Survive? The Future of Distributed Management Systems
Tibbo
 
PDF
IIoT and how Smart Machines help shape the future
Schneider Electric
 
PPTX
The Data Center Evolution and Pre-Fab Data Centers
Schneider Electric
 
PDF
Data centers on the Edge
Schneider Electric
 
PDF
Oil & Gas Fields Get Smart
Schneider Electric
 
PPTX
Will DCIM-driven cloud services change the game for data center management?
Schneider Electric
 
PDF
Device Management for OSGi IoT Gateways
Eurotech
 
PDF
An end-to-end standard oneM2M infrastructure for the Smart Home - Andre Bottaro
mfrancis
 
PDF
It's time to modernize your industrial controls with Modicon M580
Schneider Electric
 
Optimized Energy Management and Planning Tools for the Iron and Steel Industry
Schneider Electric
 
Open source industrial IoT
Manolis Nikiforakis
 
Acti9 Communication System catalog
Schneider Electric India
 
The Software-Defined Data Center and it’s impact on the physical infrastruc...
Schneider Electric
 
[Case Study] Stedin (The Netherlands) - Underground Self-Healing Network
Schneider Electric
 
IEC 61850 Interoperability at information level: a challenge for all market p...
Schneider Electric
 
A single architecture that covers 3 automation models - Hannover Messe 2014
Schneider Electric
 
Schneider electric automationcom pes ppt
Sharon Smith
 
New trends in video analytics and surveillance systems for the mining industry
Schneider Electric
 
Building IoT Mashups for Industry 4.0 with Eclipse Kura and Kura Wires
Eurotech
 
AggreGate Power Engineering Application
Tibbo
 
Will SCADA Systems Survive? The Future of Distributed Management Systems
Tibbo
 
IIoT and how Smart Machines help shape the future
Schneider Electric
 
The Data Center Evolution and Pre-Fab Data Centers
Schneider Electric
 
Data centers on the Edge
Schneider Electric
 
Oil & Gas Fields Get Smart
Schneider Electric
 
Will DCIM-driven cloud services change the game for data center management?
Schneider Electric
 
Device Management for OSGi IoT Gateways
Eurotech
 
An end-to-end standard oneM2M infrastructure for the Smart Home - Andre Bottaro
mfrancis
 
It's time to modernize your industrial controls with Modicon M580
Schneider Electric
 

Viewers also liked (6)

PDF
Home automation with javascript
Arnav Gupta
 
PPTX
Remote PC Administration Using Mobile Phone
Chhatrapati shivaji institute of technology, Deori
 
PPT
Designing an ExtJS user login panel
Arun Prasad
 
PPTX
Remote access from a smartphone ppt
Laxman Puri
 
PPT
Open Innovation Networks - Crowd Sourcing and Internal Expert Networks at Sie...
Michael Heiss
 
PDF
Steffen Schaefer : How Digitalization is enabling new Mobility ecosystems | Z...
Zinnov
 
Home automation with javascript
Arnav Gupta
 
Remote PC Administration Using Mobile Phone
Chhatrapati shivaji institute of technology, Deori
 
Designing an ExtJS user login panel
Arun Prasad
 
Remote access from a smartphone ppt
Laxman Puri
 
Open Innovation Networks - Crowd Sourcing and Internal Expert Networks at Sie...
Michael Heiss
 
Steffen Schaefer : How Digitalization is enabling new Mobility ecosystems | Z...
Zinnov
 
Ad

Similar to Matteo Murgida - Monet: a NodeJS enterprise system for IoT and Energy Management (20)

PPTX
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
ENTER S.r.l.
 
PDF
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
Codemotion
 
PPTX
Presentazione Codemotion
LinkMe Srl
 
PPTX
Microservices with Node and Docker
Tony Pujals
 
PDF
API Microservices with Node.js and Docker
Apigee | Google Cloud
 
PDF
Comparison of Current Service Mesh Architectures
Mirantis
 
PPTX
CloudNativeLondon 2019 "API Gateways and Service Meshes: Opening the Door to ...
Daniel Bryant
 
PDF
IoT ( M2M) - Big Data - Analytics: Emulation and Demonstration
CHAKER ALLAOUI
 
PPTX
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Bitnami
 
PPTX
L'approccio Model-Driven Development per lo sviluppo Agile nell'ambito dell'I...
Codemotion
 
PDF
Navigating Crypto: Industry Map
Sarasotamug
 
PDF
Node.js as an IOT Bridge
Eduardo Pelegri-Llopart
 
PDF
Docker microservices and the service mesh
Docker, Inc.
 
PPTX
Modern architecture
Renato Guimaraes
 
PDF
Node.js Tools Ecosystem
Rocket Software
 
PPTX
Node.js Web Apps @ ebay scale
Dmytro Semenov
 
PPTX
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
Daniel Bryant
 
PDF
Node.js an Exectutive View
Manuel Eusebio de Paz Carmona
 
PPT
IBM and Node.js - Old Doge, New Tricks
Dejan Glozic
 
PDF
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
Eduardo Pelegri-Llopart
 
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
ENTER S.r.l.
 
Sviluppare in cloud con M.E.A.N.: il caso Crowdcore
Codemotion
 
Presentazione Codemotion
LinkMe Srl
 
Microservices with Node and Docker
Tony Pujals
 
API Microservices with Node.js and Docker
Apigee | Google Cloud
 
Comparison of Current Service Mesh Architectures
Mirantis
 
CloudNativeLondon 2019 "API Gateways and Service Meshes: Opening the Door to ...
Daniel Bryant
 
IoT ( M2M) - Big Data - Analytics: Emulation and Demonstration
CHAKER ALLAOUI
 
Take the Fastest Path to Node.Js Application Development with Bitnami & AWS L...
Bitnami
 
L'approccio Model-Driven Development per lo sviluppo Agile nell'ambito dell'I...
Codemotion
 
Navigating Crypto: Industry Map
Sarasotamug
 
Node.js as an IOT Bridge
Eduardo Pelegri-Llopart
 
Docker microservices and the service mesh
Docker, Inc.
 
Modern architecture
Renato Guimaraes
 
Node.js Tools Ecosystem
Rocket Software
 
Node.js Web Apps @ ebay scale
Dmytro Semenov
 
JAX London 2019 "Cloud Native Communication: Using an API Gateway and Service...
Daniel Bryant
 
Node.js an Exectutive View
Manuel Eusebio de Paz Carmona
 
IBM and Node.js - Old Doge, New Tricks
Dejan Glozic
 
What is IoT and how Modulus and Pacific can Help - Featuring Node.js and Roll...
Eduardo Pelegri-Llopart
 
Ad

More from Codemotion (20)

PDF
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Codemotion
 
PDF
Pompili - From hero to_zero: The FatalNoise neverending story
Codemotion
 
PPTX
Pastore - Commodore 65 - La storia
Codemotion
 
PPTX
Pennisi - Essere Richard Altwasser
Codemotion
 
PPTX
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Codemotion
 
PPTX
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Codemotion
 
PPTX
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Codemotion
 
PPTX
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Codemotion
 
PDF
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Codemotion
 
PDF
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Codemotion
 
PDF
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Codemotion
 
PDF
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Codemotion
 
PDF
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Codemotion
 
PDF
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Codemotion
 
PPTX
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Codemotion
 
PPTX
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Codemotion
 
PDF
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Codemotion
 
PDF
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Codemotion
 
PDF
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Codemotion
 
PDF
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Codemotion
 
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Codemotion
 
Pastore - Commodore 65 - La storia
Codemotion
 
Pennisi - Essere Richard Altwasser
Codemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Codemotion
 

Recently uploaded (20)

PDF
July Patch Tuesday
Ivanti
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
July Patch Tuesday
Ivanti
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 

Matteo Murgida - Monet: a NodeJS enterprise system for IoT and Energy Management

  • 1. MILAN 21.11.2015 Monet: a NodeJS enterprise system for IoT and Energy Management MATTEO MURGIDA - SIEMENS SPA
  • 2. MILAN 21.11.2015 - MATTEO MURGIDA Table of contents • What is Monet? • Technology: why node? • High Level Architecture • Micro-services Architecture • Cloud Architecture • Façade • Dispatcher • MQTT & Gateway • Leveraging The Cloud • Deployment and Runtime Tools • Future Improvements
  • 3. MILAN 21.11.2015 - MATTEO MURGIDA What is Monet? (1/2) Monet, Smart Grid Energy Management Cockpit Monet is a Cloud platform providing set of services for Energy Monitoring and Energy Management following the Software as a Service model. It is a solution for monitoring, controlling, and optimizing energy flows inside a specific site or location being a Smart Grid, a Micro Grid, a Smart City or part of it.
  • 4. MILAN 21.11.2015 - MATTEO MURGIDA What is Monet? (2/2) Smart Metering Systems Monet – Energy Management System Building Automation Systems Energy Monitoring / Energy Reporting Energy Efficiency / Demand Response Distribution Network SCADA Systems Site/Plant SCADA Systems Other Smart City Systems (electric vehicle infrastructure, public lighting, …) Home / IOT Devices Energy Profiling / Generation Forecast
  • 5. MILAN 21.11.2015 - MATTEO MURGIDA Demo Time Demo Time
  • 6. MILAN 21.11.2015 - MATTEO MURGIDA Why NodeJS? “Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non- blocking I/O model that makes it lightweight and efficient, perfect for data- intensive real-time applications that run across distributed devices.”
  • 7. MILAN 21.11.2015 - MATTEO MURGIDA Table of contents • What is Monet? • Technology: why node? • High Level Architecture • Micro-services Architecture • Cloud Architecture • Façade • Dispatcher • MQTT & Gateway • Leveraging The Cloud • Deployment and Runtime Tools • Future Improvements
  • 8. Monet middleware BUS PremiseCloud M2M WebApp Field Monet Operation CenterNODE.JS EXPRESS MONGO DB REST Interface (Http/Https) HTML5 / CSS / Javascript Sencha ExtJS MQTT Monet OC Mobile HTML5 / CSS / Javascript Sencha Touch / Apache Cordova CORE Package Energy Reporting Package Gen. Forecast Package Gateway 60870-5-104 Gateway 62056-21 Gateway 61850 Gateway Modbus Gateway Archilede Gateway EMM Gateway STM Gateway Desigo Green Button Active Demand Package Gateway Smart Info MILAN 21.11.2015 - MATTEO MURGIDA High Level Architecture
  • 9. • Monet follows the Micro-Service Architecture pattern • It has a service for each functionality package that expose a REST API • It has jobs to perform background tasks and complex calculations • Services communicate via the Dispatcher module and the Service Bus. MILAN 21.11.2015 - MATTEO MURGIDA Micro Services Architecture (1/2)
  • 10. MILAN 21.11.2015 - MATTEO MURGIDA Micro Services Architecture (2/2) Monet Business Logic Tier BUS M2M MQTT MQTT Feeds Broker MONGO DB Monet Presentation Tier Energy Reporting Services Things Service Trends Service Gen. Forecast Services Energy Service Energy Job REST REST CORE Services Facade REST Trends Job Graphics Service Assets ServiceNotifier Events Service Dashboards Sites Service Authentication Users Stakeholders Triggers Job Forecast Service Dashboard(s) Things Management Assets Management Energy Management Reporting Active DemandTicketingAdministration Customers Ticketing Active Demand Services REST Active Demand Service Active Demand Job Energy Rules Service
  • 11. MILAN 21.11.2015 - MATTEO MURGIDA Cloud Architecture (1/2)
  • 12. MILAN 21.11.2015 - MATTEO MURGIDA Cloud Architecture (2/2)
  • 13. MILAN 21.11.2015 - MATTEO MURGIDA Table of contents • What is Monet? • Technology: why node? • High Level Architecture • Micro-services Architecture • Cloud Architecture • Façade • Dispatcher • MQTT & Gateway • Leveraging The Cloud • Deployment and Runtime Tools • Future Improvements
  • 14. MILAN 21.11.2015 - MATTEO MURGIDA Facade
  • 15. MILAN 21.11.2015 - MATTEO MURGIDA Dispatcher
  • 16. The EMS System via its M2M component is able to acquire data directly from field devices. Sometimes this is not possible or it is not convenient for several reasons: § devices own protocol is not “Internet of Things ready” § communication infrastructure § security In these scenarios the EMS Gateway is able to collect data from devices and to send them to the EMS-M2M in an optimized and secure way. MILAN 21.11.2015 - MATTEO MURGIDA Gateway (1/3)
  • 17. MILAN 21.11.2015 - MATTEO MURGIDA Gateway (2/3) Mosca is used as MQTT broker. It is a powerful nodejs module that can be used standalone or can be run inside a custom nodejs module.
  • 18. MILAN 21.11.2015 - MATTEO MURGIDA Gateway (3/3) § Gateway Configuration and Subscriptions flow: § The gateway has the basic info to connect to the MQTT Broker § It subscribes to the topic gw/gatewayMqttClientId/dr/+/conf § It subscribes to the topic dr/driverId/de/+/conf mqttbroker
  • 19. MILAN 21.11.2015 - MATTEO MURGIDA Table of contents • What is Monet? • Technology: why node? • High Level Architecture • Micro-services Architecture • Cloud Architecture • Façade • Dispatcher • MQTT & Gateway • Leveraging The Cloud • Deployment and Runtime Tools • Future Improvements
  • 20. MILAN 21.11.2015 - MATTEO MURGIDA Leveraging the Cloud
  • 21. MILAN 21.11.2015 - MATTEO MURGIDA Communication Strategies Service A.1 Service A.2 Service B.1 Service B.2 Req 1 Req 1 Req … Res 1 Res 1Res 1
  • 22. § Monet is composed by several nodejs modules that are deployed as subfolders in the main “backend” module. § Each module has its own conf file, that can be overridden by a common global conf file § A “core” module colled Overlord reads the main configuration files and acts as process / logging manager § Moving towards a more flexible and structured approach via npm private repository MILAN 21.11.2015 - MATTEO MURGIDA Deployment
  • 23. § Forever is a process monitor: it starts and watchdogs the desired nodejs processes § Bunyan is a json logging tool implementing a lot of different transports MILAN 21.11.2015 - MATTEO MURGIDA Runtime Tools
  • 24. MILAN 21.11.2015 - MATTEO MURGIDA The importance of using npm shrinkwrap § npm shrinkwrap command locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be used when your package is installed. § Wildcards are commonly used when specifying dependencies in package.json. These are very handy but can be very harmful when you have to deploy your stuff in production environments § This is the only way you have to be sure to deploy the same thing every time you do an npm install § You can always check for outdated dependencies using npm outdated
  • 25. § First of all: we must go towards having a repo per submodule, and a npm package for each submodule using a private NPM repository. A good choice should be sinopia. § Use git § Dockerize all this stuff § Use a cluster / processes manager like pm2 to manage all the different subprocesse, resources and logging MILAN 21.11.2015 - MATTEO MURGIDA Future Improvements
  • 26. MILAN 21.11.2015 - MATTEO MURGIDA nodeschool http://nodeschool.io/ https://github.com/nodeschool/italy/issues http://nodeschool.io/italy
  • 27. MILAN 21.11.2015 Matteo Murgida SIEMENS SPA @teomurgi Thank You
  • 28. MILAN 21.11.2015 - MATTEO MURGIDA Leave your feedback on Joind.in! https://m.joind.in/event/codemotion-milan-2015