 Last speaker didn't show up. Let me quickly give you an introduction in a Node.js Node.js is a is a application server it's built on top of As a note, sorry a Node.red is an application server that is built on top of Node.js Has been developed in the IBM lab in Hursley That's the guys who brought you the MQ and the MQTT protocols and it has been contributed to the JavaScript Foundation as a top-level project So why would I care so? Node.js runs on Basically anything that has a CPU so I run it at home as my command center for for the home automation on a Raspberry Pi I have one instance running here locally on the on the Macbook. I have another instances running on IBM's cloud in in blue mix and What it does you see here a nice little Sample I have nodes on the left-hand side and I can just drag and drop them on the page and then depending on what what I do I straight away can can make it do things and here's the first Example I have an input is it hard to see it's it's a little glow that is an HDB input Then I process some feelings and then I have a HDB output quick one when I say I look at the the input Double-click and says it listens to get and it listens to the how do you all URL and then it just Puts the output so that when I go there and say okay copy tap flop Any glass otherwise I don't see anything. Oh, yeah. I already have it. I said, how do you I get a little funny application? Okay, how do you feel I said oh I'm feeling good and I said Glad you here feel good. I you see the parameters just at the top of the URL. I said, okay, I feel bad and Say sorry. Yeah, you feel bad. So back. How is it done? The feelings is actually a subflow where I said, okay, I have an input coming in I have a condition that says okay if it's missing go to one if it's good go to do It's not good go to three and then I have simply a little HTML template that spits out the things I want to do so very very straightforward just track things a lot other thing is typically I say I want to go and Capture a form input and I I write a nice little HTML form and I want to store it in a database So I'm not going to write the HTML form, but I show you what I would need to do to capture form data into like say Mongo or no sick or I don't like Mongo so much. I like couch to be much better I know the guy who wrote it. So Like like a personal favor. So I need an input. I said, okay, I need an input from HTTP Double-click. I said, okay, of course. I want to watch for post and I would say sample form Up and then I said, okay, this needs to go to in a database So I go down and said, what do I have in databases their function social our storage? Okay, there is cloud and that's the IBM flavor of couch to be so I send that to cloud and and of course every HTTP input you send a request. You need to get something back from a server. So I need to have an output So where's my output? No HTTP response Up Up and then I press deploy and my application is done. Okay cheated a little bit here It straight away recognizes that I have a This one is the version that runs in the IBM network. I have a database pre-configured I just need to give it a name in where I want to store it and That's that's all I I need to do and I say deploy off it goes so that's as fast as you can go and Update something this is a life-running example, so I'm not going to mess it up The others so where do we have it the other thing is like say we we love IoT so there there is there is an input node that says, okay Talk to the IoT network in this case the IBM network. I I catch temperature data and then and I straight away can out output Data as well and a little bit more nicer example than they're gonna have a look where does the stuff all come from? Could you could somebody humor me? So this is I a little bit more complex example where I said I have a Manual switches. This is for my test then I go to Note that this called an object cleaner said anything in my JSON. That is not bulb. Just throw it away I wrote this when I was bought on a flight And then I can send it out ups. I can send it out To web sockets or I can send it out to my let's switch yesterday if somebody I talked about blinking LEDs This one would make my LEDs blink and then that's just for the sake of fun I Go to bulb Okay, where's my mobile phone? Could somebody you let me go to the same URL Mobile phone and then go and press the off button Because the light is on Now the lights off on okay, I know So what is what is doing there in this case? I use a simple HTTP get to get to the beginning Yeah, yeah fun. I know I get to the beginning of my input in this case. I allow I have a ability to take a post I also have a ability to to get a Get no switch Balbon. Just listen to the Balbon URL And you get requested comes in but send it out and there he goes So the whole idea is you have a note The notes talk to each other with Jason So they pass on the message object the message object has various properties the default properties is message dot payload and This is where your data is you pass along So why is it super interesting if you go there? There is the node red dot or a G That's the that's the main page where where things where node red is described There is detailed instructions, but the real interesting thing is is the flows. This is all the nodes that people have Contributed to the node red environment So it's not like say what what comes out of the box if you feel like I want to have something special You will you can find something here or you can build your own for instance One of my little works in project which I had that time to do you all know the story of the enigma and the Bomba and I Started to create a node that we redo an enigma So you put a text in you have encryption keys and it comes Garbled out or you put garble in with the right keys it comes back out So when I when I go there and say, okay Is there something enigma? No, I got not enigma Yeah, there is a as there's no dread contribute enigma That's from the from what the what the Germans used on their submarines if you look a little bit closer, there is tons of notes ready That so their sample flows and their notes ready for all sorts of Devices external endpoints especially when you're running on a raspberry pi you have all the sensors you want to actuate with You will find ready and ready notes in there So if you feel like okay, this is nice. I Assemble something but something's missing There's instructions. It's Two HTML files and one JavaScript file You need to write to create your own little note if you publish that on on NPM and you tag it with no dread Contribution it will automatically end up in that list to so to make your Your contribution automatically available to anybody who wants to Wants to work and the nice little thing is How do I get it into my note node? Yes. I can simply go there and say it okay Configure obses that manage pallet. So there's all my my things and they said okay I want to install a new one. I know sailor things and not not in Enigma So there is this this is what ages ago install that and then it's a It's straight away downloaded loads that to my to my node and then when I look around suddenly I have where is it socials at one where did I put it? Down here encryption enigma and then I can straight away go and use it in my project So if you want to rapidly prototype server Node-red is a very very simple way supports all protocol HTTP MQTT MQ It has storage back ends for relational non-relational databases The lodge you can express logic with little shower script snippets. There's a very very efficient way to to make your project fly Question that typically gets asked is a yeah Do I have to have this UI on the server all the time and the answer is there in the initial version? It was the case, but they now have separated so you can have a node red runtime Which only executes your flows and you have a node red UI where you can then say I deploy flows into into a running system the next question level By the way, there was yesterday my blinking lights node So I press all the buttons and my lights start blinking if I want to share this information I can go the simplest ways I go there and said okay export to Export to the clipboard and I said the current flow and it basically you can see that This is all a big fat JSON file in case you want to wander like so You just hit deploy button. Where does my JSON get stored? Is it lost when my server shuts down? There is simply a dot node red Directory in your home directory where there's a JSON file that represents the flows and The only thing is that's a little bit odd to normal programming is that the flow also has a coordinate where the little Node was on the screen Other than that. Okay. That's was the the short and skinny on node red questions It's interprets a JSON file So it's a it's a runtime engine that basically takes takes the flow JSON that you generate in the visual editor and then More or less acts like a express middleware So under the hood they use an express server and you can if you want to put express middleware in front or behind The the node red process if you want to It came out of the Internet of Things corner, this is course likes a Hursley The Hursley lab in in the UK. They deal with MQ and MQ TT So they're prime for Internet of Things so that was the idea But the general principle is message passing so you have a message object with a payload and that is passed from processing step to processing step and What the payload does? That's up to you. So it came out from Internet of Things It is used a lot in Internet of Things especially with a contribution for all the sensors and actuators, but I've used it in workflow applications for travel approvals I use that in alerting alert systems so I get an alert in from a from a network monitoring tool and then decide on day of time and whatever whether I send out an SMS or an email or a Network probe to somewhere else. So it's up to basically up to your imagination. What you want to do there? I have no clue I say I haven't performance benchmarked it yet Well, I guess it's it's not that hard because I say the first impression is oh There's all this graphics that must be huge performance overhead, but that's the admin UI That's not the runtime the runtime is just taking in the JSON file and Based on that one picking in execution If you if you look at the at the source code, we'll have a source code ready. Oh, maybe let me let me see quickly whether I can find one Got five minutes That is out get up So this is the whole thing is open source you can just Yeah No, don't Where did I did I put it in there about x tough cookie? Oh No, not not that and we will do the other one documentation and this Where is that platform API creating your first note there you go So that's basically What what a core function looks like so I say I have I Defined the function what I what I want to provide this example is very similarly take take the input lowercase it and Then you have the this on input and execute the function and what the node JS runtime does it basically looks For this type of functions and then calls them so the overhead is probably relatively light compared to Because when you do when you write an express application more or less do the same thing in the middle where So mentally it's just another piece of middleware Of course if you have 10,000 steps in your flow while that takes it takes the same Similar time and you have 10,000 pieces of middle where you hook into your express application Not to my knowledge that would be a brilliant project that's that's up your alley actually Okay Let me repeat the question whether I understand so the Fully down is let's say how do I do state management in the notes? Okay, so it's a no JS application So they handle they have a global state object So you have no dread dot globals and there you can put your all your states objects in there as well It's like say at the end of the day It is export a function and you can keep a state inside a node as well Each node also has configuration objects you can attach so you can keep a Configuration object update with like say specific settings or eventually state of the node That's a good question So this is interacting so the best of my knowledge so what I use myself Is the smallest one was a Raspberry Pi first generation that's enough to run it of course It doesn't run large workloads, but like say it was good enough to run all the lights in my home Personally, I haven't so Basically node node red will run on any system that is able to run node. Yes So because it's build a node. Yes, if you get on the system if you get no JS to run Most likely you can run node red as well Yes Well, I say no guarantee on performance. Anyway, it's ten bucks for Raspberry Pi light. So Okay, any more question Okay, thank you