Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hands On Intro to Rapid Prototyping with Node-RED

Hands On Intro to Rapid Prototyping with Node-RED

Often times it can take a lot of time, effort, and programming knowledge to quickly and effectively bring an idea from concept to creation. Even with the countless libraries out there, tutorials and resources we can sometimes find ourselves stuck reinventing the wheel when it comes to building out ideas into production.

Node-RED eases this pain by providing a fast and easy way to create flow-based programs to get your ideas running on either web applications, dashboards and IoT devices in minutes. It is very easy to get started with and is a great open-source tool for beginners and experienced developers alike who want to write and understand programming flow. It can be used for APIs, Databases, IoT devices, Web Sockets, Emails, Scripting, Image Processing, Cloud computing, edge computing, creating websites and lot more one can think of doing it based on Node JS.

In this workshop, we will get hands-on with Node-RED and go over the basics of getting started with building out flows to quickly and easily prototype web applications.

Pooja Mistry

July 15, 2019
Tweet

More Decks by Pooja Mistry

Other Decks in Technology

Transcript

  1. Have you ever had a day when …. You have

    an idea You want to build out this idea You’re not sure where to get started
  2. Wouldn’t it be handy if, when X happens over there,

    it can alert the team, kick-off that business process or just go ping! How do I get the data from that API to give me the info I need to build out that service and have that service connect to my phone Wish there was an easy way to build out a front end and test out these API integrations without building out a whole end to end stack Is there an easier way to test this works!
  3. The Problem When building out applications ( Webservices or IoT

    ) there is not one size fits all solution Applications can often require pulling together different device APIs and online services in new and interesting ways. Time spent figuring out how to access a Serial port, or to complete an OAuth flow against Twitter is not time spent on creating the real value of a solution, and is not easy for anyone but dedicated programmers. Building things can require you to be an expert programmer and you can often find yourself reinventing the wheel
  4. We need tools that make it easier for developers at

    all levels to bring together the different streams of events, both physical and digital, that make up the any application: both webservice and Internet of Things.
  5. Introducing Node-RED Node-RED provides a fast and easy way to

    create flow based programs to get your ideas running on either web applications, dashboards and IoT devices in minutes. It provides a browser-based drag-drop UI for creating flows of events and deploying them to the runtime. The light-weight runtime, built in node.js, is ideal for edge-of-network environments or running in the cloud. It can be easily expanded to take add new nodes to the palette – taking full advantage of the node package manager (npm) ecosystem
  6. Node-RED is… An application composition tool experience A lightweight proof

    of concept runtime Easy to use for simple tasks • Simple to extend to add new capabilities and types of integration • Capable of creating the back-end glue between social applications • A great way to try... • “can I just get this data from here to there?” • “and maybe change it just slightly along the way...” • Incredibly Adaptable
  7. History of Node-RED Node-RED has been more open and popular

    as open source software for both edge and cloud environments. • March 2014: Invented by IBMers Nock O’Leary and Dave Conway-Jones and Released in QCon London • June 2014: Included in the catalog on IBM Cloud • November 2015: Pre-installed in Raspberry Pi • October 2016: Moved to Linux Foundation • As of March 2018: Downloaded 50,000 times a month
  8. Basic Node-RED Nodes Inject node • Allows manual triggering of

    flows • Can inject events at scheduled intervals Debug node • Show message content; either payload or entire object Template Node • Modifies the output based on a Mustache Template Function node • Run user-defined node.js code on the data inputs
  9. Other Input Nodes HTTP – Act as an HTTP endpoint;

    great for building RESTful services IBMIOT – Receive messages from an attached IOT Foundation account Also can receive from Websockets, MQTT (pick your own broker), TCP and MQ Light
  10. Other Output Nodes HTTP Response; required as the final node

    when the input comes from an HTTP Request IBMIOT – send events out to the attached IOT Foundation account Twilio – send SMS messages via the Twilio service IBM Push – Send Push notifications to mobile devices Also can send requests through TCP, UDP, MQLight, WebSockets.
  11. Sign up for IBM-Cloud Get a head start with IBM

    Cloud, sign up via: https://ibm.biz/BdzMZG
  12. Lets create an application that tells you the Weather in

    a different language Insert Inject Node à Connect it to Weather Insights API Node à Connect to Debug Output
  13. Connect Language Translator node to Function Nodeà Connect Text to

    speech to language translator Nodeà Connect change node to change payload to speech à Connect Play Audio to hear output
  14. flows.nodered.org Index of all available nodes - Collection of user

    contributed flows and over 3000 + nodes and flows available
  15. More Node-RED Resources Node Red nodes and Flows: https://flows.nodered.org Find

    new nodes, share your flows and see what other people have done with Node-RED Node Red official documentation: https://nodered.org/docs/ Getting Started - User Guide - Cookbook Watson Node Red nodes: https://github.com/watson-developer-cloud/node-red-labs A collection of examples on how to use the Watson nodes in Node-Red Community Hosted Node Red Guide : http://noderedguide.com/ “ The node red guide is a series of lectures designed to get you stared with Node-Red” Pooja’s Node-RED Demo: https://github.com/pmmistry/Intro-to- Node-RED John Waliki Node-RED Examples: https://github.com/johnwalicki
  16. Thank You Find me on Twitter : @poojamakes Connect with

    me on LinkedIn – https://www.linkedin.com/in/ pmmistry/ Follow my Node-RED Blogs on dev.to : https://dev.to/poojamakes