Node.js on the Road: British Gas Connected Homes: Business Overview

Node.js on the Road is an event series aimed at sharing Node.js production user stories with the broader community. Watch for key learnings, benefits, and patterns around deploying Node.js.

Rudi De Sousa, Head of Web at British Gas Connected Homes, talks about their use of Node.js.

Rudi De Sousa Head of Web
British Gas Connected Homes

Right, so Node.js and British Gas. Now this is going to sound a bit weird. How many people here know about British Gas? Know who they are? How many people thought you'd see something about Node.js at British Gas? Well, it's not traditionally the kind of company that innovates in this space, and for those who don't know who British Gas is, we're a utility company. Pretty much one in every two homes in the UK is supplied by British Gas, and one of these companies they are owned by Centrica.

Centrica tends to earn about a billion dollars profit every year. They're very controversial. There's a lot of debate in the UK about all these things, and that doesn't strike you as the kind of company that's going to jump out and go, ooh, let's do the Node thing, it's like, this is not going to be the thing. So what happened was, I was at Now TV and at BSkyB we built this cool thing. It's like this British Netflix-type thing, and I've worked with a guy called Kassir Hussein, and Kass left, and he went to British Gas.

And what we're trying to do at Now TV, we spinned up a new brand, and basically the whole purpose of that was to enable us to innovate without damaging the core brand. And so that's an important thing. So when it comes down to "how do you get Node into production?", companies are scared because if you screw up, you make them look bad.

And one of the best ways we found to do it is spin up another brand. Still part of the company. If they're really worried, and they're really scared, then try and convince them to do this, it works, and then what they can do when it all goes wrong is they kind of go woo! That wasn't us. And so we did that at Sky, with Now TV, it was a great success, we started with 2 people, we grew into a team of 120, Kass left, went to British Gas, convinced them to take the original points, that we had at Now TV with this concept of a sub brand, and said, right, now we're going to do at British Gas and we called it Hive.

So if you're confused and you see a lot of Hive, that is what we do, and it's effectively the connected homes part of British Gas. So what we're doing there, this is the Internet of Things at British gas, and that's not really the thing, we'll come back. So a little bit about me, for those who don't know me.

That's my wife and daughter. They are the best thing that ever happened to me, and I can't say any more, but I love them to bits, and that's what my entire personal life is about now, and I've got another one on the way. This is my Twitter handle for those who care, and why I'm talking about enterprise is I pretty much spent my whole career there.

You guys, a lot of you I've met you at lxjs, you're already cool, you're all startup-y and amazing, and you kind of have this amazing vibe about you, and it's really, really cool. I never did any of that. I spent my life fighting my way through these types of companies and trying to convince them to do stuff that you guys just do naturally. And that's not been easy, but we started winning the battles slowly. So I think I can talk about enterprise in some way, shape, or form.

So what are we doing? So, connected homes are set up in order to play in this IT space, and generally you don't mention your competitors. It's a bad thing to do. But considering we're in Lisbon and a lot of people might have never heard of Hive or British Gas and various other things. I figured the quickest way to explain this is Nest for those who don't know we're basically building Nest. And there was a good reason why we decided to do this, and that is the UK market and the US market, it's very different.

So in the US market you tend to have one type of boiler, it's 110 volts, people can selve install it, they know how to go about it, it's a much easier experience to get your Nest set up, and you can check a box off the shelf go home and do it. When you come to the UK, it's very different in that, it's 240 volts running through your electricity system, you shouldn't play with that by the way, when you play 240 volts, you might die, and there's about 20 different variations of boilers that do things like hot water, heating, all that sort of stuff, and we decided to engage as British Gas because we knew that this is going to become important.

The data that the stuff generates, there's a reason why Google bought Nest for $3.2 billion, and there's a reason why we're in this space, it's to make the world better. I know that sounds very condescending and there are some people when it comes down to IT and data that they wanted to use that data to do things that you might not like. But in reality we've got a massive problem on our hands in the world. We're going to run out of energy, right? There's already wars breaking out because of it, everything is going a little bit funny.

We're going to run out of it, whether you like it or not, we got to get smarter about how we use it. And products like this enable us to get an idea of how we use our energy profile, what it does, and how we can go about improving that, so turning off things when you're not there, that kind of thing. And this is only the beginning, so we started in this space because Nest started in the nascent market, they started producing something that none of us knew we wanted. They created a whole new market. We followed in their footsteps because they are the leaders in this, but it is growing so we are getting, you know, you think about all the places it can go, you think about door locks, security alarms, carbon monoxide detectors like Nest have released. When these things all start talking to one another it starts becoming an interesting space.

I think that people like [xx] will hack it and make a Parrot AR drone fly around—we'll figure it out, but this is only the beginning, and we want to expand this universe out. And so when we started talking and I started with Kass we had this conversation. This is a very common conversation to have an enterprise if you want to do the whole Node thing.

It starts at the top because most people default Java, Java, Java, we're going to do Java, that's all they know how to do Java, Java and then you are going to start, why do you want to do Java? Because they say, Java, Java. And I come from Sun. My early career was at Sun and it was the best company I ever worked for, complete disclaimer, I love Java, I got to meet Gosling, I think it's a great thing, I'm not going to diss the Java language, but Node. A couple of years ago I started focusing on Node, and there is one fundamental reason and again a certain company bought another company, you might have heard about this, associated to that thing on the top and then when that happened, this stopped, so Java used to be this and it was awesome, and we all used to run around, go to these kinds of conferences, we all used to be like, yeah, Java, Java, Java and would be cool, and then that company bought the other company and that company bought the other company and I worked for both of these companies.

You figure it out and then that this stopped happening, and then it started happening somewhere else and amazingly Joyent for those who don't know, there's a lot of ex-Sun guys went over to Joyent, and they took some of that culture with them, and so a lot of that started spilling down here and started getting really cool.

And for disclaimer, JavaScript is not the greatest language in the world, and neither is Java, and neither is Python, and neither is any of these things. It's not about them, right? Learning how to code is easy, learning how to be an engineer that's the hard thing. And you can only really become a good, solid software engineer when you got the support of people around you, people building the modules that you use day-to-day, the test frameworks that you use day-to-day, learning from experiences like the guys of Walmart and Black Friday, these guys have paved the road for a lot of us. They've been my reference point for a lot of these awkward conversations around Java and Node for a long time, and this is how you become a software engineer.

You work through it as a group, and this is why Node is, for me, the place where I want to be right now. Not because it's the best thing since sliced bread, not because it's going to change the world. It's because of what we do in this kind of space, and that was my rationale when I started pitching this to Kass and co.

In reality, I got a no to start with and you'll get a lot of this. They don't like change. They just don't. That surprises no one. They like the subtleties, they know how to hire people. It's like, oh, how do you hire Java developers? You go to market and this is the spec that you use, and this is how we do it.

Yeah, we're fine. And then you go, OK, where can I get Node guys? And then they're like, oh shit! I got to change the whole thing and how do we go about doing this and how do we do that and how, then everyone gets confused, and then you hire the wrong people, and we've all been there. I don't know how many of you've done this, or are doing this, stop doing this.

You're a front end developer, and you've now convinced everyone you're a Node.js developer. You're not. Node is not front end, is not JavaScript. You have to learn the differences and the subtleties and that causes a lot of pain in this community because every time someone goes out and sells themselves as a Node.js developer and convinces the world that they're a Node.js developer, and then does something dumb in production because they haven't taken the time to really learn how to be an engineer. We have to sit there and explain why that isn't how it's actually happen to be. That's not the norm, and we constantly have to replay that conversation, and then these dumb faces keep coming up over, and over, and over again, and we need to change that.

But here's the thing about this, and I want to make this point very clear: when this community started in Java and I started getting involved, this was very similar face, this is not a norm, like this isn't something new, when Java came around, everyone was like what do you mean garbage collector? What you mean you don't have any memory management, this is definitely going to fail.

With the JVM? Terrible! How's that thing going to work? Bytecode. It was exact same kind of thing that you've about people saying about Node.js. It was exact same conversations, and I swear to God those faces come up every time someone walked in room and said, we want to use Java, and so again, the reason it pushed through is because everyone worked together to make it a reality, and that's why Node is, in my opinion, going to be a success.

I want to equate something here because this is—does anyone know who Aereo is? People from the States might know who Aereo is, do you guys know? So, this is a company, and I'm not going to get this to really work, I apologize. See that? Yeah, that works kind of, can you see that? So Aereo, basically they developed this cool little thing, you see in the top here, it's a little antenna that sucks in cable services, is it cable services in the States, or the broadcast services? And basically they create big server firms, and what you do is you effectively lease one of those little antennas, and it's a neater way to watch TV in the States, you can pause as you want, you can do all these cool things and you don't really have to have a traditional TV and all this kinds of stuff.

And effectively it was disruptive, and the big companies in the States hated them, and they've been chasing them down for months and months, and months, and months. And in fairness to the guys at Aereo, they've held a good fight, and it went to the Supreme Court last week and they lost which really sucks, but this quote at the bottom here about "the world hates change, yet it is the only thing that has brought progress," and that's the reality, right?

So when you're sitting and talking about the enterprise, ati you try and convince people about Node, remind them of this. Remind them that every time this conversation comes up, it's the only way you're going to move forward if you accept change in some way, shape, or form.

This is
my last slide, and I'm going to hand over to Luke to go to the actual technical presentation. You got to be conscious of this, and doing it our way, but nothing's really changed is kind of the point.

Software engineering has been around a long time, people know how to do it. You can go and find out, the Java community actually brought a lot of the cool stuff. When you talk about test driven development, behavioral driven development, all that kind of stuff, people have done it, they have figured out how to do it, and now we started adapting it. And so this life cycle around development, within Hive, we have co-located teams, we have a product owner as everyone else together, we have this great collaborative environment.

That's been a big thing for us because I can see how we work, we do weekly showcases where we basically sit there and the showcases we do are actually videos, so we found this to be very effective, we do videos, and developers show their work on video and then that gets distribute around the company, and we're very transparent, anyone can come over, that's broken down the panic about Node to some degree.

Because people can feel like they can touch it, they can see it, they can see the people there, they can ask questions. It makes it a lot easier. And then very important testing, we use Jenkins as well, sorry and that becomes kind of absolutely your thing, right? If you're not doing tests then you should start absolutely. And we've got this ambition (I don't know how close we are but we Luke might touch on it a little bit more) that we want to get to continuous deployment. You can't get there unless you do that and do that very well.

So we put a lot of focus, a lot of energy in that, and then that further demystifies Node because again, that's just a software engineering thing, right, but if people have got good tests, and they can see green bulbs, and things aren't breaking in production, then it's like, it's not so scary anymore.

It's OK. Things are fine, like you were talking about doing a deployment on Black Friday. I'm assuming you're bulb was green, right, when that happened. There you go, he's lying. And then ultimately you've got your released and you've got to get really hot at doing releases. At Now TV we had an online leg, and an offline leg, and that was extremely effective.

We started playing around these different ideas, and trying different things, and we were able to do a release and switch the legs on the load balancers without a single bit of disruption to anyone. And again, then it goes back to whole thing, the whole Node conversation and again software engineering, you've got to think about these things, these are important. Suddenly it's not a case of oh we have to restart the service, or the NPM is screwing up, and that's not working, and that's why it's all broken, it all happens on the offline leg, you switch it, it's all transparent and everything ticks along happy and everyone's like, cool, happy days, and this is the point, this is what I want to get across to you guys. Node's cool, but it's cool because of you guys, and because of people like David, and the awesome thing that we, lxjs, and Nuno, and Pedro, and Jerome and all these people make it amazing.

Right, and that's why we're all here. But when you get into the enterprise and you start doing this, become responsible software engineers. Learn, speak to people who've been around a long time. Guys have been around this industry for ages. I mean Max, where is he? Max Brunning. See that guy? He looks miserable sometimes, but he knows stuff that most of you usually, he's forgotten stuff you guys have got to learn.

And go and speak to people like that, take what it means to be a software engineer and apply it because then suddenly Node demystifies and you'll have that conversation a lot easier, and so I'm going to stop now. I'm sorry if I bored you. I'm going to hand over to Luke who's from YLD. Luke is one of the principle engineers on a project that we're currently working on within connected homes. Unfortunately I can't tell you what it's yet because we haven't launched it yet, but Luke's going to take you through some of the stuff we're doing on a technical level and I hope you guys can now learn a little bit more than just hear me ramble.

So, Luke.

Sign up now for Instant Cloud Access Get Started