Giter VIP home page Giter VIP logo

jpdias / node-red-contrib-self-healing Goto Github PK

View Code? Open in Web Editor NEW
37.0 5.0 3.0 3.59 MB

A collection of nodes for improve Node-RED dependability by enabling self-healing capabilities.

Home Page: http://jpdias.me/node-red-contrib-self-healing/

JavaScript 65.13% HTML 33.50% Dockerfile 1.21% Shell 0.16%
node-red node-red-contrib self-healing autonomic-computing internet-of-things hacktoberfest

node-red-contrib-self-healing's Introduction

SHEN: Self-Healing Extensions for Node-RED

DOI DOI

Logo

node-red-contrib-self-healing

npm version badge downloads badge license: MIT Build

A collection of nodes for making Node-RED more resilient by adding self-healing capabilities. This project is at an early development stage and its usage in production environments is not recommended.

This work is part of an ongoing PhD thesis in Software Engineering and Internet-of-Things at the Faculty of Engineering, University of Porto (FEUP). Work supervised by Prof. Hugo Sereno Ferreia and Prof. João Pascoal Faria. With collaboration of Prof. André Restivo.

Each node has a README.md in its folder with further information about it.

Available Nodes

Checks if an action was completed by using sensor acknowledgements.

Balances the distribution of messages through multiple outputs using three different strategies: Round Robin, Weighted Round Robin and Random.

Acts between a node sending a message to another, storing the last one in local context and resending it after restarts, if it's within a specified time to live.

Compensate missing values (detected by disruptions on the periodicity of incoming mesages) with a pre-defined strategy (e.g. average of the last 10 readings, last value or maximum value of the last 10 readings).

Delay a command (message) in order to meet the actuator response capacity (e.g. avoid overload). Similar to rate-limit-messages, but with different strategies.

Enable and disable Node-RED flows during runtime (local or remote instances, using the available REST API).

Provides a heartbeat probe for MQTT and HTTP.

A node to continuously scan the network to find working IPs at ports 8080, 443 and 80.

Kalman noise filter.

Continuosly scan the network to find new or removed devices. Can be combined with a device-registry.

Manage redundant instances of Node-RED (setting a master instance). Works only on the local network (uses n2n communication).

Drop values if they are in or out of a given threshold (e.g. two close temperature readings).

Picks a value (e.g. sensor reading) from an array values based on a pre-defined majority.

Monitors system resources, ranging from battery levels to resources usage.

Checks for reading (value) sanity (e.g. checks if the reading is between the sensor possible output values).

Checks for timing issues on data inputs. There are 3 outputs that refer to data comming on expected time, too slow or too fast. A frequency in seconds along with a margin (float: 0-1) should be provided.

All the devices that are reachable can communicate with this device in order to store their information and current state.

To be implemented

internal-state

Stores the internal state of all flows, making it available to different Node-RED instances.

How to Use

Installing node-red-contrib-self-healing for development

  • Clone or download this repository.
  • In your node-red user directory, typically ~/.node-red (in Windows something like C:\Users\<my_name>\.node_red), run: npm install <path_to_downloaded_folder>/node-red-contrib-self-healing
  • Start (or restart) Node-RED.
  • Nodes should be available under the SHEN tab of the node palette.

Running tests

  • First run: npm install

  • Unit tests for every node: npm run test

  • Unit tests with coverage: npm run test-coverage

  • Mutation tests: npm run mutate

  • Property based tests: npm run test-pbt

  • Acceptance tests: npm run test-acceptance

Helper documentation

Citing this Work

If you find this code useful in your research, please consider citing:

Visual Self-healing Modelling for Reliable Internet-of-Things Systems (ICCS 2020)

@inproceedings{DiasICCS2020,
    author="Dias, Joao Pedro and Lima, Bruno and Faria, Joao Pascoal and Restivo, Andre and Ferreira, Hugo Sereno",
    editor="Krzhizhanovskaya, Valeria V. and Zavodszky, Gabor and Lees, Michael H. and Dongarra, Jack J. and Sloot, Peter M. A. and Brissos, Sergio and Teixeira, Joao",
    title="Visual Self-healing Modelling for Reliable Internet-of-Things Systems",
    booktitle="Computational Science -- ICCS 2020",
    year="2020",
    publisher="Springer International Publishing",
    address="Cham",
    pages="357--370",
    isbn="978-3-030-50426-7"
}

A Pattern-Language for Self-Healing Internet-of-Things Systems (EuroPLoP'20)

@inproceedings{DiasEuroplop2020,
    title        = {A Pattern-Language for Self-Healing Internet-of-Things Systems},
    author       = {Dias, Jo\~{a}o Pedro and Sousa, Tiago Boldt and Restivo, André and Ferreira, Hugo Sereno},
    year         = 2020,
    booktitle    = {Proceedings of the 25th European Conference on Pattern Languages of Programs},
    location     = {Irsee, Germany},
    publisher    = {Association for Computing Machinery},
    address      = {New York, NY, USA},
    series       = {EuroPLop ’20},
    doi          = {10.1145/3361149.3361165},
    numpages     = 8
}

node-red-contrib-self-healing's People

Contributors

afoxys avatar andremsgomes avatar dependabot[bot] avatar inesfalves avatar joaonmatos avatar jpdias avatar lilianalmeida avatar migueldelpinto avatar nasgregorio avatar salajes avatar unlimitedspeed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-red-contrib-self-healing's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.