Paul: Hi there and welcome to PodRocket. I'm your host, Paul, and today we're joined with Jacob Evans. So Jacob is a full stack engineer over at Cloudflare and we're going to be getting a little bit into Workers and R2 and some specifics about what's new on the block with this specific field of products within the Cloudflare ecosystem. Welcome to the podcast, Jacob. Jacob Evans: Yeah, thanks for having me on. Paul: Before we hopped on, Jacob was asking are we going to go over all the products, are we going to do this, are we going to do that. We're going to talk, as I said in the intro, a little bit about Workers because, Jacob, you're a Workers guy. You have your face in this stuff. So I said you're a full stack engineer but some more specifics, what do you do at Cloudflare? Jacob Evans: Yeah, so I'm on the dev prod team. It's the developer productivity team and primarily what I work on is Wrangler. I joined the team back in, I think, December last year when Sunil Pai was working on the rewrite from Wrangler written in Rust to Wrangler written in type script. So I joined just in time for basically this just huge goal, I guess, big ambitious thing to do. But yeah, I've been on the Wrangler team as well just hacking away at that tool. Paul: So really quick for people who are not familiar with the product, what is Wrangler pertinent to? It's Workers, right? Jacob Evans: Yeah. Paul: So what's a Worker? Jacob Evans: A Worker is you can think of as a cloud function. So your way of like I want to write something and have it just run for a particular use case. The big thing about Workers is these cloud functions are on the edge. So these functions are running as close to the user as possible. Paul: So it's not only a phenotype of this new lambda based architecture that we're using in the development world as, "Oh, I have this functional piece, it's going to scale automatically, I'm going to go post it up there." It's a service. It's doing its thing. But with Workers specifically, we have edge. So there's going to be a copy of the Workers, and correct me if I'm wrong here, I'm just guessing. So there's going to be a copy of the Worker at a bunch of different data centers spread across cloud for location so that if I'm in California, my Worker is probably running on a different piece of computer hardware than if I pinged it from the East Coast where I'm talking to you from now. Jacob Evans: Correct. Paul: And so that's just going to minimize latency, going to make everything really quick. Is that your favorite feature of Workers or what do you think is some of the secret sauce that makes them stand out in what feels like a whitewashed feature system that we have for lambda based architecture, serverless stuff? Jacob Evans: So I think that the edge does give Workers a bit of an edge. Paul: Oh, nice. I got you Jacob Evans: I got to throw in the dad jokes. So I do think that's a huge feature. The other aspect of it, though, and again this is where Wrangler comes in, is the developer experience, the user experience of Workers and the tooling around it as well as the products. The user experience which, in our case is developers, is at front of mind the entire time we're working on these things. The Wrangler CLI, for instance, the whole driving force behind that was massive improvements to developer experience and how you develop the Workers and how you interact with the other products on Workers. So other products would include KV, which is I like to compare it as local storage on the edge, your global local storage. You have durable objects, you have R2 which is pretty big news right now. That would be our S3 competitor as, I believe Matthew Prince likes to point out a lot, does not have egress fees. Paul: Yes. It's one hell of a competitor for that one reason. I can't wait to get into that. Oh my gosh. Jacob Evans: But that's part of all the developer experience and I think that's what lends Workers so well to, for instance, a lot of meta frameworks they like to use Workers to augment their systems and whatever their meta framework is. Paul: Would a meta framework be something like NX that sort of caches your build steps or were you thinking about something different? Jacob Evans: Usually when I talk about meta frameworks, I'm describing things like Next.js Remix, just generally things that are using something like React ... Oh, SolidStart would be another, I guess, meta framework, was using these libraries like React, Solid and whatnot and then building another framework around this framework. Paul: Gotcha. So it's kind of a new way to objectify and reorganize the way that you're approaching the code, maybe not fundamentally a different system underneath. Jacob Evans: And without getting too far off topic, the idea is it's very similar to the old full stack frameworks like Angular and stuff, but not too far off from the thing that they're building around React, for instance, with next. Paul: Okay, gotcha. So bringing us back to the Wrangler CLI that you're specifically working on, one of the developer experience things that I think gets people a little off guard when I first tell them about workers or when you jump in with another team member is how do you debug this? And so the first easy answer is, "Well, you go to this web console and you click stream logs," and then people get weirded out and overwhelmed so you're like, "Okay, yeah, but you can also use the CLI and you can connect to your work and you can kind of stream logs that way.: Is this something ... Did anything change? Is there new limitations? Are there new features? When you rewrote this with your team into type script, how was that developer experience reevaluated for the debugging pieces? Jacob Evans: So debugging's been kind of an interesting story for Wrangler too. Right now it's what we call it because we still haven't fully deprecated Sunset into Wrangler 1 which was written in Rust. But when it comes to the debugging and logging stuff from the Worker and whatnot, that's been something we've constantly been trying to improve the experience on because it kind of didn't exist before. Like you mentioned, there's some things that you just couldn't get observability into. For instance, now we have Wrangler tail which will give you those logs that you're talking about, the streaming logs from your Worker. That right there by itself is a huge improvement. We've also started adding ... This is more back end stuff, but we started adding ways to try to get specific information out of those tail logs. But we're even looking towards just being able to do console logs in your Workers and be able to get that output from either the inspector or from your terminal. Additionally, there's even work for more advanced debugging tools when everybody says you should be using debugging tools instead of console logs and then you try to do that with Workers and your Workers' code and it is a bit of a struggle. There are some workarounds in VS code that we know about, but we want it to be as seamless as possible like somebody just puts in a break point, they run their Wrangler dev or whatever it is, and you immediately see it breaks at that and you see the output. So those are future goals that we have is to continuously improve not just the developer experience for running the Worker and developing on it but also debugging it like you mentioned. Paul: Yeah, debugging, I mean it's huge. And having the ability, just to stress to anybody listening, before you had to use a web UI to filter cards that looked like ... I mean they looked great but it was in a UI and now, and correct me if I'm wrong, but it's specific to Wrangler, to the new rewrite, we can stream logs directly into your terminal where you're operating the Wrangler binary or script and that's pretty great. So it totally changes the game for debugging Wrangler 2. I think one thing that musicians will talk about sometimes is if you're limited, you can get better creativity, you can learn more about your musicianship. And I got to say one of the first services I started working on was in a Cloudflare Worker with Wrangler 1. If you really think about, "Okay, I'm going to debug and I can't do a console log, so how can I get the most amount of information out of this?" You know what you do? You actually use http codes correctly because your Worker's going to get called and it's going to have an error and if you throw the correct code with the right message, you can debug and it ended up being a much stronger service in the end. It was an interesting exercise for me, bring you back to the basics, kid, use your codes correctly. It's easy to reach for console [inaudible] logs sometimes. Jacob Evans: It is. I love hearing that there were some silver linings to the previous experience. Paul: And I want to tell this story also with the caveat of this is all under the umbrella of it's way better right now with Wrangler 2. So go use it. Use the features. Jacob Evans: Yeah. We're right now trying to push people more towards developing in that environment. Previously, people kind of found it more convenient to just work and code in the dashboard, the Cloudflare dashboard, which there was the quick edit section there. What we've even added, for instance, with Wrangler [inaudible], so again it comes back to we have this developer experience gold in mind. Wrangler [inaudible] itself was completely reworked from the ground up. So a person could ... Wrangler [inaudible], you get a bunch of prompts for building out your Worker. By the way, I suggest type script. And then from there, as soon as it initializes, that project is immediately publishable. That was a big thing. You can go from zero to publish in just a few seconds. What we recently added, and I actually personally worked on, was the ability to Wrangler [inaudible] and then there's a flag that's dash dash from dash and, yeah, it rhymes. But what that does is you can specify a Worker in your dashboard and it will create a new project, initialize that project. It'll pull down your script for you and then auto generate your configuration file. Paul: Amazing. So does it also generate a toml for you, a Wrangler toml? Jacob Evans: Yeah, so I agnostically call it a configuration file because we have plans on supporting JSON soon. Paul: So many people have been asking for that. That's going to make so many people happy. I mean it's like the English of the configuration world. Jacob Evans: It is. It really is. Paul: So you mentioned having these ancillary products available to a Worker. Bring us back to what is a Worker. We got into some details here. Bring us back to what is a Worker, what are the cool things we can do with a Worker. They're on the edge. There are other ancillary products you can kind of tack on. So we mentioned durable objects. That's just storing of ... I mean I think of it like object storage that lasts for a while. You mentioned KV, Key Value storage, but that's also distributed on the edge. Correct? It's like your local memory. And then there's R2 and R2 is one of the newer ones. So could you introduce people to R2 if they're not familiar and why it's different than durable objects? Jacob Evans: So one of the major things and, by the way, R2 has support in Wrangler. So you use that. I wrote that as well. Paul: I didn't know about it. That's awesome. Jacob Evans: So we try to keep all of the products that you could use in a Worker. We try to have as much support for it inside of Wrangler as well. We want you to be able to, say, set up a R2 bucket from Wrangler. You don't need to go into the dashboard to do that. And so what R2 is, and it just recently went GA, so it's now everybody can access it. It's been in beta for a while since its announcement and I know everybody was just really wanting to get into it. One of its big benefits is it's actually more similar to, say, S3 than what, say, durable objects is. So I could store things like videos, fairly long videos, if I want to because, in general, it's basically block storage. I can just throw anything in there, large images, stuff like that. Paul: Yeah, I think the limit's like five terabytes or is it 10? It's terabytes. It's big. Jacob Evans: Yeah, terabytes. It's up there. It's up there. And the biggest aspect of it is our infrastructure, how we built things has allowed us to do zero egress fees. So it doesn't matter if you have a 4K one-hour movie stored, you're only paying for that storage up there. When you want to pull it down, you can just pull it down for free. Paul: And just to go over how crazy of an idea this is, you guys are part of ... Is it called the Bandwidth Alliance? Jacob Evans: Yeah. Paul: And there's like an alliance for providers that say, you know what, we're not going to charge for egress because it's so rare. This is how a lot of providers make their change. And if you're a systems architect or a solutions architect out there, think about this for a sec. You could take every single web request going in and out of your company, cash it on R2 and just never pay for your data to come out ever again. You just need to pay for it to go in and store it and then you're done. That's pretty crazy. I am so curious as to how you guys as a business were able to make that promise. I don't know how much you can broadcast, but that sounds like a bet to me. You're betting that- Jacob Evans: Yeah, I'm going to go with it just comes down to the Cloudflare mission and our leadership has, let's just call it, an intense passion for making that mission come to life, which is just make the internet better. So that comes down to how can we not just improve experiences, but also the infrastructure and how that affects users which includes developers, which includes people who are on the network. I don't know how many people I've told I work at Cloudflare and they're like, "What company is that?" And I'm like, "Oh, it has orange cloud." And they're like, "Oh, when I go to a new website, it redirects ... It does the little "you're being protected from DDoS-ing." And I'm like, "Yep, that one." Paul: That one, the DDoS company. That's what we do. We just protect people from DDoS. Little do people know that Cloudflare's secretly powering like a solid fraction of the internet. Jacob Evans: Yeah. The last time I checked was 16% of the entirety of the global internet traffic go through CloudFlare. Paul: It's horrifying. I missed that. Good for you guys. Oh my gosh. Well, if we wanted to summarize, I mean we talked about mostly Workers and R2 today, but I guess those are some of the most exciting things that are changing over at Cloudflare right now. I mean within the Workers bubble and within the storage bubbles, I mean I'm thinking about R2, do you think that there are any particular features that you would just like to summarize as these are the best ones, go read more about them? Jacob Evans: Well, I mean I work on Wrangler so I'm going to probably [inaudible]. Paul: So Wrangler 1 to Wrangler 2, go read up on that. Is there a conversion doc about bringing people up to speed with the new one that we can point folks to? Jacob Evans: The Cloudflare docs ... By the way, I know there's a lot of people that have approached the Cloudflare docs in the past and they're like, "Oh, I wish these were a little bit better." We have an initiative coming up that will be essentially us trying to rework the docs and get in line with more along the lines of the docs that you see that Astro Build have, Solid.js Have, the Beta React Docs. This new renaissance of documentation, that's the idea of you have reference documentation, you have examples documentation and interactive documentation like embedded StackBlitz or coded Sandboxes or anything like that, that show the stuff actively being used. Paul: New docs. There is a renaissance of docs going on. I think that's a really good word for it. There's a convergence of style going on that is very conducive to people going in to read docs. I mean, if we can all train ourselves as a developing body to process technical documentation in a streamlined way, that's going to benefit everybody for the rest of the time. Jacob Evans: But as of now, we do have a section in the Cloudflare docs in the Workers section that is specific to Wrangler and then the Wrangler V1, the V2 migration. But my actual suggestion for most people when they're looking for support, when they're looking for a little bit of help with Workers, with Wrangler, with any of this, is the Cloudflare dev discord which is massively helpful. We have people in there. You'll see little green or blue names. Those people probably know Workers better than some people in the Workers team. They're absolute power users. They're amazing individuals that absolutely love helping the community and it's phenomenal. So I usually just try to send people to the Discord. Paul: Discord's slept on resource sometimes. So if you guys have a thriving community, let's definitely forward some learners over there because talking to a human will always be [inaudible] to Google in the end. Jacob, thank you for your time. Hopefully, some folks can be instilled to go check out Workers if they were turned away in the past. There's a lot of new tooling that you've been working on and people can maybe try to think about how can I think about my storage a little bit different with R2. I mean it's in GA now. Go check it out. It could totally change the way you set things up at your company system. Jacob Evans: Absolutely. Paul: One last thing. If people want to follow you, are you on Twitter? Do you blog anything? Blog or anything? Jacob Evans: Yeah. I'm really active on Twitter, on Discord. I actually have Twitter spaces that I do weekly. So people come in and ask questions on there. I actually will have one ... I have them Wednesday, Thursday, Friday nights at APM Central Time. And I usually have a lot of people in those spaces. I've got a lot of Versal employees showing up now, coworkers from Cloudflare. I don't know if anybody knows Theo is a big streamer in the tech community now. He's my regular co-host. Paul: What's your handle if people wanted to type it in? Jacob Evans: It's just my name, Jacob MG Evans, and you'll see a big avatar of my face with a beard. Paul: Beard avatar. Jacob MG Evans. Look him up. All right, thanks for your time, Jacob. Jacob Evans: [inaudible].