Exploring Deno Land 🦕
This week we’re joined by Ryan Dahl, Node.js creator, and now the creator of Deno - a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.
We talk with Ryan about the massive success of Node and how it impacted his life, and how he eventually created Deno and what he’s doing differently this time around. We also talk about The Deno Company and what’s in store for Deno Deploy.
Matched from the episode's transcript 👇
Ryan Dahl: …and apologise that I did not have a MySQL library yet… And they’re like “But how is that going to happen?” and I said “I don’t know how that’s going to happen. I just hope that that is solved at some point.” And it’s embarrassing to even think that that was a concern, because that was totally not a concern. All those problems got worked out essentially without my interaction.
[40:20] You know, Deno and Node are very similar systems. They’re both built on V8, they’re both JavaScript… They’re pretty similar. The differences are relatively superficial. I mentioned this Deno.land/standardlibrary, the Node compatibility layer… This is a work in progress. If you go check it out, there’s something – I think we’re maybe at 40% compatibility now. So we’re still filling these things out, and I think over time it will be less and less of a problem to take existing code and run it in Deno.
But there’s still a lot of work to do… You mentioned this HTTP/2 web server - up until recently, Deno was using a web server written in TypeScript that was a loose port of Go’s web server. It’s built on top of TCP sockets and TLS sockets. It was a nice HTTP 1.1 server, but had some problems in that it didn’t support HTTP/2. And because we just made this port ourselves and are not particularly interested in writing web servers, we’re kind of dead-ended with that codebase. We were forced to then write an HTTP/2 web server… HTTP/2 being a much more complicated protocol than HTTP 1.1.
What we’d really like to do - I’ve mentioned this earlier, about linking in native code libraries using Rust… Rust obviously has a web server already implemented. In fact, Deno already has that web server in its binary somewhere, deep inside of it. What we really wanna do is just allow people to call from JavaScript into this hyper web server in Rust and start up a nice, fast HTTP/2 web server. This work is still unstable. IT’s shipped in Deno 1.9, so people can use it if they use the –unstable flag… But yeah, now we’re working on this native web server, which - I think serving websites is quite important to server-side JavaScript tasks… And it’s quite fast. It has very good latency, very good throughput. We have some preliminary analysis on its performance on the 1.9 release notes. We hope to stabilize this in the next couple of months, and people will have a very fast web server available right out of the box.