 There you go. Okay. So, I'm Stefan. I work as a pre-sales engineer for IBM. Our director ordered me. If you speak to the geeks, you have to wear jeans. So, I had to buy jeans after 15 years. So, and I'm going to talk to you about Node Red, which is a nifty little tool. If you have short attention span, that is all what you need to know. So, read it nicely. I wait for you. So, okay. So, Node Red was designed by the IBM research team in Hursley and it escaped from Hursley in with an Apache license. So, it's completely open source. So, now, if you know Hursley a little bit, you know two things about it. First is, it's in the English countryside, so there is no distraction. And the second thing is like, say, the most prominent product that came out of Hursley is actually MQ and MQTT. And we all know our friends in Facebook, they use MQTT for their chat application. So, the ideas behind Node Red are very much driven by this thing. I have a little message with the payload. So, and the core concept is it's a Node.js application. So, all this NPM install and NPM whatever applies there. But the general thing is you have something coming in that is a message that has a payload. So, like, I come in and say, honey, that's the message and the payload. Why are you so late? Well, daddy, the exam didn't work well. So, and then he comes into a Node and then the Node does something to it and then it spits it out in one, zero, one or more messages again that can be processed. So, it's flowing right nicely to the application. So, what is there is like, it can be no input from another Node. For instance, like, say, I'm waiting for a WebSocket connection. I'm waiting for an MQTT connection. I'm waiting for HTTP GET, HTTP POST for a WebSocket, whatever. And it might not have an output Node in form of another message, but like, say, writing something in a database, replying back to the HTTP request. So, that's the general mechanism how the whole thing works. And then we got basically three Node types, something that creates input but doesn't have an input, something that transforms things, something comes in, something goes out. And then output that goes back to the calling system. In the transformation ones, we have similar run the function on the payload or run the function on the message, typically the payload inside the message or actually take the data, query a database and change the payload or write it out in a database. So, it can have side effects. And then when we look at that before talking a lot about that, it runs, if I could get it to run, in IBM Bluemix, that's our platform as a service, it runs on your local PC and it even runs on a Raspberry Pi, which makes it easy, cool when you play with IoT and you want to simulate some hardware you don't have yet. You just write a little Node Red program on a Raspberry Pi and simulate what's going to be your future hardware if you haven't developed it. So, let's have a quick look at that. So, where is my Node Red? So, there is, I got two of them. Oops, that's my web one. Does that work? It seems to work. Okay, well, this is, I can show you the local one. That's nice. So, local host. So, this is the UI. So, you have the input nodes here. Then you have output nodes. You have functions. Like I said, this is basically running a JavaScript functions. You have all sorts of interesting things. Like I said, TCP requests, switch statement, change statement, XML, whatever. And then the interesting part, ready made nodes for social. So, I can say I can lure on Twitter something coming in. I can send something out and then, then storage, tail file, Dropbox, what have you, analysis. And here I played around and tried to make my own. And you remember last time we had the guy who showed us the enigma? So, I managed like I, I managed already to get the enigma node as a Node Red node. And I, I'm going to have the bomber, like say, when I have the next boring flight. And then, down here, these are, oops, down here, these are nodes that talk to light blue bean. Let's say an Android, not Android Wolf. An Arduino with a, with a Bluetooth shield or the spark core. That's an Arduino with a, with a Wi-Fi shield. And then, then. So, when you look at this, let's say, very simple one. For instance, this one, I look at it and says, okay, I'm waiting for a GET request on the URL, are you? And if it's happy, then I, I'm sorry. And this is just a name. And then, once the GET request comes in, I have a simple switch statement, which says, don't, don't I have one? Go to one. Do I have it? Yes. Go to two. If it's not yes, go to three. And then I can then here simply have a HTML template. Go out and, and write something back. Simple example. The more interesting example is actually in my, in my online one. By the way, the online one is slightly different because we have all the, the IBM stuff there. So, like say, IBM, HTFS, IBM hosted Mongo, Cloud, and that's CouchDB. And then all the, everybody is raving about Alchemy and Watson. So, you can actually query Watson just like this. So, light example, my little favorite. So, I have, this one are my manual things. So, I can go and do, do stuff. But what I do here, I'm waiting for a, a post request. That was a sample for customer. Then I go and say, okay, there might, I don't know what's coming in. So, I go and clean up the stickers. I only want to have a bulb with a number. And then I said, based on that said, okay, I need to, for my, for my web socket, that's good enough. But for my push over notification or my, my, my little Arduino that sits there, I need to have a little bit of a function there. So, I go there. And when I, I execute that. So, you see there is one is connected. This is already this one. My little bulb. So, I don't know where it is. And then when I go and said, I do a post request, I use curl in a, in a terminal window. And then eventually it will go. Did I switch it on or off? Let me see. Oh, yeah. Bang. It goes on. So, that's the whole magic of the, of the, the thing. So, you just went and draw the, the things out there. While it was doing, I had a debug window. So, these little, these little green items are the, are the debugs, which, which can be switched on and off. And then I see, here's, here's stuff. When I try to, to use a note, let me just go, not messing up my answer. For instance, so I want to talk to Spark Core, drag this over there. I get a bit of explanation here on the site. You double click and said, okay. And then use, you fill in whatever parameter is required for the respective stuff. So, that's pretty okay. And then you click on deploy and the whole chip bang goes out. That's the whole trick. We have basically, Apple had this, there's an app for that in Node-RED. There's a note for, for that. So, just going back to the, so that was a quick demo. Community, that's pretty cool. There's Node-RED.org, since it's open source, where you can go and they have ready-made sample flows. You can copy and paste them. There is in the, in the menu is, there is paste from clipboard and it generates them for you and they are ready-made notes for all sorts of things. So, I just preloaded the page. That's the library. It's flows-node-RED.org and I said, these are all stuff. Twilio, push-over, NMI, graph, what, whatever you find. For the hosted one, of course, you don't get a serial connection, but I say, when you run it on a Raspberry, you can connect to all sorts of sensors and they are ready-made notes for that. And they're also ready-made examples of how the flows look like. Yeah, for instance, like, say, talk to the U, light bulb, talk to an FTP server, have a global cache, and, and, and, whatever. And this one is quite amazing. I looked at it two months ago. There were about 10, 15 flows there. I think it's now about 200 or so. So, that's pretty cool. But you will get to the point where I said, yeah, but I want to make my own. And this is pretty, pretty straightforward. What you do is you create where your node-RED, which you actually can install npm, install node-RED. There is directory nodes. You create a sub-directory. You create two files, one JavaScript file, one HTML file. I'll show you that in a second. And your nodes are ready to go. Of course, being good boys and girls, what you do is you create an npm module and then share it back on GitHub, register it on npm. And when you use node-RED as a tag, it automatically shows up in the node-RED website as a flow. So, what you need to do, that's the, that's the code, what you, what you have. So, that's standard JavaScript, export. And then you simply pass in RED, in capital letters, you have a function that does your stuff. And the function has basically an on-input method that gets data in. And with node set, node.send an array, it gets data out. That's the whole magic of the whole thing. And the second part, what you need is like, so that's, that's where the work happens. And this is where, so just the fourth. It needs to be a function. You create a node on input, on close. And then you have a register type. So, these are the four key elements, what you need to know on the, on the, in the my node. Then you need a pretty one. This is the my node HTML. So, you have basically three scripts. One is data template, data template name. This is the form that pops up when you double click on the node, which is nothing special. Then you have a data, data help name, which is linked by the, by the same name of the element, which is the help text that appears on the site. And the first paragraph is, that appears when you hover. And then you have a little bit of JavaScript where you register the type with the default value. And they said, how many inputs do I have? How many outputs? Just to, to sum this up to make this very, very clear. So, it's, I say, you need a one script data template, a one script data help name, and then one register type. And then off, off your node goes. This is all what you need to do. And questions. Tim. How do you feel about this in, is this a toy or is it something that people use for, it's not, not necessarily this particular thing, but also like, select flow based programming, visual programming stuff. How do you feel about that as like a tool for professional development? Okay. So, there is a large chapter in the, in the book, how to integrate that into Express. So, it has a very good value. All things going in and out. So, especially when you look at IoT, like say, it's, it's a headache to code that in, in JavaScript manually, and they're just dragging node in there. So, I see it as, take a few of the boring pieces out. What I have customers do actually is quite pretty cool. They took the node red editor, took all the nodes out, and then they suddenly had nodes customer and invoice and, and stuff like that. So, it's a, it's at the border between programming and like, say, having tech-saving users manipulating things. So, and it's, it's rapidly evolving. It's just out, the guys in, in Hurstly are in the process of writing a red book about that. This is redbook.ibm.com is a huge free library of technical knowledge. And this just started this week or this, yeah, this week. And I'm not there. Long story. So, I think it's, it's pretty good to do something rapidly. Since at the end of the day, it runs as a normal Node.js application. I think it's quite valuable. For heavy lifting, you will see, for instance, Nikolai did a demo with like, with the NEA environmental data. And instead of having an HDB pool data and blah, blah, blah, he just wrote a NEA haze data node. And then he said, okay, I give it, I can then very easily assemble something that I don't need to have the brightest programmer to do so. So, I see this, this split between people making nodes and then people assembling them a little bit. I haven't tried that yet. But you probably, let's say it's an npm module. So, you just refer to it and call the function. Okay. Oh, the IIT I think, so the light is on right now. And that was it, that some, that was this example here, this one. So, it basically turns, does a call into the, into the particle network. And then when my measurement device, which I simulate here with a little, with a little curl script, and I get a signal and then gets processed. And then eventually the light goes off. Because I'm too stupid to do something else. Okay. Yep. So, just the message goes out, light goes off. Yeah. And then, yeah. And that's, that's the interesting thing is like, say, I have a single signal. And then somebody decides, okay, I not only want to see it on the website, I want to see it on a physical device. And the only thing is what I did was, was to go and said, okay, this is, this is my web socket. And this is my call to, to the particle API. And they feed on this, on the same data stream. So I then can decouple my systems nicely and said, I'm not quite sure I have all these inputs. I have all these outputs. I'm not quite sure how they're supposed to be connected because that might be an engineer or business user have different ideas. And I said, okay, I give you a Node-RED UI, have fun. Sure. So this being used as a prototyping? Yeah. Is it just for prototyping? Or can you actually run this code somewhere? And what is actually the runtime that you have to run it? Just Node.js? Yeah. So the very moment you change something in the script, the deploy goes on, and then you deploy that. And the rules that you set up are basically picked up by a piece of Node.js code, which then goes and said, okay, I wait for the respective input you have specified. And once that happened, it executes in the Node.js loop. I'm not sure whether you can remove the UI and just deploy the runtime. I haven't checked it yet. That was one of the things I wanted to ask the Redbook guys. The guy who wrote that has one Node module. If you go to the Node-RED website, where he provides a command line interface where you can go and deploy flows and do all this from a command line interface as well. So you don't need to go to the UI and draw things because, like I say, you might feel that's a bit kindergarten. Well, and I do have customers who actually run that in production-like environments. So it's just that it's silly and rounded lines doesn't mean that it isn't robust. Because at the end of the day, it doesn't run through the graphical environment. It runs through a standard Node.js program. And I say, if you want to scrutinize it, it's all on GitHub completely open. Okay? Any more questions? Thank you so much for listening. Off to the next one.