022 JSJ Node.js on Azure with Glenn Block
The panelists talk to Glenn Block about Azure.
Special Guests:
Glenn Block
Show Notes
The panelists talk to Glenn Block about Azure.
Special Guest: Glenn Block.
Transcript
GLENN:
Ruben told us we were going. [Laughter] As long we cancel those [unintelligible].
TIM: That’s right.
[This episode is sponsored by ComponentOne, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to wijmo.com and check them out.]
[Hosting and bandwidth provided by the Blue Box Group. Check them out at bluebox.net.]
CHUCK: Hey everybody and welcome to episode 22 of the JavaScript Jabber show. This week on our panel, we have AJ O’Neal.
AJ: Yo, yo, yo, coming at you live from the islands of Orem, Utah.
CHUCK: The islands, huh? Is that the traffic island? I grew up there. [Chuckles] We also have Tim Caswell.
TIM: Hello.
CHUCK: We have a special guess and that is Glenn Block.
GLENN: Yo, yo calling from the hot and humid part of the world -- otherwise known as China. So I'm in Shanghai.
CHUCK: Wow. So you wanna tell us a little bit about yourself and what you do?
GLENN: You have to be careful; the last time I did this I went into a 20-minute monologue. I work at Microsoft on the Azure SDK team and our team has the couple of responsibilities; one of the core ones is making sure that server-side JavaScript Node.js works in Windows Azure, and we create a set of tools to help you deploy to Node apps to Azure. And we also create a Node NPM module which will allow you to deploy to Azure from the Mac or from Linux, and will allow you to access services that Azure offers from within -- inside of a Node application -- either running in Azure or outside of Azure. And I've been in Microsoft for about 7 years. I've done a bunch of different, interesting things; a lot of open source related things. The last project that I've worked on before working on the Node stuff was a project called ASP.NET Web API, which is a new framework that Microsoft built for doing like restful type services.
CHUCK: Cool. We'll I'm sure we have a bunch of questions for you about that. But we also had Jamison Dance join the call. Welcome, Jamison.
JAMISON: I'm glad to be here. Sorry I'm jumping in late.
CHUCK: No problem. And I'm Charles Max Wood from devchat.tv. So let’s talk about Node.js on Azure. Is it Azure or Azure? I've heard it both ways.
GLENN: Yeah, depends on who you ask. It’s probably Azure. I mean that’s the most proper pronunciation, but the common colloquial I guess is Azure.
CHUCK: So if you have class, is it Azure and if you are like us, it’s Azure.
GLENN: Yeah, something like that. [Chuckles]
CHUCK: Awesome. So, is Node.js something that Microsoft is actually using in their stack somewhere?
GLENN: We have a bunch of teams that are using Node; and a lot of them I can’t talk about, but what I can say is we are not just using Node, we are not just supporting Node and allowing people to use it; more and more product teams at Microsoft are actually using Node. A while ago, there was a guy who used to work on the Bing team; he worked on an open source project called Anode that is out there on GitHub and he was talking about how his team uses Node and he wrote this pretty cool thing for helping to deploy Node apps actually to Azure. They did a bunch of continuous integration stuff and other things, used to be on the Bing team. But there are more and more teams that are seriously looking at Node.
CHUCK: So if they have a Node or Anode, do they have a Cathode?
GLENN: [Laughs]
CHUCK: Sorry, I have to ask. Can we get a link to that for that in the show notes?
JAMISON: It only gets worse.
CHUCK: [Laughs] Yes.
JAMISON: Brace yourself.
GLENN: It’s off of GitHub. I'll give you the link for the notes.
CHUCK: That will be awesome. So, what exactly does it take to make Node.js run on Azure; is it just as simple as installing Node.js on Windows or is there more to it than that?
GLENN: Well, Azure offers several deployment models. So the traditional Azure model has been a pure pass play -- platform as a service play -- where you just deploy your code, but where Azure differs from a lot of the other platforms with our cloud service models is it will actually assemble the VM for you from scratch. Not just starting from just copying an image, but it actually has the ability to install components and a bunch of other stuff when it’s spinning up a machine for you. And so that model, the way you deploy to Azure is you create a package and that package we have tooling for creating that package. And so, the package allows a set of startup tasks to run once the app is deployed. So what we did to get Node working in that model on Azure is we created a set of tools that would essentially create a package for you, that would install the necessary components to get Node up and running once you deploy it to Azure. Now recently, we're just about to go out the door with an update to that, that will download those components in the cloud, you don’t actually have to package them up. And so, then we heard a lot of people say, “Well, that’s really cool that you can get Node running on Azure, but it takes a while because of the way it assembles things, the way it builds up its VM and anything else.” And difference is with Azure, like when you publish, you get a dedicated VM that you can remotely manage. And it’s also fully load balanced; you can scale up to like 100 instances of that instance that’s running. You can scale up, you can scale down. It’s extremely powerful. But the feedback we heard from a lot of people was, it takes a long time; it took like 10 minutes the first time you publish and about 5 minutes afterwards. And people are saying, “Hey we want Git deploy. And I don’t need a home VM; I don’t need to pay for a home VM, I just need a place to throw my code, where it can execute,” and this is the kind of thing that Heroku offers you or the kind of thing that Nodejitsu offers you. So, then we invested and we created a new model for Azure altogether that allows you to Git deploy applications to Azure. It’s also a platform as a service model, but in this case, you are not getting a VM that you own and operate, you are sharing a slice of a VM and it uses Git deploy. So what we have to do there was to make sure that the environment was set up with Node, so that Node could run in that environment when you deploy a Node app. And we also added support for things like NPM, so that if you send us a package.json, we can run NPM in the cloud so that you don’t have to upload you packages. So, it was a bunch of work that we had to do in order to get Node working in Azure. And another big one was that when we run… like Azure has, again these different models but one of the models is with Node where it is self-hosted. We’re basically just running Node.exe raw. But our other model is where you are running hosted in our web server IIS; so we have to do a significant amount of work to provide a bridge that will allow Node to be hosted within IIS. And what that basically means is like a request comes in, IIS gets that request -- which is our webserver internet information services -- and then what it does is it uses name types to talk to a
Node.exe process. So it’s still spinning up Node; we don’t fork Node or modify it any way, but running within IIS. And one of the things that IIS brings to the table that is nice is it does a really good job of process management; so IIS can easily start up, you know, five versions instances of Node or eight instances of Node if I want a multi-core machine. It will monitor those instances. If any of them lock up or they are using too much memory, it will kill them and it will recycle them. So those are some of the benefits you get when you run in IIS.
CHUCK: Okay. So...
GLENN: Scope of work from the hosting side of Node.
CHUCK: Huh. So, have you had anyone give you any kind of comparison with say, spinning up a VPS, installing Node.js on it and then just doing a lot of the management yourself? I mean, is there really a comparison? Am I comparing oranges to apples?
GLENN: Say that one more time?
CHUCK: So, how does Node in Azure stack up with again, say Node on the Linux system that just a VPS that you rent in the cloud?
GLENN: Sure. Well Node itself… I mean Microsoft invested deeply to make Node work well on Windows. So it performs very, very well. In the early days, Node only works through Cygwin on Windows which wasn’t really proper. So there's now… with libuv and things like that, Microsoft invested significantly to make Node work and perform well on Windows. When you are hosted in Azure, one option you have to is to self-host, as I mentioned, where you are just running on top of Node.exe; that’s extremely fast. There is a little bit of a cost when you are running in IIS. On the other hand IIS can provide you with benefit; like it has built-in caching. It serves static files like exponentially faster than Node, serves static files. So if you are building a site that’s a hybrid of static resources like images and style sheets or other stuff and dynamic things, it actually in a lot of cases performs better than if you would just host it on raw Node. But I would say it’s comparable, but if you host in IIS and you are just doing like a web API, and you are not doing any kind of static file serving, it’s going to be slower. Now, how much that impacts you really depends again on the scale of your app or what kind of app you are building etcetera. But this is why in Azure, we have the ability to use that selfhost model that I was telling you; which also enables you to use web sockets in Azure today as well, because IIS doesn’t support web sockets yet, but it will in the future. But when people wanna do real web sockets and you can do that in Azure by using worker role.
CHUCK: Okay, worker role?
GLENN: Yes. The roles are… so I described how we have this cloud hosting model, where we create this VM for you and then I described the other model, where you just Git deploy. So in order to create the VM for you, we have two kinds of what we call “roles”. You can think of role as almost like a dyno in Heroku. So I can spin up a worker role and a worker role doesn't use IIS at all. Doesn’t use our web server; it’s just raw Node running on that box and that’s the thing that gets web sockets working and it has the highest level of throughput. Then we have web role; and web role is where you are using IIS that enables you to do things like have IIS do static file serving, do caching and a bunch of other stuff that it does really, really well; process management. So we have both those models available.
CHUCK: Cool. Now, Jamison you are trying to jump in. Did you have a question?
JAMISON: Yeah, it’s kind of a change in subject; so do you have any other things you wanna say on this same vein? If not, I'll totally derail it. So Microsoft seems very interested in Node from like a business standpoint. And I don’t recall, maybe because I'm young and don’t remember, but it seems unprecedented that they would invest this much in open source project. Do you want to talk about why Microsoft has decided to put so much behind this?
GLENN: Yes. So one of the things I think is in order for our cloud to be successful, we want it to be open to everybody. We don’t wanna say to you that, “Hey, the only way that Azure is going to support .NET, for example. I mean, that's just silly because we are cutting out a potentially huge market. So I think the cloud is changing the way we think of things because suddenly, it’s like, “Hey for the cloud to be successful, we need to welcome everybody.” In terms of Node specifically, so there were some people from our community which I know Tim knows, like Matt Podwysocki, who was very involved in the JavaScript community. He works on a pretty cool JavaScript framework called RxJS, which Reactive framework for JavaScript that Microsoft builds. But Matt has always been a friend of the Node community… of the JavaScript community and by extension, became a friend of the Node community. And you know, we saw that people were using Node and were saying, “Hey it sucks on Windows. I don’t wanna have to use Cygwin.” And we saw an opportunity there. And I think another thing that really helped honestly was the friendliness of the Node community; that the Node community was not saying, “We don’t want Microsoft to get Node to work well on Windows.” It’s the other way around; it was completely welcoming. So I think the fact that the Node community was very welcoming and open to the idea of Microsoft helping out and Microsoft seeing that this is something that customers wanted; and looking at the way we are evolving as a company in the cloud and how we are realizing that to make the cloud successful, we need to be open to all these different options that were out there, and that’s why another landmark thing we've seen which is announced in June, is we now support Linux VMs on Azure. A lot of people were like, “What? Are you serious?”
JAMISON: Yeah, that's kind of what I said too. [Chuckles]
CHUCK: [Chuckles]
GLENN: Companies like… and there's a lot of hybrids. There's more and more enterprises. Even the companies that do a lot of Windows stuff that are also looking at Node, maybe they have some Linux stuff running in their environments or maybe they have react running on Erlang or you know, running on a Linux sox, but saying, “Well, I wanna be able to use react.” So I think it really makes a lot of sense of sense. Of course for me, I'm a guy who's been very passionate on open source for like the last five years, so whatever is the thing that got us to get there, I honestly don’t care. I'm just happy to see it happening. And it makes my job much easier because instead of me being a black sheep, I'm doing the things that the company wants us to do. [Chuckles]
JAMISON: Does this conflict at all with other Microsoft technologies like, ASP.NET or other web technologies? I mean, is there concern with people will now use Node instead of using some Microsoft product?
GLENN: I don’t think its conflicted. Certainly from a messaging perspective, we try to be very clear that like this not the handwriting on the wall. We are not saying that .NET is going away; we've got a lot of investment that we are doing the latest version of .NET (.NET 4.5), a lot of investments in ASP.NET. What we are seeing is that, look, there are some companies that may even be die hard ASP.NET guys, but they may say there are certain things that Node does really well. And we are saying, “Hey if you want to use it, you can use it.” There's also been other people who just said, “Hey, I just fell in love with the Node model. I wanna use it.” And now those people have a story where they don’t have to go. But in terms of the bread and butter, I think there are still a lot of people that love using the .NET framework. And we are not trying to tell those people, “You should stop what you are doing and just start developing on Node.” So, no. I don’t think it’s been… I think we've been of course careful on how we've done stuff. I think what we've been more concerned with actually is the message that it sends; like how do we do things in our ways that it looks like we are doing the right thing, but were also not causing people like in the enterprise headache that tomorrow we are pulling the plug on the .NET framework -- which is absolutely not happening.
CHUCK: So, another thing that you danced kind of close to that I wanted to talk about for a minute is that, a lot of people kind of see Microsoft as this --- of anti-open source sentiment or maybe just closed source in that sort of corporate mentality.
AJ: Business company; not a technology company.
CHUCK: Right. Is that a conception that people have? Can you address that in one way or the other?
GLENN: Yes. I think that there was a time when we were not as friendly to open source as we are now. But I think a lot of things have changed, as I've mentioned. And it’s not just the cloud that’s brought us there. I mean, my VP Scott Guthrie has been a real driver to taking this company forward into saying, “Hey, we need to embrace open source.” And we all know about jQuery. You know, Microsoft embracing jQuery; that was a huge thing. So I think that the last ten years really, I've been in the company for seven years. Even when I came to the company, there were these… a lot of things were starting to change slowly but surely. We had like ASP.NET Ajax, which was the first big project that was accepting contributions and other stuff. And there was a push to go into this direction, but Scott certainly has helped to accelerate that being in the senior position that he’s in. But I think now, these big pockets of the company that are really looking at how can we embrace open source? How can we make this work? And a very recent example I'll give in terms of the work we are doing with Node is the SQL server team. They released Node SQL server; Node-SQL, which is an NPM module for allowing you to use SQL server from Node, and that's an open source module. So I think that’s part of that shift in DNA where we are saying, “Hey, how do we get into this? How do we make this thing work?” You know, I think for myself really looking at open source for the last five or seven years, I think the challenge in general for companies is how do they operate as a business? How do they find a way to make it profitable for example to do open source? To make it so that it makes business sense. And I think Microsoft has constantly been exploring that and I think we've gone to a point now where we actually see how it can make resistance. Does that make sense? [Chuckles]. No I'm just a small guy in the totem pole though, so just what I see from the things that I've been involved with over the years.
CHUCK: Yup. So one other thing that came up while we were getting ready for the show was that Tim mentioned that you can deploy to Azure through other means maybe than just a standard Microsoft setup?
GLENN: Sure. You mean like Cloud9?
CHUCK: Yeah.
GLENN: Yeah. So that’s pretty awesome. So when I first joined… that was the project that I was personally very involved with, so I can talk about it. When I first joined the team… so, I joined the Node effort when we had nothing on Azure. So it was kind of like, how do you get Node to Azure? What does that mean, etcetera. And so one of the reasons why I joined the effort in the first place is because the way I try to operate is get out there with communities, understand what people are doing; write code myself, I'm a coder so I can figure it out. And then, try to really engage the community and say, “Let’s go do this thing together,” right? You worry that Microsoft is going to screw it up? Great. So, help us. Help show us what is the right way to do stuff. And one of the things we saw that was really apparent was that, “Hey, there's this really cool tool called Cloud9 and it works anywhere; it works on the browser, and people can use it on the Mac and all these other stuff.” And we had a bunch of issues at that time where we were ready to ship something that would allow you to publish the Azure from the Mac or from Linux. It wasn’t because we don’t wanna do it, we just didn’t have the infrastructure to do it. So with Cloud9, it became a possibility of saying, “Hey if we work with Cloud9 and like people seem to really love Cloud9, we can work with them and partner with them to do some work on their side because it’s on their server to help to figure out how to get a compelling story for publishing to Azure from Cloud9.” And so, early on, I went down to the Bay Area with another guy from my team and I met with Matt Pardee, who is an awesome dude, who is an evangelist for Cloud9, and we just brainstormed on the idea like, “What do you think about publishing to Azure?” And they had no idea really what Azure was but they knew it was something big and there are customers that were asking for it, and then we collaborated together. And it was really like a great resource effort. Like, I even wrote code on that, so that was pretty cool. And I worked with Yan, one of the developers and Matt. And we just kind of did this thing as like a project and said, “Let’s see if we can make this thing happen.” And you know, in about two months… I think it was only about four weeks of work -solid work. We got to a point where Scott was able to stand up on stage at Node summit and publish the Cloud9. And that's been a great thing. And it helped us to fill a tremendous gap, because we had no way to publish to Azure outside of Windows and Cloud9 was really the vehicle that allowed people to do that. But I think it was also good just from, “Hey, working with other established people in the community to make their tools work well for Azure.” And that got received really, really well.
CHUCK: So is there a way then to deploy applications from a Mac or Linux that isn't Cloud9?
GLENN: Well now there is. There wasn’t at the time and that was because we didn’t have that Git deploy model. And for the standard Cloud9 model that we have, there is a bunch of tooling and other stuff that was necessary to create that package and it was just not the kind for thing that was going to be trivial to do. We have been very special with Cloud9 to get them in a place where they could do just what they needed to get done, but it wasn’t something that we really could deploy widely to other people. So it worked out well for Cloud9. But in June, we announced (and my team created this), we published an NPM module called Azure. We published that actually back in December, but in June we added a command line tool to that module and that command line tool allow you to create an Azure website right from bash; right from the command line and it will set up and get end point for you, so that you can just push source, push publish to Git and then it will deploy your app to Azure instantly in like 30 seconds. So that is new; that wasn’t there before. It’s written in Node, so it works anywhere that Node runs. That’s been out there since June.
CHUCK: So, what was the way of managing it before? I'm assuming that that’s still there.
GLENN: So we had Windows command line tools, which allow you to create that package that I was talking to you about, and we had Cloud9 that also has the ability to create that package to publish. But we didn’t have a Git deployment type model like we have now. And it’s the Git deployment model that we now fully support on all platforms. We are also going to come with tools that will allow you on the Mac -- even if you are not in Cloud9 -- to publish to the cloud services, that first model that I talked about, we’re just not there yet; but we will be.
CHUCK: Right. Cool. So I'm a little curious then, (I'm going to switch tracks again.) I'm curious if you can talk about some of the things that Microsoft is doing with Node.js. I know that you said some of the teams, you can’t talk about what they are working on, but is there anything that you can talk about?
GLENN: The Anode guys where using it, which was the Bing guys. Yeah. I mean I can talk about like my team like I said we wrote the NPM module, which allows you to access services and things. I'm not really in a position where I can talk about the teams, but I can say that it is some very big product teams, I can say that; not just minor efforts. There is some serious product team efforts, but I'm just not in the position to talk about them.
CHUCK: All right. So anther thing that I'm curious about is that… so Node.js is based on V8 and V8 was written by guys over at Google. (We talked to them a few months ago.) I'm curious if you are so invested in Node.js, if you kind of throw money that way as well, or do you kind of let Google kind of take care of that and then you invest in the other pieces like the uv library and things?
GLENN: Yeah, that's a great question. So first off, I think when we started this effort out, you know, there were people who said, “Hey, what about Chakra?” (Chakra is our JavaScript engine.) And I think at the time, we did the right thing which is to say, “Hey you know what, this is not about embracing extend. We just wanna use what's out there. We wanna let people know that hey, if I write my Node app and it works this way over here, it’s going to work exactly the same way over here. There's no difference. It’s the exact same engine and that’s what we are going to do.” Plus, it’s also I think a timing thing. Now recently, I have heard some people at the recent Node Conf were interested in the idea of Microsoft getting involved and maybe looking at could we have a Node for example that builds on top of Chakra. Chakra is our JavaScript engine that we use in IE. It does some things really, really well; particularly like serialization. It can serialize stuff really, really fast. And do some other things as well; possibly help with some of the domains issues, which is a big question for Node. So nothing has been committed or anything. And I'm not on the team but I do know that it was interesting to see some people coming from the Node community saying, “Hey, it will be nice if Microsoft look at this space and maybe provide with it alternative where I don’t have to run in V8.” We have not made any decision there, but I would be interested to see what you guys think about that. Do you think that’s something we should explore? And Tim, I'm definitely interested what your thoughts are there.
TIM: So, I actually talked to the Microsoft guy at Node Conf about this. I think he was on the Chakra team. I'm not sure.
GLENN: Is that Matt Podwysocki?
TIM: No, not Matt. There was someone else, I think.
GLENN: Okay.
TIM: I don’t remember. Anyway, I mean I think it will be cool. And as you guys know, one of my hobby is porting Node to different engines. And I have a Lua port of Node; I'm starting a Spidermonkey port, Mozilla’s engine and someday I might do a JavaScript core port. And it will be really cool to do it on top of Chakra, but it’s all closed source and Windows only. So, it’s not really accessible. I mean, are there any plans to make Chakra more generic or is it going to be a Windows only thing?
GLENN: You mean would it work cross platform?
TIM: Yeah. Cross platform or even just open source where I can build it around on Windows.
GLENN: So, I am not in a position to say anything about that. One, because I'm not on that team.
TIM: Right.
GLENN: …which it sounds like you did already. But I don’t have any information about that. But what I'm hearing you say is you think it would be something that will be interesting for Microsoft to invest in.
TIM: I think VM competition is a good thing. And as you mentioned, there are some technological things that Chakra is really good at, but it would be great if that was in the mix in the competition as an equal player.
GLENN: And to do that, it would have to be 100% compatible, right? And then have some benefits or not necessarily? Just out of curiosity.
TIM: Well, I mean 100% compatible not necessarily. I mean Spidermonkey for example, its JavaScript 1.8.5, where V8, it’s ECMAScript 5. I mean, they are not quite the same language. And then my Lua port of an entirely different port altogether, but it’s that same API; it’s the same style of code and you just get different types of runtime.
GLENN: So, what's the bar though? Will all of the Node types have to work the same? Like as far as like… like in Lua port, I haven't used it at all; can I take any Node module and just run it in your that Lua port?
TIM: No. That won’t Node modules, but the Spidermonkey one eventually will. And Chakra should be able to as well, as long as you stick to ES5 or some common spec that they all implement.
GLENN: Gotcha. Okay. Well, that's a really good feedback and I'll definitely try that back and make sure some of the guys over there listen to the podcast as well.
AJ: I wanna second that I think it would be very interesting to see Node on different platforms. I think it will help the community to realize… well, a lot of modules should break off the bat because they do have lots of V8’s proprietary extensions that they used. But, I think it will help build the technical skill level of the JavaScript community to recognize the engines that could be available for Node as well.
CHUCK: Yeah. I also love seeing (just like Tim said) the competition between them because some of them do one thing well and some of them do another thing well. And so if you can get in and kind of see the gears that turn when you make it do something that it really just excels at, then you start to see the innovation that one VM had start to show up and another VM. And pretty soon, everybody starts benefiting and everybody starts innovating on new and more interesting stuff. And so, I'm really curious to see where that would go if Microsoft put Chakra into the mix and open it up and said, “Hey, look. This is what we've got too.”
GLENN: Interesting. Yeah, it’s interesting what you are saying because that’s kind of what you see in the clouds spaces as well, right? All these different cloud competitors are pushing each other. And one does one feature and another person comes along and then this one comes and tries to outdo that one. Yeah, competition is definitely a good thing, so I can definitely see the value there. And again, I think getting into the game in a very pure way and just saying, “Hey, we’re going to make what people know out there work well,” I think it was the right move for us and create a lot of credibility for us, but it’s great to see this coming from the community versus us pushing that out. And I'll definitely drive that feedback back.
CHUCK: Yeah. I think we all understand that Microsoft is a business entity and that they are out there to maximize profits and make their shareholders happy and things like that. I don’t think anyone really begrudges on that. But at the same time, it’s always interesting to go through the what ifs and say, “Hey, well, if this were the case, then how would everyone benefit?”
GLENN: Yup.
TIM: And also, from Node’s point of view, besides the competition thing, it would give it more stability. I mean Google has this new language Dart and a whole lot of the other people in the V8 team moved to the Dart tea. What if one day, they stop supporting V8? And Node depends entirely on V8. And we are kind of like, “Ah! What are we going to do?” Where if there are multiple engines, that wouldn’t happen.
GLENN: No, I think that’s a real valid concern. I think that really is a valid concern. And right now too, you know, I think that Google is really in a good place from a… like they are really charting a lot of direction as far as if there are things that needs to get done in the V8 engines, the other guys to do it but if they don’t do it, then you know, it doesn’t happen.
CHUCK: Well, yeah and they are doing a lot of interesting and cool things with Chrome. I mean, they are really kind of charting the course in lot of different areas. And I wonder a little bit too (and maybe you can address this), I get the idea that you are more of a Node.js and Azure hosting person than IE person, but do you feel like some of the things that we’ve kind of laud Chrome for are things that Microsoft or IE really do well that people just don’t hear about because they are not in that community as well?
GLENN: Do you mean like plugins for example, like Chrome has all these different plugins? Like what in particular?
CHUCK: Well, you got the plugins, which I believe most of which can be written in JavaScript. But also, just the tools; I mean the tools in Chrome are really some of the nicest that I've seen. And granted, I'm on the Mac and I don’t do a lot in IE, so I mean, am I not hearing about the IE stuff just because I don’t have my ear to the ground in that area? Or is this Chrome really better at some of those things that IE is?
GLENN: I mean, Chrome has a solid dev toolset. I know that IE9 for example made major improvements. So certainly I would say Microsoft is listening and IE10 further improvements. So, you know, it definitely gotten much better in terms of the dev experience that’s provided for the dev tools for monitoring and other kinds of stuff. But I'm definitely not the expert there either, but I do know that it’s something that we are listening to what people say and that we have made a lot of innovations and improvements, but it’s not my space, so I don’t wanna also say the wrongs thing.
CHUCK: Right. I mean, use the dev tools and they work fine. It’s just, I'm not sure really what it is about the Chrome dev tools that really appeal to me more, but yeah I was just wondering if you have a take on that.
GLENN: What version of IE were you using them with?
CHUCK: I don’t even remember. I think I was doing it with IE8.
GLENN: 9 is much better. That, I can tell you. 9 is much better than 8. They’ve made a lot of improvements to the tooling in 9. And they’ve made further improvements but it’s not my team.
CHUCK: Yeah. I think the deal was that I was doing something in JavaScript and I tested it in IE9 and it worked and I tested it in IE8 and it didn’t; and so I had to figure out what the work around was.
GLENN: I see.
JAMISON: So you wanna talk at all about the just the use of JavaScript with Microsoft as well? Is that something that you know enough to talk about?
GLENN: Yeah I mean, JavaScript…
JAMISON: With stuff like Metro and then I also know when we talked to Steve… What’s his last name? The Knockout guy?
CHUCK: Steven Sanderson.
GLENN: Okay. So the ASP.NET team has been all over JavaScript. I mean, both with the adoption of jQuery as being like the developer toolset and shipping lots of JavaScript frameworks. I mean, JavaScript is taking off in a big way in Microsoft. I mentioned, my coworker Matt Podwysocki and the work he's done with RxJS. Well, actually he didn’t do RxJS it was a team that has done RxJS, which is really pushing the bar on reactive programing in JavaScript. So declaratively wiring up a whole bunch of things and it’s all event driven and it’s a very nice model. But yeah I mean office team, tons of teams; I mean the Azure portal for example is all HTML5 with JavaScript. And not to mention of course the work that we are doing around Windows 8, where you now right full pledged applications in JavaScript that don’t run in the browser. So I would say there is definitely an explosion of JavaScript right now across all the products, really; SharePoint, Office, everybody is getting on JavaScript bandwagon. And you know, I think one of the reasons is that it’s just very easy to use.
It’s a very low barrier entry, it is ubiquitously available everywhere. So, definitely there's a lot of energy there. And then we also have another framework that’s popped up recently which is kind of like socket IO plus nowJS for Node which is called SignalR. And SignalR is basically trying to allow you to do bi-directional communication from the server to the browser. And it’s using JavaScript and it supports long polling and its supports web sockets. And that is taking off like wildfire and that’s like an open source project that two guys on the ASP.NET team started on the side, but now, it’s really taken on a life on its own. We’ve got other things then we are doing on JavaScript; other models that we are working on to higher level, which we are starting to get into higher level application kind of building blocks. Not frameworks, but you know, just making it easier for me to say, “Hey, if I'm building a mobile client-side app and I need to access data and kinds of things, how can I do that kind of thing with JavaScript?” So we've been doing a lot of work. We had a team that had a library called Upshot for example, which was allowing you to build rich client-side apps that are receiving data from the server and using JavaScript to do that. So I’d say yeah, there is a literal… and even the Hadoop stuff that we are doing; there's a bunch of stuff like editors that they are looking at in JavaScript editor. So there's a big explosion of JavaScript going on right now in Microsoft.
CHUCK: Nice.
GLENN: …is really what it means.
CHUCK: Yeah I'm looking for a link to upshot.js.
GLENN: Well, so a lot of the stuff that we are doing now is all open source too. Like a lot of the stuff my team is doing on Azure, you can find it all on GitHub, which is another thing that we've been embracing. So if you do to github.com/windowsazure, you'll see a ton of repos there including Node SQL server including the module that I work on. And I believe Upshot was there. It may not be there, but I thought Upshot is there. But we are doing quite a bit of work of taking our code, making it available, accepting contributions. I know this is not a JavaScript specific thing, it’s just mobile source thing, but I wanted a plugin.
CHUCK: So one other question that I have is how much time do you spend writing JavaScript versus .NET or other languages?
GLENN: I write a lot of JavaScript code these days. But a lot of that is because I'm on the team that focuses completely on Node. I still do write .NET. As a matter of fact, over here, I'm doing a bunch of .NET stuff the team that I'm helping is boiling some stuff on .NET and so I'm actually doing a bunch of .NET for three months that I'm in China. But in general, I do a lot more JavaScript programming these days with client-end server. So I would say probably 85% or 90% am I coding in JavaScript nowadays.
CHUCK: Is that the case when you talk about work that you’ve done to make Node.js work on Azure or was most of that .NET?
GLENN: No. So the pieces that run on the server are a combination. There's some Node code, there's some C++ code like the IIS Node bridge and some .NET code to get the… we have these Powershell. PowerShell is kind of like our bash equivalent. It’s not really bash, but it’s a shell that Microsoft has. We wrote these PowerShell commands; those are written in .NET because you have to offer them in .NET. But we published a whole Node CLI which was written in Node. And you know that’s really cool because then you use it anywhere, you can NPM install dash g Azure and you can find that on GitHub at azure-sdk-for-Node under the Windows Azure organization. That is 100% written in Node; that CLI tool. So we basically enabled a deployment experience to Azure and the ability to create virtual machines and other stuff. And we wrote that thing 100% in Node and we use a lot of the modules that were already out there -which was really cool. We used a lot of modules from Nodejitsu like Winston and we used the async module, we used a bunch of different modules that were already out there -- which is really cool thing. And one of the things I love about package.json also is that it makes it easier for companies to use open source. Because you now, we can just ship a package.json; we don’t have to ship the modules to you. We can just ship a package.json and its opt in on you that you do that NPM installed to get those modules. So I think that’s brilliant that that mechanism exists. But yeah, we've done a lot of Node code.
CHUCK: That’s awesome. It really excites me to see these bigger companies adopting JavaScript in Node.js in this way. And you know, between Google and Microsoft and some of these others and the way that they invest in this stuff, it’s just really heartening to see that they are getting behind the cool technology that just makes the stuff run and work so well. So do you guys have any other questions before we jump in into the picks? I had one more question coming to mind here and that is testing. So if you wanna test your Node code and let’s say you decide you wanna do it in the cloud, is there a good way to do that up in Azure? Do you just run it like any other code or is there more to it than that?
GLENN: For unit test?
CHUCK: Yeah.
GLENN: So, you probably would have to… we don’t have a good story there yet. You can hack your start up command. Like, we have a YAML file and in that YAML file, you can say, “This is what I want you to start for my app by default, we'll look for like server.js or app.js. So you could do some things there to customize to launch your tests. Or another hack you can do is have like a server.js that basically would execute test run or whatever. What we do have is with our windows Azure deployment, like you can deploy to like a staging environment, which is quite nice. And then you can do what's called a swap, where you swap production with staging. So you can publish through a staging environment, test things out and then swap over. But what we don't have yet is like a very continuous integration type mechanism where like you know, some people want (and I think it’s what you are asking) where go to publish, it runs my unit test for me and will let me know if anything failed or maybe it runs my unit test before it even finishes deployment and if the unit test fails, it doesn’t even deploy. Is that the kind of thing you are asking for?
CHUCK: Yeah. It sounds like you answered a lot of it and that makes sense. So you know, you can customize the way that it runs and I think that maybe enough.
GLENN: When you deploy to Azure use your Git deployment, there's actually this project called Kudu that Kudu sits alongside your app; it’s almost like a buddy app and it handles running NPM and doing a bunch of other things. And that is customizable, you’d think that you have to know .NET but one could actually create a customizable Kudu that would run those tests. And you could do that today if you have the fortitude. It’s not super hard. You can search out there. There's a blog post; I can send you a link on how to tweak Kudu.
CHUCK: Yeah. That would be awesome.
JAMISON: There was a missed opportunity to name it “Cthulhu” or “Cthudu” something. [Laughter]
CHUCK: Did you have a question, Jamison? It sounded like you were trying to jump in there.
JAMISON: No. I'm just glad I got one more stupid pun in.
CHUCK: [Chuckles] All right. Well, let’s go ahead and jump in to the picks. We did initiate Glenn, so I don’t need to explain what they are. I usually have the guest go last, which it means that I'm going to make Jamison go first.
JAMISON: All right. So, my pick is just one thing; it’s an essay by a guy from gaming website. The website is called Rock, Paper, Shotgun. It’s a great website. In it, he talks about… so his normal column is to recommend board games to people, like they’ll talk about a new board game each week or something. And this one is a little bit different; he just talks about how he has way too many freaking board games. He has like over 200. And he's so buried in stuff that he doesn’t enjoy it anymore. So I guess this is kind of anti-pick. I'm trying to do less stuff and have less stuff and have my attention less split over things, because I don’t get as much value out of the things that I do and have because I'm doing and consuming too much , I guess. And so that’s kind of what this essay is all about. It’s called Too Many Toys, I think. So I'll post a link in the show notes. I'm trying to find it right now. It’s really great. It says it’s about board games, but really it’s about how less is more sometimes, I guess. So that’s my only pick.
CHUCK: We are going to have to get Jamison an eBay account.
JAMISON: [Laughs]
CHUCK: All right. AJ, what are your picks?
AJ: My first pick is distcc, because I never used it before but I got a couple of Raspberry Pis that I've been playing with. And it’s absolutely necessary to use. It’s a distributed cd and C++ compiler tool. So instead of taking an hour to compile something, on my Mac it will take about a minute maybe or 30 seconds but it only takes 20 minutes because I can split it amongst different Raspberry Pis. So that’s cool. Also, I just went to Chef’s Table, which is a local restaurant. It’s a fine dining experience. And I've previously been to another one called the Tree Room. And they are both really interesting experience. My roommate likes Chef’s Table a lot more because it is much more classy; it’s quieter, it’s brighter. Whereas the Tree Room it’s kind of like walking into cottage, a little bit dimmer, a little bit more ambient noise. If you've never had a fine dining experience, I would highly recommend it just for the sake of it. The food is so good.
CHUCK: Chef’s table is the one over on the hill between Orem and Provo, right?
AJ: Yeah. And Tree Room is the Sundance Tree Room.
CHUCK: Okay.
AJ: I personally like that one better, so I would pick that one. I would go to that one again. I wouldn’t go to Chef’s Table again, but my roommate has the experience, he would go Chef’s Table again but he wouldn’t go to Tree Room again.
JAMISON: I prefer Burger King.
CHUCK: [Laughs] There you go. Royal dining experience at Burger King. All right. Any other picks?
GLENN: I have one. Actually I have two. So there's a module I wanted to plug, which is by Nodejitsu, which is called the Require Analyzer. It’s a Node module. And what Require Analyzer does is before you are going to deploy your app somewhere, it basically checks your package.json, which is the manifest for your modules and ensures that all the dependencies that you need to be there are there. So it’s very useful because I've often found where I go to push something and maybe I didn’t have an --- in the package.json or something like that and then that fails. So its preventative in that it will at least if there's a module that's referenced but it’s not in the package.json, it will still add it for you. So that's actually pretty cool. They use it as part of their Jitsu deployment chain, but you can use it on your own.
CHUCK: That does sounds handy.
GLENN: The other thing I want to plug is a book. It’s one of my favorite books. And so when you first said, “Hey here's a pick.” I was like, “All right. I got my book.” So there's a guy, there's an author that goes by the name of Terry Brooks and he wrote a series called Shannara. The Sword of Shannara, The Elfstones of Shannara. It’s a fantasy book; it’s kind of like a Lord of the Rings epic type thing, but it’s a great series. The first story specially. The first three books of the series. I read them when I was a kid, but I still love those books. They are amazingly rich kind of books. And when I used to read them, it was like I used to be transported to another world. That was how I felt when I read those books; like the richness of the way it describes the world and it’s got magic and fighting and different races and you know, quests to save the universe type thing, but highly recommend it if you like fantasy books.
CHUCK: Yeah. I remember reading those when I was in junior high in high school.
JAMISON: I did too.
CHUCK: Yeah. Really, really enjoyed those. He has a bunch of other ones too; he has like Magic Kingdom for Sale, books. There are a whole bunch of those. And he has The Word and the Void.
GLENN: Yup.
CHUCK: And those are also really good. So yeah, I really like his stuff. I could talk all day about fantasy book.
GLENN: They are supposed to make it to a movie by the way. Apparently the rights were bought to make the Shannara series into a movie, but they’ve been talking about it for like 10 years or 15 years. I don’t know if that's ever going to happen.
CHUCK: Oh wow. That’s amazing. Yeah I've only read like the original seven books; like the first trilogy and then he has the Zion’s of Shannara. And I haven’t read any of the other ones after that. I just started a couple of other ones. There is a prequel to the first King of Shannara. I haven’t read those either.
GLENN: I've read one of the volumes there. It did start to get a little --- for a while, like the character Allanon is like --- [Chuckles] it’s like, won’t the guy die already. [Laughs]
CHUCK: Yeah. No, because he goes into the druid sleep and he lives forever.
GLENN: Right. It does have such a Lord of the Rings to it though. And I read that that is not an accident; that he actually did base a lot of what he was doing or was inspired by Tolkien’s work.
CHUCK: Yeah. That doesn't surprise me. Yeah. All right. Tim, what are your picks?
TIM: All right. So I just got one today. I've been porting a lot of my Node modules to the browser for a Cloud9 project, and just realized that modules and module management in the browser just really sucks and Node has spoiled me.
CHUCK: [Chuckles]
JAMISON: Oh, it totally does.
TIM: I mean, sure, there are things like Require.js, but it’s no, but there's like 15 different ways to define a module in Require.js and they are all different and they are all weird. And then even if you write your modules using AMD or whatever, how do you get the code to the browser? Like in Node, you just have a package.json, the user NPM installs and it works. And so, yesterday I found this tool called JamJS which is a NPM repository for the browser.
AJ: Interesting.
TIM: So you like Jam install jQuery and it like adds it to the package.json that you need jQuery at this version and then it has this customized Require.js that knows how to load jQuery. And I don’t know. I mean, I've played with it yesterday, I couldn’t get it to work for my modules but we need something.
AJ: Is there any good solution there? Like I hear Require.js mentioned often, but…
JAMISON: So Browserify and Require.js are the two big ones. I have a problem with Jam; it still doesn’t let you just make a
package.json type file. You have to like manually put in all your dependency still. So you can’t just ship a file with your project and types command and it will install all the dependencies. At least it didn’t when I last looked at it.
AJ: I'm going to go ahead and plug myself. I've got one called Pacmanager. And it works in most cases. I've found a few bugs here and there and I fixed them as needed.
CHUCK: Huh. Maybe we'll have to get the Jam guy on and then we can complain to him about what we wish it could do. Anyway, yeah that sounds awesome. Honestly. I've always wondered whether or not it was the right place to put everything under NPM, where in a lot cases, you wind up puling browser code out of NPM.
JAMISON: Isaac said he doesn’t mind it as long as people follow… as long as they have package.json file and they do in JavaScript.
CHUCK: Yup. So anyway, it should be interesting conversation. I'll see if I can line the follow up. Anyway, so my picks I have a couple of picks. The first pick is there's a plugin for Chrome that I've been using that’s called Speed Dial 2. And what it does is it replaces the screen that you bring up when you open a new tab. I don’t even remember what it looks like anymore. But it replaces it with… you can actually have a tabbed interface and then under each tab, you can put basically buttons to different web pages that you use, commonly. So you know, I've got a button for my Gmail and a button for my bank account And a button for you know, all the other ones stuff that I'm into all the time. And it’s really, really handy. So then I have… they call them dials, but they are essentially just tabs. So another one for client stuff and I have another one for like development versions of the websites I'm working on for my clients. I got another one for the podcast and things that I’m doing there. So just a lot of stuff going on. Really, really like it. So if you are using Chrome and you want something like that, then by all means, go pick it up. The other thing that I've been using a lot lately is, in fact I just wanna plug in… I haven’t talked a lot about this but it’s something that I've used for a long time and that is Google apps. And so you can actually set up like Gmail and calendars and document stuff all on your domain, which is really, really handy. So I really, really dig that. So I guess those will be my picks this week and we'll go ahead and wrap up the show. Next week we will be talking to… (let me just bring up the schedule here.) We are talking to James Burke from Require.js, is that right? No, that’s in two weeks. So next week we are going to Michael Jackson about Strata or Strata.js. So if you are familiar with Ruby and you’ve used rack or there’s another one that in Perl that all of these are based on, but anyway, if you are using things like that, then we are going to be talking to Michael about his implementation to that. And I understand Tim has also written something that is similar to it, so he can really pick it apart I guess -- which should be fun.
TIM: [Chuckles] Yeah. Connect is also based on rack.
CHUCK: Yeah. So, is there anything else that we need to bring up? Anything else you guys wanna plug in before we wrap up the show?
JAMISON: I just wanna plug my papers in CS group again. We are still going. We just pick a paper once a month and read it. We try and do one that is understandable to a general audience, without tons of background in the specific subjects. Last times, they are old but there are really some cool stuff in there. So I'll post a link to the Google group and you guys should check it out if you are interested in some more academic stuff.
CHUCK: Yeah, that’ll be awesome. Just put the link in the chat and we'll get it in the show notes. All right. Well, thanks for coming. Thanks for joining us Glenn; I really appreciate you coming on the show.
GLENN: Sure. It was nice talking to you guys.
CHUCK: Have fun in China and we will catch you all next week.
GLENN: Oh, I forgot one plug. We are putting on a JavaScript event in China. We are going to put together a Node/Client side JavaScript event for China, in Shanghai. We are working with people here. I'm working with people in the US. And hopefully Tim is actually going to be one of the speakers at that event. And this is just trying to like bridge the divide. And there was actually quite an excitement here building around Node (believe it or not) in the in Shanghai and in Beijing, and so we are going to try and help to accelerate that. And we are working on a bunch of different people. This is not like a Microsoft event, working with AppFog, RedHat, a bunch of different companies; people like Michael Rogers, Chris Williams, to put on events here and it should be really exciting. So this is the first I've talked about it, but you'll be hearing about it soon.
CHUCK: Awesome. That sounds really cool. And I'm always excited to hear people putting on events like this.
GLENN: It’s harder to do in China. …from China than I thought, and I absolutely had a few --- over the last couple of weeks, but it looks like it’s going to happen.
CHUCK: Well, cool. Yeah keep us posted and if you have a link then just let us know and we'll put it up in the show notes so people can go and check it out and sign up to go if they want to.
GLENN: Awesome. All right. Well, thank you guys very, very much for having me on the show.
CHUCK: Yeah, no problem. Thank you for coming. All right. See you guys.
TIM: All right. See you later.
AJ:
Adios.
022 JSJ Node.js on Azure with Glenn Block
0:00
Playback Speed: