Latest / Talk Python To Me / #568: Cloudflare Python Workers
Transcript
- 0:00Michael Kennedy: Where does your Python code actually run?
- 0:02Michael Kennedy: A server in Virginia?
- 0:03Michael Kennedy: A container in Frankfurt?
- 0:05Michael Kennedy: Pyodide put Python in the browser.
- 0:07Michael Kennedy: Cloudflare put the browser into the server.
- 0:10Michael Kennedy: Combine the two and you get Python workers,
- 0:13Michael Kennedy: now generally available from Cloudflare.
- 0:15Michael Kennedy: My guests are Hood Chatham, Jay Choi,
- 0:17Michael Kennedy: and Dominic Pichetta from Cloudflare.
- 0:20Michael Kennedy: Hood and Jay maintain Pyodide.
- 0:22Michael Kennedy: Dominic got Python running in Cloudflare workers.
- 0:25Michael Kennedy: Your FastAPI app ships as plain files.
- 0:28Michael Kennedy: Then you can run it on CPython, compiled to WebAssembly,
- 0:31Michael Kennedy: inside V8, at over 350 locations worldwide.
- 0:36Michael Kennedy: This is Talk Python To Me, episode 568, recorded October 9th,
- 0:40Michael Kennedy: 2026.
- 0:57Michael Kennedy: Welcome to Talk Python To Me,
- 0:59Michael Kennedy: the number one Python podcast for developers and data scientists.
- 1:03Michael Kennedy: This is your host,
- 1:04Michael Kennedy: Michael Kennedy.
- 1:04Michael Kennedy: I'm a PSF fellow who's been coding for over 25 years.
- 1:09Michael Kennedy: Let's connect on social media.
- 1:10Michael Kennedy: You'll find me and Talk Python on Mastodon, Bluesky,
- 1:13Michael Kennedy: and X.
- 1:13Michael Kennedy: The social links are all in your show notes.
- 1:16Michael Kennedy: You can find over 10 years of past episodes at talkpython.fm.
- 1:20Michael Kennedy: And if you want to be part of the show, you can join our recording live streams.
- 1:23Michael Kennedy: That's right.
- 1:24Michael Kennedy: We live stream the raw,
- 1:25Michael Kennedy: uncut version of each episode on YouTube.
- 1:28Michael Kennedy: Just visit talkpython.fm/youtube to see the schedule of upcoming events.
- 1:32Michael Kennedy: Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.
- 1:37Michael Kennedy: Tomorrow,
- 1:38Michael Kennedy: Wednesday,
- 1:38Michael Kennedy: November 4th, we're having our first tech meetup,
- 1:42Michael Kennedy: our live tech event as part of Talk Python membership.
- 1:44Michael Kennedy: If you're not yet a member,
- 1:46Michael Kennedy: well,
- 1:47Michael Kennedy: join up and support the show
- 1:48Michael Kennedy: and get an awesome community and experience to boot.
- 1:51Michael Kennedy: Just visit talkpython.fm, click membership in the nav bar,
- 1:54Michael Kennedy: and you'll be off to the races.
- 1:56Michael Kennedy: If you are a member,
- 1:57Michael Kennedy: we'll be talking about Talk Python in production and some really wild new ideas that I'm exploring.
- 2:03Michael Kennedy: I think you will find both fascinating and actually really practical,
- 2:07Michael Kennedy: but no one's doing it.
- 2:09Michael Kennedy: So join me on Wednesday, November 4th.
- 2:10Michael Kennedy: And if you're listening to this after and thinking, Michael,
- 2:12Michael Kennedy: why did you just put this in here?
- 2:14Michael Kennedy: Nobody can listen to it because most people listen to after.
- 2:17Michael Kennedy: These tech meetups come with recordings.
- 2:19Michael Kennedy: Just visit talkpython.fm, click on membership,
- 2:21Michael Kennedy: and then browse past member meetups and you'll be able to get it.
- 2:23Michael Kennedy: So hopefully either you can join live or you can join afterwards.
- 2:27Michael Kennedy: Become a member,
- 2:28Michael Kennedy: support the show,
- 2:29Michael Kennedy: join the event.
- 2:30Michael Kennedy: Dominic J.
- 2:31Michael Kennedy: Hood,
- 2:32Michael Kennedy: welcome to all of you to Talk Python To Me.
- 2:34Michael Kennedy: Awesome to have you here.
- 2:35Dominik Picheta: Awesome to be here.
- 2:36Michael Kennedy: Yeah,
- 2:36Michael Kennedy: I'm really excited to talk about Python on the Edge.
- 2:40Michael Kennedy: It's very exciting what you all have announced.
- 2:43Michael Kennedy: And I know it's been out there on Cloudflare for a little bit,
- 2:46Michael Kennedy: but it's now officially formalized, officially supported,
- 2:50Michael Kennedy: a little more smooth.
- 2:51Michael Kennedy: So Python workers,
- 2:53Michael Kennedy: very, very cool topic.
- 2:54Michael Kennedy: Before we get to that,
- 2:55Michael Kennedy: though, let's just do a quick,
- 2:57Michael Kennedy: who are you?
- 2:58Michael Kennedy: Just give me a little bit of your background and what you do and so on.
- 3:01Michael Kennedy: Dominic, we'll just go around the squares here.
- 3:02Michael Kennedy: Dominic, go first.
- 3:04Dominik Picheta: Sure.
- 3:05Dominik Picheta: I mean, I can get started how I got into Python.
- 3:08Dominik Picheta: And that starts at,
- 3:10Dominik Picheta: I guess, a very young age when I was playing with Visual Basic.net.
- 3:13Dominik Picheta: And I realized that I hate Windows.
- 3:15Dominik Picheta: I needed to get to Linux and Visual Basic.net back then did not support Linux at all.
- 3:21Dominik Picheta: So
- 3:22Dominik Picheta: a couple of my friends were using Python. So that's how I got into it.
- 3:26Dominik Picheta: Afterwards,
- 3:27Dominik Picheta: I actually got a little bit annoyed that Python was interpreted.
- 3:30Dominik Picheta: So I looked for
- 3:32Dominik Picheta: alternatives and I got involved in the NIMH programming language.
- 3:36Dominik Picheta: And I became one of the
- 3:37Dominik Picheta: core developers of that for a while.
- 3:40Dominik Picheta: Fast forward a lot.
- 3:42Dominik Picheta: I was working at
- 3:44Dominik Picheta: meta and then I moved to Cloudflare to work on the workers runtime team working there on a bunch of
- 3:51Dominik Picheta: features for workers in general.
- 3:54Dominik Picheta: I actually was the person I guess that kind of experimented with
- 3:58Dominik Picheta: Pyodide at Cloudflare and got it working and running and then eventually we got Hoodin to
- 4:05Dominik Picheta: help us out with that and we started Python Workers and I've been working on that ever since as well
- 4:11Dominik Picheta: And still do.
- 4:12Michael Kennedy: Very,
- 4:12Michael Kennedy: very excellent.
- 4:13Michael Kennedy: You know,
- 4:14Michael Kennedy: a word I haven't thought about for a while
- 4:15Michael Kennedy: is visualbasic.net.
- 4:17Michael Kennedy: I've written a little bit, a little bit.
- 4:19Michael Kennedy: I mean, we're talking a couple of files of visualbasic.net.
- 4:22Michael Kennedy: What of her boast language?
- 4:23Michael Kennedy: I don't know.
- 4:24Dominik Picheta: Great language to learn with, though.
- 4:25Michael Kennedy: It is, it is.
- 4:26Michael Kennedy: You know, I think it's interesting to contrast that
- 4:28Michael Kennedy: with Python,
- 4:29Michael Kennedy: actually,
- 4:29Michael Kennedy: because Python also had many
- 4:31Michael Kennedy: of the same goals of VB,
- 4:33Michael Kennedy: but it somehow accomplished it
- 4:35Michael Kennedy: with a lot less stuff on the screen.
- 4:38Michael Kennedy: You know, like there's not begin if,
- 4:40Michael Kennedy: end if, all this type of stuff.
- 4:42Michael Kennedy: But yeah, very, very fun.
- 4:43Michael Kennedy: Jay,
- 4:43Michael Kennedy: welcome.
- 4:44Gyeongjae Choi: Hey,
- 4:44Gyeongjae Choi: I think I can start with how I started using Python as well,
- 4:48Gyeongjae Choi: like Dominic.
- 4:48Gyeongjae Choi: So I also started programming using some Visual Basic NC when I was like 10 years ago.
- 4:55Gyeongjae Choi: And then I started learning Python when I was in second grade in university,
- 5:01Gyeongjae Choi: I think.
- 5:01Gyeongjae Choi: I was having some data science course learning about packages like ThumbPy and SciPy.
- 5:08Gyeongjae Choi: That was when I first started using Python.
- 5:10Gyeongjae Choi: And I just fell in love with Python.
- 5:12Gyeongjae Choi: Like making apps were so easy with Python.
- 5:15Gyeongjae Choi: So I was using, I started, starting then I started using Python for like 10 years.
- 5:20Gyeongjae Choi: And around 2021,
- 5:23Gyeongjae Choi: I started contributing to a library called Pyodip,
- 5:28Gyeongjae Choi: which I think we will talk a lot in this podcast.
- 5:32Gyeongjae Choi: And yeah, after maintaining it for around one or five years,
- 5:37Gyeongjae Choi: I got invited to Cloudflare to work on Python workers using Pyrodite from Hoots and joined Cloudflare.
- 5:46Gyeongjae Choi: And yeah, after that, I was working on Cloudflare Python workers for around a year.
- 5:51Michael Kennedy: That's super cool that contributing to the project got you that position.
- 5:56Michael Kennedy: It's like, I'm really interested in this thing and I get to work on it for a while.
- 5:59Michael Kennedy: And all of a sudden they're like, well,
- 6:00Michael Kennedy: what if we paid you to do it all the time?
- 6:02Michael Kennedy: That's just great, right?
- 6:04Gyeongjae Choi: Yeah,
- 6:04Gyeongjae Choi: it's really interesting that you start to contribute on open source and you get a job with that.
- 6:10Gyeongjae Choi: That's something that all the open source contributors are hoping to.
- 6:15Michael Kennedy: Good. Welcome to the show.
- 6:16Hood Chatham: I started out on Lispy MLE languages.
- 6:19Hood Chatham: So I'm a mathematician by training.
- 6:23Hood Chatham: I wrote my first Python code for undergraduate introduction to programming class.
- 6:29Hood Chatham: but then I didn't use it at all until I had to write an email schedule for the math seminar
- 6:35Hood Chatham: which was in Python 2.7 and I am as a mathematician I was very interested in
- 6:43Hood Chatham: math software to try to get software that does a good combination of like research level
- 6:51Hood Chatham: you know like high performance computing and also just like quick experiments and lets people
- 6:58Hood Chatham: figures step out. And I found out that mathematicians don't like to install software
- 7:02Hood Chatham: on their computer. They assume it won't work.
- 7:04Hood Chatham: Of course, a lot of...
- 7:05Michael Kennedy: They still have scars from Fortran.
- 7:06Michael Kennedy: That's why,
- 7:07Michael Kennedy: probably.
- 7:08Hood Chatham: Yeah.
- 7:08Hood Chatham: And also,
- 7:09Hood Chatham: a lot of math software is made by mathematicians and it's not an easy thing to
- 7:14Hood Chatham: distribute software for other people to use.
- 7:16Hood Chatham: And so it's like they have something that works on
- 7:18Hood Chatham: their computer and they tell all their friends, oh, you should use this. And they say, nah,
- 7:21Hood Chatham: man.
- 7:22Hood Chatham: So that was how I got interested in WebAssembly. I mean, I first started by writing software in
- 7:28Hood Chatham: LaTeX because mathematicians already have LaTeX on their computer and they already have TechLive
- 7:32Hood Chatham: on their computer.
- 7:33Hood Chatham: And that's a package manager. It can just get your package onto their computer
- 7:36Hood Chatham: automatically.
- 7:37Hood Chatham: But like people just wouldn't use things that didn't come sort of connected with
- 7:41Hood Chatham: something they already had on their computer.
- 7:43Hood Chatham: And because browsers are a universal computing
- 7:45Hood Chatham: platform,
- 7:46Hood Chatham: you know, I watched the birth and death of JavaScript back in like 2014 or whatever.
- 7:51Michael Kennedy: One of the best talks ever.
- 7:52Michael Kennedy: So good.
- 7:53Hood Chatham: Yeah,
- 7:54Hood Chatham: yeah,
- 7:54Hood Chatham: it's so good.
- 7:55Hood Chatham: And so I was very excited about the idea of like,
- 7:57Hood Chatham: oh,
- 7:58Hood Chatham: we should just make the software work in WebAssembly
- 8:00Hood Chatham: and ship it to the browser.
- 8:01Hood Chatham: And then mathematicians won't be able to like complain
- 8:04Hood Chatham: that it's maybe takes some work to install.
- 8:08Hood Chatham: But then if you want to have like,
- 8:09Hood Chatham: you know,
- 8:10Hood Chatham: powerful math software,
- 8:11Hood Chatham: you know,
- 8:12Hood Chatham: I wrote all the linear algebra stuff in Rust,
- 8:14Hood Chatham: but then,
- 8:15Hood Chatham: you know,
- 8:16Hood Chatham: you don't really get that much control over it from Rust.
- 8:20Hood Chatham: And you can make a GUI, you can give people JavaScript,
- 8:23Hood Chatham: But, you know,
- 8:25Hood Chatham: JavaScript is really a bit anemic in terms of, you know, like, for instance, our logic have lots of tables of things that were indexed by, you know, tuples of integers.
- 8:34Hood Chatham: And like,
- 8:35Hood Chatham: you know,
- 8:35Hood Chatham: having a map in Python that is nicely indexed by tuples of integers is like,
- 8:40Hood Chatham: you know, you could do it in JavaScript.
- 8:41Hood Chatham: It's just it's just a pain.
- 8:42Hood Chatham: So I really wanted to get Python to be in my web application with everything else.
- 8:47Hood Chatham: And so I found out about Pyodine and I started messing around with it, but it was really buggy and didn't work very well.
- 8:53Hood Chatham: you know, I mean, it was a sort of technical,
- 8:55Hood Chatham: you know,
- 8:56Hood Chatham: like demonstration.
- 8:57Hood Chatham: I mean, it showed
- 8:58Hood Chatham: a lot of promise because,
- 8:59Hood Chatham: you know,
- 9:00Hood Chatham: there was NumPy there running in the browser.
- 9:03Hood Chatham: So,
- 9:03Hood Chatham: you know,
- 9:04Hood Chatham: these binary extensions were working.
- 9:06Hood Chatham: But,
- 9:07Hood Chatham: you know,
- 9:07Hood Chatham: Mike Dropeboom did like amazing work at
- 9:09Hood Chatham: Mozilla to get that working. And I mean, Mozilla really created this whole cool chain on top of it.
- 9:15Hood Chatham: Anyways,
- 9:15Hood Chatham: I can maybe say more about that later.
- 9:18Hood Chatham: But I found PyDyde and it was just a bit after
- 9:21Hood Chatham: mozilla killed the whole project so it wasn't you know um roman urchuk was like just barely keeping
- 9:26Hood Chatham: the lights on and i showed up and i was like here are all the things that are bad about what's
- 9:29Hood Chatham: currently going on it kind of expecting him to be like oh like you're an asshole go away but he was
- 9:35Hood Chatham: like oh well why don't you come fix those things and so so i so he made me into a maintainer it
- 9:40Hood Chatham: actually first took another math that i was working with on the same project uh dexter who who had some
- 9:46Hood Chatham: experience with open source and so he started contributing to fix the problems that i found i
- 9:50Hood Chatham: I was like, oh, I guess I can contribute to this.
- 9:53Hood Chatham: Yeah.
- 9:53Michael Kennedy: That's a great way to handle somebody coming and say, I have these complaints.
- 9:56Michael Kennedy: It's like,
- 9:57Michael Kennedy: instead of saying,
- 9:58Michael Kennedy: go away, it's like, you know what?
- 10:00Michael Kennedy: Here's how you can fix them.
- 10:01Hood Chatham: Yeah,
- 10:01Hood Chatham: right.
- 10:02Michael Kennedy: Yeah, very productive.
- 10:03Hood Chatham: Right.
- 10:03Hood Chatham: They weren't defensive at all.
- 10:04Hood Chatham: They were just like, great, we want this to be better.
- 10:06Hood Chatham: Like,
- 10:06Hood Chatham: if you want to make it better, please make it better.
- 10:09Hood Chatham: And so then I got a National Science Foundation postdoc for math.
- 10:14Hood Chatham: I said I would improve mathematical computing software.
- 10:16Hood Chatham: And so I ended up spending most of that postdoc working on Pyodide.
- 10:20Hood Chatham: And then when I was leaving the postdoc, I got hired to Anaconda to work on their PyScript stuff.
- 10:26Hood Chatham: And then about six months later,
- 10:28Hood Chatham: I got connected to Cloudflare and they were interested in me working on making Python workers exist.
- 10:34Michael Kennedy: That was obviously a very fun project.
- 10:37Michael Kennedy: Yeah,
- 10:38Michael Kennedy: PyScript is such an interesting project.
- 10:40Michael Kennedy: I don't know what the future holds for PyScript,
- 10:42Michael Kennedy: but it's a very neat project.
- 10:44Gyeongjae Choi: Yeah, it was really an interesting project.
- 10:46Gyeongjae Choi: Actually,
- 10:46Gyeongjae Choi: a lot of people first learned about running Python in the browser from PyScript,
- 10:51Gyeongjae Choi: not from Pyodide.
- 10:52Gyeongjae Choi: Yeah, it was a really interesting project.
- 10:54Gyeongjae Choi: It's very unfortunate they turned into a maintenance mode recently, but they did a real great job.
- 10:59Gyeongjae Choi: I know, it makes me sad.
- 11:02Michael Kennedy: Maybe it's just taking a break.
- 11:03Michael Kennedy: Maybe it'll come back in the future in some amazing form.
- 11:05Michael Kennedy: I would love to see a React or a Vue alternative that just runs all on PyScript.
- 11:12Michael Kennedy: But,
- 11:12Michael Kennedy: you know, I don't think backed by Pyodide, backed by MicroPython,
- 11:16Michael Kennedy: which would be,
- 11:17Michael Kennedy: you know, I think a little more practical for web front end.
- 11:19Michael Kennedy: But that is an alternate reality and a different thing that we're talking about.
- 11:22Michael Kennedy: So let's begin maybe just a quick review of like running in the browser.
- 11:29Michael Kennedy: So the goal of Pyodide is to run wherever WebAssembly runs.
- 11:33Michael Kennedy: Primarily,
- 11:34Michael Kennedy: that's the browser,
- 11:34Michael Kennedy: though it doesn't have to be.
- 11:35Michael Kennedy: You know, you can kind of treat WebAssembly a bit like a Docker type of thing, like an isolation.
- 11:39Michael Kennedy: You can use the JavaScript.
- 11:40Michael Kennedy: Right.
- 11:41Hood Chatham: So it does not work in WASM time or these other WebAssembly only run times, but it should work in any JavaScript run.
- 11:47Michael Kennedy: I see. So I could run it locally if I had, say,
- 11:50Michael Kennedy: Node or Bun or something like that, maybe?
- 11:52Hood Chatham: Absolutely.
- 11:52Michael Kennedy: Yeah.
- 11:52Michael Kennedy: Okay. That's interesting.
- 11:54Michael Kennedy: So we have this WASM execution time,
- 11:58Michael Kennedy: execution framework here.
- 11:59Michael Kennedy: And the idea you all had is like, well, we have all these points of presence throughout the world with Cloudflare.
- 12:06Michael Kennedy: How many places,
- 12:08Michael Kennedy: how many spots does this run at? You all know.
- 12:10Dominik Picheta: oh i don't know by heart there's like a website you can go on and tells you the
- 12:16Hood Chatham: all of them i think i think the number is above 350 yeah yeah it sounds like yeah so that puts
- 12:22Michael Kennedy: 10 tends to a hundreds on any given continent right so the idea is with these these kind of
- 12:29Michael Kennedy: getting ahead of ourself a little bit but the idea is like well what if we could take this
- 12:32Michael Kennedy: pyodide thing that is a miniature python runtime and put it really really close to all the users
- 12:39Michael Kennedy: and execute it there instead of routing back,
- 12:42Michael Kennedy: you know,
- 12:43Michael Kennedy: somewhere in US East 1 or something like that, right?
- 12:45Dominik Picheta: Yeah, precisely.
- 12:46Dominik Picheta: I mean, you're giving the exact explanation
- 12:51Dominik Picheta: that I think a lot of our, like, marketing people would give,
- 12:55Dominik Picheta: which is great.
- 12:56Dominik Picheta: Basically,
- 12:57Dominik Picheta: yeah,
- 12:57Dominik Picheta: like,
- 12:57Dominik Picheta: you want as little latency as possible
- 13:00Dominik Picheta: for your users,
- 13:01Dominik Picheta: right?
- 13:01Dominik Picheta: So you want to run Python code as close to them as possible,
- 13:03Dominik Picheta: and this is a very great way to do that.
- 13:05Michael Kennedy: Yeah, and it doesn't run, to be clear,
- 13:07Michael Kennedy: what we're talking about does not run in the browser of users like Pyodide can.
- 13:13Michael Kennedy: It runs in the edge nodes of Cloudflare that happen to be very near the users, right?
- 13:20Michael Kennedy: So I think that's a big difference because it gives you access to an entire platform
- 13:24Michael Kennedy: like data and queues and all that kind of stuff that we're going to talk about,
- 13:27Michael Kennedy: right?
- 13:28Hood Chatham: The way I like to describe it is like Pyodide is kind of this crazy idea of like,
- 13:31Hood Chatham: we should put Python into the browser.
- 13:33Hood Chatham: And then Cloudflare is kind of this crazy idea of like,
- 13:35Hood Chatham: we should put the browser into the server.
- 13:38Hood Chatham: and so when you put Python into the browser
- 13:39Hood Chatham: and you put the browser in the server,
- 13:41Hood Chatham: that's a funny way of getting Python into the server.
- 13:43Michael Kennedy: Yeah, as a mathematician by the transitive property,
- 13:46Michael Kennedy: you click it all together.
- 13:47Hood Chatham: It sounds like a crazy idea though.
- 13:49Michael Kennedy: Yeah.
- 13:50Michael Kennedy: So let's talk PyDyde just for a minute
- 13:52Michael Kennedy: before we dive in,
- 13:53Michael Kennedy: now that people see where we're going with PyDyde.
- 13:55Michael Kennedy: Let's talk about it a little bit
- 13:56Michael Kennedy: because very recently,
- 13:57Michael Kennedy: let's put some,
- 13:58Michael Kennedy: one month ago,
- 14:00Michael Kennedy: Hood and JU2 gave a talk at EuroPython,
- 14:04Michael Kennedy: which I thought was really interesting.
- 14:05Michael Kennedy: Python Everywhere,
- 14:06Michael Kennedy: the state of Python on WebAssembly.
- 14:08Michael Kennedy: So this is a more general,
- 14:10Michael Kennedy: not just Cloudflare worker type of story,
- 14:13Michael Kennedy: but give us an update.
- 14:15Michael Kennedy: What is the state of Python on WebAssembly?
- 14:17Hood Chatham: Things are good.
- 14:20Hood Chatham: It feels like there is less and less stuff that's going wrong.
- 14:27Hood Chatham: So I have these Python enhancement proposals
- 14:31Hood Chatham: to try and rearrange the governance of our code
- 14:37Hood Chatham: so that it can live maybe more of the stuff
- 14:41Hood Chatham: in the CPython repository.
- 14:44Hood Chatham: But yeah, I mean, I remember just a few years ago
- 14:46Hood Chatham: that there were always like crazy problems
- 14:49Hood Chatham: and lots of confusing bugs.
- 14:53Hood Chatham: And it was like,
- 14:55Hood Chatham: yeah,
- 14:56Hood Chatham: like we got lots of bug reports
- 14:57Hood Chatham: that would just be like,
- 14:58Hood Chatham: I have no idea what to do with this.
- 15:01Hood Chatham: But it feels like we really polished it a lot.
- 15:04Hood Chatham: And I mean, especially Jay moved all of the package build system into external repositories.
- 15:12Hood Chatham: And so the package build system is much less causing us trouble,
- 15:16Hood Chatham: although it's still still causing us some residual trouble.
- 15:19Hood Chatham: But now we have the PEP that says we can upload packages to PyPI.
- 15:23Hood Chatham: So it really feels like it's kind of making this graceful landing and approaching something that, you know,
- 15:31Hood Chatham: it will always take maintenance to keep up with upstream Python,
- 15:34Hood Chatham: but I'm sort of feeling like
- 15:36Hood Chatham: it's taking less and less in addition to that, which is nice.
- 15:39Michael Kennedy: What's the situation or the state
- 15:42Michael Kennedy: with Pyodide and Python on WebAssembly in terms of being officially supported by the core
- 15:47Michael Kennedy: developers of Python?
- 15:48Michael Kennedy: I feel like it's gotten some sort of build support acknowledgement before they
- 15:54Michael Kennedy: were willing to ship CPython that Python on WebAssembly also compiles. Is that right?
- 15:59Michael Kennedy: Yeah,
- 16:00Hood Chatham: so, right, so Python,
- 16:03Hood Chatham: sorry, so the platform we have is called Emscripten, right?
- 16:06Hood Chatham: This is the Emscripten compiler tool chain,
- 16:08Hood Chatham: which is this incredible thing that is front end for Clang and ships.
- 16:14Hood Chatham: JavaScript system calls JavaScript implementation of a file system.
- 16:18Hood Chatham: It's like a JavaScript Musa Linux that Emscripten compiles to.
- 16:22Michael Kennedy: And so we have to recommend that people go back and watch the birth and death of JavaScript because it tells the story so well, right?
- 16:29Hood Chatham: Yeah,
- 16:30Hood Chatham: it's one of the greatest videos ever,
- 16:31Hood Chatham: for sure.
- 16:32Hood Chatham: And so, okay, so Emscripten is the platform,
- 16:35Hood Chatham: and Emscripten is tier three supported upstream by Python.
- 16:40Hood Chatham: And what that means is that we,
- 16:43Hood Chatham: well, we run it in CI,
- 16:45Hood Chatham: and,
- 16:47Hood Chatham: you know, it's best effort,
- 16:48Hood Chatham: you know,
- 16:48Hood Chatham: people are allowed to break it,
- 16:50Hood Chatham: and,
- 16:50Hood Chatham: like, I come back and fix it.
- 16:54Hood Chatham: And it's not a release block,
- 16:56Hood Chatham: or they, in fact, do not make releases for Emscripten.
- 16:59Hood Chatham: The reason they don't make releases for Emscripten is because they don't have really a version of like the OS module or for Emscripten.
- 17:09Hood Chatham: So they can't really do IO very much.
- 17:14Hood Chatham: They can't make requests.
- 17:16Hood Chatham: You know, they can't do HTTP stuff.
- 17:18Hood Chatham: They can't receive user input.
- 17:20Hood Chatham: And so in my opinion,
- 17:22Hood Chatham: if we build these executables,
- 17:26Hood Chatham: but no one would want to use it as it is built upstream.
- 17:30Hood Chatham: And so I have this proposal,
- 17:31Hood Chatham: which is PEP 818,
- 17:32Hood Chatham: which I just submitted a few days ago for review by the steering council,
- 17:36Hood Chatham: which is supposed to rectify the situation and make it so that we can have basically useful inscriptive iPhone binaries.
- 17:48Michael Kennedy: Okay,
- 17:48Michael Kennedy: so let me read the title of PEP for folks.
- 17:51Michael Kennedy: It's PEP 818,
- 17:52Michael Kennedy: adding the core of the Pyodide foreign function interface to Python.
- 17:56Michael Kennedy: Is this a little bit like the ABI interface or CFFI, something like that?
- 18:00Hood Chatham: It's a little bit like CFFI or C types.
- 18:05Hood Chatham: You know,
- 18:05Hood Chatham: the package,
- 18:06Hood Chatham: the top level import is going to be JS types,
- 18:09Hood Chatham: which is following C types.
- 18:11Hood Chatham: And yeah,
- 18:12Hood Chatham: like the point of it is to allow calling JavaScript functions from Python,
- 18:16Hood Chatham: which is important because basically all functionality in a JavaScript runtime goes
- 18:21Hood Chatham: through JavaScript,
- 18:22Hood Chatham: just like the way all functionality in Linux goes through C.
- 18:25Michael Kennedy: Okay,
- 18:25Michael Kennedy: excellent.
- 18:26Michael Kennedy: And this is in draft, might be out next year,
- 18:28Michael Kennedy: maybe?
- 18:29Hood Chatham: So I just submitted it for consideration.
- 18:33Hood Chatham: So hopefully in the next couple months,
- 18:37Hood Chatham: the steering council will make a decision on it.
- 18:40Michael Kennedy: But you also have,
- 18:41Michael Kennedy: and this one is accepted,
- 18:43Michael Kennedy: is this is a big deal,
- 18:45Michael Kennedy: PEP783,
- 18:46Michael Kennedy: the Emscripten
- 18:48Michael Kennedy: packaging.
- 18:48Michael Kennedy: I think packaging is having a big moment in the Python space.
- 18:52Michael Kennedy: We just have the very first packaging council,
- 18:55Michael Kennedy: right?
- 18:55Michael Kennedy: That election that came out.
- 18:56Michael Kennedy: And you talked about Jay doing a bunch of work to get the build of the packages other
- 19:01Michael Kennedy: places.
- 19:02Hood Chatham: I'm very excited about the packaging council because what they had before was not that functional.
- 19:08Hood Chatham: Whereas the people on the packaging steering council, I think they're going to do a really good job.
- 19:12Hood Chatham: Yeah,
- 19:12Michael Kennedy: yeah, yeah.
- 19:12Hood Chatham: One of the great people.
- 19:13Michael Kennedy: Jay, what are your thoughts on this whole packaging story?
- 19:16Michael Kennedy: It sounds like you did some work on it as well.
- 19:17Gyeongjae Choi: Yeah, there's a long history about supporting packages in Pyodide and Python in the browser.
- 19:24Gyeongjae Choi: And that 7.83,
- 19:26Gyeongjae Choi: 7.83 unscrupulous packaging is really a lifesaver for us.
- 19:31Gyeongjae Choi: Because so from the beginning of the Pyodide,
- 19:34Gyeongjae Choi: we wanted to support packages like NumPy or SciPy or MatBotlib,
- 19:39Gyeongjae Choi: all those scientific Python packages
- 19:41Gyeongjae Choi: that needs to be cross-compiled to WebAssembly
- 19:43Gyeongjae Choi: because they have C codes.
- 19:46Gyeongjae Choi: So if the package only contains the Python code,
- 19:49Gyeongjae Choi: we can just run it because there's nothing needs to compile.
- 19:52Gyeongjae Choi: They're all interpreted.
- 19:53Gyeongjae Choi: But if the package has a C or C++ or Rust code inside,
- 19:58Gyeongjae Choi: they need to be compiled into a platform,
- 20:01Gyeongjae Choi: which is for us WebAssembly or MScripten.
- 20:03Gyeongjae Choi: So at the beginning and until 2025,
- 20:08Gyeongjae Choi: we had to cross-compile and build all the packages
- 20:12Gyeongjae Choi: in Pyodide CI to run them inside Pyodide.
- 20:15Gyeongjae Choi: And I think last year we had around 300 packages
- 20:20Gyeongjae Choi: that needs to be built in our repository.
- 20:22Gyeongjae Choi: And it took like three or four hours
- 20:25Gyeongjae Choi: to build all those packages in our CI.
- 20:27Gyeongjae Choi: So even if you like make a little like one line change in Pyodide
- 20:32Gyeongjae Choi: that needs to run CI for like three and four hours to build.
- 20:35Gyeongjae Choi: And it was very flacky because,
- 20:38Gyeongjae Choi: well,
- 20:38Gyeongjae Choi: you know,
- 20:39Gyeongjae Choi: Python packaging system is running some like Python codes in real time
- 20:44Gyeongjae Choi: and it's very fragile.
- 20:46Gyeongjae Choi: So like CI was always breaking.
- 20:48Gyeongjae Choi: So we really hope to make things done in package themselves.
- 20:55Gyeongjae Choi: We don't want it to maintain all the packages ourselves.
- 20:59Gyeongjae Choi: So we want,
- 20:59Gyeongjae Choi: for instance,
- 21:00Gyeongjae Choi: NumPy to build Pyodide wheels themselves and SciPy too.
- 21:05Gyeongjae Choi: And so that was that PAP 783.
- 21:10Gyeongjae Choi: And we had one more years of discussions to make it accepted thanks to a lot of work by Hood.
- 21:18Gyeongjae Choi: And we also standardized a lot of our build system so that people can actually easily build their packages
- 21:26Gyeongjae Choi: into a PyPI scripting platform
- 21:28Gyeongjae Choi: without setting up a lot of things in their machine.
- 21:31Gyeongjae Choi: They can actually just use a cibuildwheel
- 21:34Gyeongjae Choi: to build PyMD builds in their CI.
- 21:36Gyeongjae Choi: They just need to add one PyMD platform and that's it.
- 21:38Gyeongjae Choi: They can build PyMDs and builds in their CI.
- 21:42Michael Kennedy: And that makes such a big difference,
- 21:44Michael Kennedy: right?
- 21:44Michael Kennedy: Because if you all were trying to take everyone else's projects
- 21:47Michael Kennedy: and build it, I can't even imagine.
- 21:49Michael Kennedy: I mean, it's one thing that's pure Python,
- 21:51Michael Kennedy: but if it's C or Rust
- 21:53Michael Kennedy: and it doesn't compile to WebAssembly correctly,
- 21:55Michael Kennedy: what do you do, you know?
- 21:57Hood Chatham: Right, well, we have this horrifying compiler wrapper
- 22:00Hood Chatham: that rewrites the compiler arguments
- 22:02Hood Chatham: to fix all the problems.
- 22:03Gyeongjae Choi: Right, we still have that.
- 22:05Gyeongjae Choi: We still have it, it's not going anywhere.
- 22:07Gyeongjae Choi: Cross compiling is still not easy,
- 22:09Gyeongjae Choi: but it's all abstracted inside our build system.
- 22:12Gyeongjae Choi: I mean, people will still face some issues,
- 22:14Gyeongjae Choi: but like most of the packages now just build,
- 22:17Gyeongjae Choi: which is awesome.
- 22:18Hood Chatham: Yeah, this is one concern I have
- 22:21Hood Chatham: been going back and forth with Jay about is that there's still a lot of compiler regressions.
- 22:27Hood Chatham: So
- 22:27Hood Chatham: like when we were doing the Python 3.15 update,
- 22:31Hood Chatham: you know, and I was trying to get up to the most
- 22:33Hood Chatham: recent version of mscripten. And it was like,
- 22:35Hood Chatham: you know, I had to go up like 10 versions,
- 22:37Hood Chatham: 10 releases,
- 22:38Hood Chatham: and almost every single one of them had like some weird regression in it.
- 22:42Hood Chatham: And that broke builds of
- 22:44Hood Chatham: some package.
- 22:45Hood Chatham: And so what's really still the big difficulty for us is that we need to make sure
- 22:51Hood Chatham: that we find these problems.
- 22:53Hood Chatham: And then I can put fixes for them into our compiler tool chain,
- 22:57Hood Chatham: our tooling that says like,
- 22:59Hood Chatham: oh,
- 22:59Hood Chatham: there's this weird bug in the compiler.
- 23:01Hood Chatham: But if we edit the compiler
- 23:04Hood Chatham: arguments,
- 23:04Hood Chatham: or we rewrite something a little bit,
- 23:07Hood Chatham: then it will go away and the users won't see it.
- 23:10Hood Chatham: or we can go up to the compiler and say,
- 23:12Hood Chatham: like,
- 23:12Hood Chatham: you know,
- 23:12Hood Chatham: hey,
- 23:13Hood Chatham: like, let's patch this.
- 23:14Hood Chatham: Or,
- 23:14Hood Chatham: you know, I mean, I'm a maintainer of Unscripted now,
- 23:16Hood Chatham: so I can,
- 23:17Hood Chatham: you know, help drive it
- 23:19Hood Chatham: into a non-buggy direction.
- 23:21Hood Chatham: But my concern is very much that we could specify
- 23:26Hood Chatham: an ABI and a platform
- 23:29Hood Chatham: and then not find out that it's broken
- 23:31Hood Chatham: until downstream package maintainers
- 23:34Hood Chatham: start trying to use it.
- 23:35Hood Chatham: And so that's the one sort of big issue
- 23:39Hood Chatham: that we need to figure out is like,
- 23:40Hood Chatham: how do we make sure that we have confidence
- 23:43Hood Chatham: in our platform?
- 23:45Hood Chatham: Which I think basically still means
- 23:47Hood Chatham: we have to carry builds for a bunch of packages
- 23:49Hood Chatham: just to make sure that we cover
- 23:51Hood Chatham: like all the different weird things
- 23:52Hood Chatham: that different packages rely on.
- 23:54Hood Chatham: Compilers have an amazing amount of surface area
- 23:58Hood Chatham: in terms of like what is expected
- 24:00Hood Chatham: for them to behave like.
- 24:01Michael Kennedy: Dominic, were you going to jump in and say something?
- 24:03Dominik Picheta: Yeah, I was just going to say that
- 24:05Dominik Picheta: I think the main thing that this packaging PEP
- 24:08Dominik Picheta: really brings is that it does actually
- 24:10Dominik Picheta: enable
- 24:11Dominik Picheta: packagers and maintainers of packages
- 24:13Dominik Picheta: to actually build for
- 24:16Dominik Picheta: WebAssembly and for Pyodide, right?
- 24:17Dominik Picheta: And it's not really,
- 24:19Dominik Picheta: like, it doesn't
- 24:19Dominik Picheta: really scale for Pyodide to be
- 24:21Dominik Picheta: doing all of that themselves.
- 24:24Dominik Picheta: So this is, like, really powerful to
- 24:25Dominik Picheta: help spread the
- 24:27Dominik Picheta: load and help all these, you know,
- 24:29Dominik Picheta: the long tail of packages work
- 24:31Michael Kennedy: on Pyodide. So much. I had pulled
- 24:33Michael Kennedy: up PyPI here, just as
- 24:35Michael Kennedy: I was going to just bring it up. We're coming up
- 24:38Michael Kennedy: million packages it doesn't make sense for you all try to bring this in into it yourself so if it's
- 24:44Michael Kennedy: possible for whoever wants to be on mscripten and pyodide and so on to just do that by setting up
- 24:50Michael Kennedy: ci build wheel and setting a wheel they're basically like it's awesome right yeah yeah
- 24:55Hood Chatham: off the cuff i think only about five percent of those packages have any uh c c plus plus or rust
- 25:00Hood Chatham: in them so uh luckily most of them are pure python and don't yeah that's trying to track what which
- 25:06Gyeongjae Choi: packages have Python scripting wheels now. So there is a website called rwepap783yet,
- 25:13Gyeongjae Choi: which is created by another Pyodag maintainer.
- 25:15Gyeongjae Choi: And it's already a lot of packages have Python
- 25:19Gyeongjae Choi: scripting wheels, and some of them we are still maintaining ourselves.
- 25:22Gyeongjae Choi: But it's,
- 25:23Gyeongjae Choi: yeah,
- 25:24Gyeongjae Choi: like, majority of the Python applications will depend on those top 500 Python packages.
- 25:30Gyeongjae Choi: So you're
- 25:30Gyeongjae Choi: trying to support those packages.
- 25:32Michael Kennedy: Yeah, so you can look through and see all the popular ones and go,
- 25:35Michael Kennedy: Okay,
- 25:35Michael Kennedy: yeah, this is great.
- 25:38Gyeongjae Choi: The yellow ones are those packages that are not supported yet.
- 25:42Gyeongjae Choi: And the green ones are those that have the fence wheels in PyPI.
- 25:47Gyeongjae Choi: And the blue ones are those we are still building ourselves.
- 25:51Michael Kennedy: Oh, interesting.
- 25:52Michael Kennedy: That's what the blue means.
- 25:52Michael Kennedy: Okay.
- 25:53Michael Kennedy: And then some of them are just none for their wheel designation because they're pure Python.
- 25:58Hood Chatham: Setup tools is pure Python.
- 25:59Gyeongjae Choi: Right.
- 26:00Michael Kennedy: I guess it's probably worth pointing out that you all talked about this before,
- 26:03Michael Kennedy: but just because something's pure Python
- 26:05Michael Kennedy: doesn't mean that it's going to work on Pyodide, right?
- 26:08Michael Kennedy: There's just parts that are missing
- 26:10Michael Kennedy: because the runtime themselves are like,
- 26:12Michael Kennedy: yeah,
- 26:13Michael Kennedy: your OS thing, no.
- 26:14Michael Kennedy: This comes from a browser or whatever,
- 26:16Michael Kennedy: right?
- 26:16Michael Kennedy: Or your raw socket support,
- 26:19Michael Kennedy: I don't know about you.
- 26:20Hood Chatham: Yeah,
- 26:20Gyeongjae Choi: right.
- 26:21Gyeongjae Choi: If the package is depending on some native things
- 26:24Gyeongjae Choi: like threadings or multi-processing or self-processing,
- 26:28Gyeongjae Choi: and the native sockets will not basically work
- 26:31Gyeongjae Choi: and browser Piodies.
- 26:33Gyeongjae Choi: If you're running in Cloudflare Workers
- 26:35Gyeongjae Choi: or Node.js,
- 26:36Gyeongjae Choi: they will
- 26:37Gyeongjae Choi: work because Node.js have access
- 26:39Gyeongjae Choi: to some of them and still
- 26:42Gyeongjae Choi: threadings or sub-processes are not
- 26:43Gyeongjae Choi: working,
- 26:44Gyeongjae Choi: but some of them will work
- 26:45Gyeongjae Choi: depending on the platform you're running in Piodies.
- 26:47Michael Kennedy: Does async.io work?
- 26:50Hood Chatham: That was a
- 26:51Hood Chatham: big project when I first started maintaining
- 26:53Hood Chatham: Piodies was to make async.io work
- 26:55Hood Chatham: because everything in a
- 26:57Hood Chatham: browser is async.
- 26:58Hood Chatham: So when there wasn't a good asyncio story for Pyodide,
- 27:02Hood Chatham: it was like really rough to use it
- 27:04Hood Chatham: because you had to just like.then,
- 27:05Hood Chatham: .then, you know.
- 27:06Michael Kennedy: Yeah, callback, callback, callback,
- 27:08Michael Kennedy: right?
- 27:09Hood Chatham: And, you know, at least in JavaScript,
- 27:11Hood Chatham: a lambda can have like,
- 27:12Hood Chatham: you know, a multi-line body.
- 27:14Hood Chatham: And so like lambdas are not that bad in JavaScript,
- 27:16Hood Chatham: whereas in Python,
- 27:17Hood Chatham: like lambdas suck.
- 27:18Hood Chatham: So you have to do like death,
- 27:19Hood Chatham: like a thing,
- 27:20Hood Chatham: and then put it, it's like.
- 27:21Michael Kennedy: I wonder if Python should have had multi-line lambdas.
- 27:25Michael Kennedy: I do kind of like them for.
- 27:27Hood Chatham: I think it should have actually been.
- 27:28Hood Chatham: and then it kind of went to line land.
- 27:31Hood Chatham: I think curly braces are
- 27:33Hood Chatham: the way.
- 27:35Michael Kennedy: Oh, you're going to cause a fight.
- 27:37Dominik Picheta: The developers would disagree with that.
- 27:40Hood Chatham: If I have curly braces,
- 27:41Hood Chatham: I can have multi-line lambdas
- 27:42Hood Chatham: that I care way more about.
- 27:44Dominik Picheta: You can have multi-line lambdas without
- 27:46Dominik Picheta: curly braces as well.
- 27:48Hood Chatham: But no one's ever figured out the syntax.
- 27:49Hood Chatham: That's why it doesn't exist.
- 27:51Dominik Picheta: They have,
- 27:52Dominik Picheta: actually. There are languages that do it.
- 27:54Michael Kennedy: Backslash.
- 27:55Michael Kennedy: Backslashes, come on.
- 27:56Hood Chatham: It has to fit with the existing syntax of Python.
- 28:00Hood Chatham: So if you designed a new language,
- 28:02Hood Chatham: you could maybe make it work.
- 28:03Michael Kennedy: I don't think we're going to be able to
- 28:06Michael Kennedy: completely solve this curly braces are not problem.
- 28:09Michael Kennedy: But Hood, I expected parentheses from you
- 28:12Michael Kennedy: as a Lisp person,
- 28:13Michael Kennedy: just parentheses,
- 28:13Michael Kennedy: parentheses,
- 28:14Michael Kennedy: parentheses,
- 28:14Michael Kennedy: parentheses.
- 28:14Hood Chatham: I'm looking with parentheses too.
- 28:17Hood Chatham: I don't object.
- 28:18Hood Chatham: Lisp also can have multi-line lab.
- 28:21Michael Kennedy: I can't do all the parentheses in Lisp.
- 28:23Michael Kennedy: It's not going to work for me.
- 28:24Hood Chatham: What if you had new syntax?
- 28:26Michael Kennedy: I do think there's interesting new syntax that can be added.
- 28:29Michael Kennedy: We've got the no coalescing or non coalescing operators
- 28:34Michael Kennedy: and that kind of stuff possibly coming to Python.
- 28:37Michael Kennedy: There will be things, but I don't think multi-line lambdas
- 28:39Michael Kennedy: are going to be one of them.
- 28:40Michael Kennedy: All right, let's talk about,
- 28:42Michael Kennedy: we talked about a little bit,
- 28:43Michael Kennedy: but let's go ahead and just talk a bit about
- 28:45Michael Kennedy: edge workers in general.
- 28:47Michael Kennedy: Because we talked about you've got over 300 points of presence.
- 28:50Michael Kennedy: They're all near the users.
- 28:52Michael Kennedy: That totally makes sense.
- 28:53Michael Kennedy: but maybe compare and contrast this with like running on a VIP,
- 28:57Michael Kennedy: just a virtual server or in Kubernetes or even serverless.
- 29:01Michael Kennedy: Because to me, it feels kind of serverless-like,
- 29:04Michael Kennedy: but not.
- 29:04Dominik Picheta: I mean, it is serverless,
- 29:06Dominik Picheta: I would say.
- 29:06Dominik Picheta: What makes you think it's not?
- 29:08Michael Kennedy: Well, a traditional serverless, I guess.
- 29:10Michael Kennedy: You're right, it is serverless.
- 29:11Michael Kennedy: I'm thinking like AWS Lambda and that kind of.
- 29:14Dominik Picheta: Yeah.
- 29:15Michael Kennedy: So in my mind, AWS Lambda runs in a data center.
- 29:19Michael Kennedy: Like my Lambdas are set to run in US East 1 or in Frankfurt or something like that.
- 29:24Michael Kennedy: And in that way, it's not the same.
- 29:25Hood Chatham: I feel like these words like edge and serverless and cloud are all more like marketing terms
- 29:31Hood Chatham: than like technical terms.
- 29:32Hood Chatham: And so that leaves some vagueness about what exactly they mean.
- 29:35Dominik Picheta: Yeah, I would actually consider,
- 29:37Dominik Picheta: I mean, workers in general to be more serverless than AWS Lambda.
- 29:42Dominik Picheta: I mean...
- 29:42Michael Kennedy: I do too.
- 29:43Michael Kennedy: I do too.
- 29:44Dominik Picheta: Yeah.
- 29:44Dominik Picheta: Just because you don't have to worry about where you're placing your workers.
- 29:50Dominik Picheta: They just show up wherever your users are, which is great.
- 29:52Michael Kennedy: I think they're more serverless than Lambda as well.
- 29:55Michael Kennedy: The only thing is that Lambda claimed the term serverless before,
- 30:01Michael Kennedy: right?
- 30:01Michael Kennedy: And so I think it's worth a little bit of a compare and contrast.
- 30:04Michael Kennedy: So I'm a user I've written,
- 30:07Michael Kennedy: or I'm a user I'm consuming in API,
- 30:10Michael Kennedy: open up,
- 30:10Michael Kennedy: I don't know,
- 30:11Michael Kennedy: React front-end app,
- 30:12Michael Kennedy: and it says, I need to do my work. I want to do it close to you.
- 30:16Michael Kennedy: So
- 30:16Michael Kennedy: what happens next? How do these things work? Well,
- 30:20Dominik Picheta: you connect to your nearest point of presence.
- 30:22Dominik Picheta: That nearest point of presence has the worker's runtime running on it.
- 30:26Dominik Picheta: That worker's runtime has
- 30:28Dominik Picheta: v8 on it,
- 30:29Dominik Picheta: and v8 runs Pyodide in WebAssembly.
- 30:32Michael Kennedy: Yeah.
- 30:33Michael Kennedy: But as a developer,
- 30:34Michael Kennedy: I don't make that
- 30:35Michael Kennedy: choice,
- 30:35Michael Kennedy: right? It's like a dynamic DNS choice that says,
- 30:38Michael Kennedy: I know you asked for,
- 30:40Michael Kennedy: I don't know,
- 30:41Michael Kennedy: worker.collectifair.com slash whatever,
- 30:43Michael Kennedy: but you actually get Southeast Asia in this location.
- 30:48Michael Kennedy: And that's just kind of the magic of CDNs, right?
- 30:50Michael Kennedy: Yeah.
- 30:51Michael Kennedy: Okay.
- 30:52Michael Kennedy: So let's talk this back up.
- 30:54Hood Chatham: I always describe this as being like a CDN,
- 30:58Hood Chatham: except for instead of with static assets,
- 30:59Hood Chatham: it distributes programs and then runs the programs on your data.
- 31:03Michael Kennedy: Yeah.
- 31:04Michael Kennedy: Okay.
- 31:04Michael Kennedy: So let's talk about a deployment.
- 31:07Michael Kennedy: Do I deploy my Python files?
- 31:09Michael Kennedy: Do I do a local build and get a WebAssembly thing that I upload to you?
- 31:13Michael Kennedy: How does that work?
- 31:14Gyeongjae Choi: You don't build any WebAssembly things yourself.
- 31:16Gyeongjae Choi: Like all the WebAssembly things are already pre-built.
- 31:19Gyeongjae Choi: So the deploying Python workers is basically you write some Python codes.
- 31:24Gyeongjae Choi: And you need to, if you're using some Python packages as dependencies,
- 31:27Gyeongjae Choi: you need to install them through uv.
- 31:29Gyeongjae Choi: So uv has a support for like installing Python packages
- 31:33Gyeongjae Choi: that are built for WebAssembly into your local files.
- 31:36Gyeongjae Choi: Of course, you cannot run it inside your local machine.
- 31:38Gyeongjae Choi: like you'll only have like a native Python interpreter,
- 31:42Gyeongjae Choi: or you can use Pyodite to run it.
- 31:44Gyeongjae Choi: So basically,
- 31:45Gyeongjae Choi: we like compress all those,
- 31:47Gyeongjae Choi: your Python applications and packages
- 31:49Gyeongjae Choi: into a Cloudflare web server,
- 31:51Gyeongjae Choi: and it's distributed around the world.
- 31:53Gyeongjae Choi: And the Cloudflare runtime will like download the application
- 31:56Gyeongjae Choi: and run it inside Pyodite and Cloudflare runtime.
- 31:59Michael Kennedy: Yeah, awesome.
- 32:00Michael Kennedy: What's the local dev story?
- 32:01Michael Kennedy: Now, I hadn't really thought about that before,
- 32:03Michael Kennedy: but I want to debug it, play with it.
- 32:05Dominik Picheta: Yeah,
- 32:06Dominik Picheta: so...
- 32:06Michael Kennedy: I push it up to...
- 32:07Michael Kennedy: Yeah, go ahead.
- 32:07Michael Kennedy: Go ahead, Dominic.
- 32:08Dominik Picheta: Yeah, so I mean,
- 32:10Dominik Picheta: part of the worker's runtime is open source as worker D,
- 32:14Dominik Picheta: if you want to look it up,
- 32:15Dominik Picheta: it's on GitHub.
- 32:17Dominik Picheta: And you basically run that locally.
- 32:19Dominik Picheta: I mean, we have like a CLI that wraps it for you. So it's nice and easy called Wrangler.
- 32:26Dominik Picheta: But we're moving to CF now as well.
- 32:29Dominik Picheta: But basically,
- 32:31Dominik Picheta: you just you just run it locally,
- 32:32Dominik Picheta: you you edit the files of your worker,
- 32:36Dominik Picheta: they get reloaded automatically.
- 32:38Dominik Picheta: as you edit them,
- 32:40Dominik Picheta: you just send requests locally and see what happens.
- 32:42Michael Kennedy: Okay.
- 32:42Michael Kennedy: Yeah,
- 32:43Michael Kennedy: I'll be sure to link to the WorkerD project so people can download and install it.
- 32:46Michael Kennedy: I'm sure it's in your quick start, though, right?
- 32:48Gyeongjae Choi: Yeah.
- 32:48Gyeongjae Choi: I think the very cool part of the Cloud for Worker's runtime platform is that the WorkerD is open source.
- 32:54Gyeongjae Choi: So basically, you can run the same code in the same runtime in your local machine and the prods.
- 33:00Gyeongjae Choi: You can test everything that happens in prod in your local machine.
- 33:03Michael Kennedy: Interesting.
- 33:03Michael Kennedy: So this really is what runs on the edge when stuff happens,
- 33:07Michael Kennedy: but you can just run it locally as well.
- 33:08Gyeongjae Choi: Yeah, exactly.
- 33:09Michael Kennedy: Yeah, I mean, that's pretty unique,
- 33:11Michael Kennedy: right?
- 33:11Michael Kennedy: Because if I was doing Lambda
- 33:13Michael Kennedy: or I was doing EKS or something like that,
- 33:16Michael Kennedy: it's not the same.
- 33:17Michael Kennedy: I can install a Kubernetes cluster
- 33:19Michael Kennedy: and run pods and stuff,
- 33:21Michael Kennedy: but that's not the same as running
- 33:22Michael Kennedy: in Amazon's Kubernetes service.
- 33:25Michael Kennedy: And this sounds like it kind of is,
- 33:27Michael Kennedy: which is pretty interesting.
- 33:28Michael Kennedy: So let's talk about the platform a bit
- 33:30Michael Kennedy: because this,
- 33:30Michael Kennedy: I was a little bit unsure of,
- 33:33Michael Kennedy: or just don't have a ton of experience.
- 33:35Michael Kennedy: So it's one thing to run Python,
- 33:37Michael Kennedy: on a point of presence and point sort of thing.
- 33:40Michael Kennedy: But databases,
- 33:41Michael Kennedy: is the database got a little bit my data?
- 33:43Michael Kennedy: You know, I connect halfway around the world to Postgres
- 33:45Michael Kennedy: and is that maybe not as good?
- 33:48Michael Kennedy: So there's a bunch of interesting things as well.
- 33:50Michael Kennedy: And so you all like numbering for your D1,
- 33:55Michael Kennedy: R2 and so on.
- 33:56Michael Kennedy: But I have this crazy fascination with SQLite right now.
- 33:59Michael Kennedy: So this is especially interesting to me.
- 34:03Michael Kennedy: So let's talk about some of these building blocks
- 34:04Michael Kennedy: that not just Python workers use, but all of them.
- 34:07Michael Kennedy: But at the same time,
- 34:08Michael Kennedy: they're here for the Python workers now.
- 34:10Michael Kennedy: And so that's pretty interesting.
- 34:12Michael Kennedy: Who wants to introduce D1 to the world?
- 34:14Michael Kennedy: Dominic.
- 34:16Dominik Picheta: Sure.
- 34:16Dominik Picheta: I mean, I can give it a shot.
- 34:20Dominik Picheta: So I personally love SQLite.
- 34:23Dominik Picheta: And I've actually been writing web apps using it,
- 34:28Dominik Picheta: just even before running on workers,
- 34:31Dominik Picheta: because it's so versatile.
- 34:32Dominik Picheta: It's so easy to set up.
- 34:33Dominik Picheta: You just load the library and save the database on your local file system.
- 34:41Dominik Picheta: And I think this is basically an extension of that.
- 34:43Dominik Picheta: I mean,
- 34:44Dominik Picheta: you just get a local to your worker SQLite database.
- 34:49Dominik Picheta: You can write to it.
- 34:50Dominik Picheta: It gets replicated across the world for you.
- 34:53Dominik Picheta: So,
- 34:55Dominik Picheta: you know, and it scales with your workers as well.
- 34:56Dominik Picheta: You don't have to worry about that at all.
- 34:58Michael Kennedy: It's pretty wild because you've got like 300 database nodes, which is pretty incredible.
- 35:03Michael Kennedy: And for people who don't know, they might think of SQLite as a toy.
- 35:06Michael Kennedy: It is extremely fast as a database.
- 35:10Michael Kennedy: So it's pretty interesting,
- 35:11Michael Kennedy: I think.
- 35:12Michael Kennedy: Now, the one thing that seems tricky is somebody in Southeast Asia and somebody in London writes
- 35:18Michael Kennedy: to the database at the same time.
- 35:20Michael Kennedy: Now what?
- 35:22Dominik Picheta: Yeah, to be honest, I don't know the details of how that works.
- 35:25Dominik Picheta: But I think there is some mechanisms to make sure that it's all consistent and you can
- 35:32Dominik Picheta: make sure there's no conflicts there. Yeah. Yeah. Yeah.
- 35:35Michael Kennedy: So something I've been looking at lately is
- 35:39Michael Kennedy: Lightstream actually been setting this up.
- 35:41Michael Kennedy: So Lightstream is really interesting because it
- 35:42Michael Kennedy: works on SQLite and you set up the write ahead log, the wall in SQLite, it will basically
- 35:49Michael Kennedy: synchronize and stream that write ahead log off to somewhere else for backup and replication and so
- 35:55Michael Kennedy: on. So I'm wondering,
- 35:56Michael Kennedy: my first thought is probably they're doing something with the write ahead log
- 36:00Michael Kennedy: and then merging,
- 36:01Michael Kennedy: you know,
- 36:01Michael Kennedy: synchronizing that
- 36:02Michael Kennedy: and then merging,
- 36:03Michael Kennedy: combining it or something like that.
- 36:05Michael Kennedy: I'm not totally sure,
- 36:06Michael Kennedy: but this is my theory.
- 36:07Hood Chatham: One of the great things about the design of Python workers
- 36:10Hood Chatham: is that we just consume these things.
- 36:11Hood Chatham: We don't need to know how they work.
- 36:13Michael Kennedy: Yeah, exactly.
- 36:14Michael Kennedy: It's awesome.
- 36:15Michael Kennedy: All right, we got a couple more.
- 36:16Michael Kennedy: Hyperdrive.
- 36:16Michael Kennedy: So D1 is kind of SQLite Hyperdrive.
- 36:19Michael Kennedy: And this, I think, is new as part of your launch,
- 36:21Michael Kennedy: right?
- 36:22Michael Kennedy: This is kind of like distributed Postgres,
- 36:24Michael Kennedy: but that wasn't available before.
- 36:25Michael Kennedy: I don't know exactly,
- 36:26Michael Kennedy: right?
- 36:27Michael Kennedy: Something like this?
- 36:28Gyeongjae Choi: Yeah, I think a hyperdrive is relatively new.
- 36:30Gyeongjae Choi: And,
- 36:31Gyeongjae Choi: and it's kind, I think it's kind of the proxy,
- 36:35Gyeongjae Choi: I think I can explain as a kind of proxy that there's like a truth of source,
- 36:39Gyeongjae Choi: related database like PostgreSQL,
- 36:41Gyeongjae Choi: MySQL,
- 36:41Gyeongjae Choi: Summary, and the Summary. And we have a lot of like
- 36:45Gyeongjae Choi: proxies in the edge that can basically like make your database connections a lot more faster,
- 36:51Gyeongjae Choi: like each there's like 350 hyperdrives that like maintains the connection pool with the original
- 36:56Gyeongjae Choi: database,
- 36:57Gyeongjae Choi: like making the read and write a lot faster.
- 36:59Michael Kennedy: Right,
- 36:59Michael Kennedy: right.
- 37:00Michael Kennedy: You can turn on caching to say,
- 37:02Michael Kennedy: you know, this table doesn't change very often.
- 37:04Michael Kennedy: So if you've read that table over here, then just,
- 37:08Michael Kennedy: you know,
- 37:08Michael Kennedy: answer questions from it,
- 37:09Michael Kennedy: something like that.
- 37:10Michael Kennedy: It's awesome.
- 37:10Dominik Picheta: Yeah, I would just add to that.
- 37:13Dominik Picheta: It's worth noting that we talked a little bit about sockets before and socket support
- 37:18Dominik Picheta: in Piodide.
- 37:20Dominik Picheta: And that is actually what I think,
- 37:22Dominik Picheta: Jay,
- 37:22Dominik Picheta: you've been working on, right?
- 37:23Dominik Picheta: making sockets work on workers for Python.
- 37:27Dominik Picheta: And that is what makes Hyperdrive work.
- 37:30Dominik Picheta: Hyperdrive is built on these TCP sockets.
- 37:33Dominik Picheta: So without that, it wouldn't work.
- 37:35Gyeongjae Choi: Yeah,
- 37:35Gyeongjae Choi: exactly.
- 37:36Gyeongjae Choi: Exactly.
- 37:36Gyeongjae Choi: So supporting Hyperdrive in Cloudflare Python workers
- 37:40Gyeongjae Choi: and in Pyrodite was one of the main goals for us
- 37:43Gyeongjae Choi: before launching it at GA.
- 37:47Gyeongjae Choi: And Pyrodite did not have socket support
- 37:49Gyeongjae Choi: because browsers never had that.
- 37:51Gyeongjae Choi: But to use the relational databases,
- 37:54Gyeongjae Choi: you definitely need TCP connections and sockets.
- 37:58Gyeongjae Choi: So we wired up the Node.js socket APIs inside Pyodide.
- 38:05Gyeongjae Choi: So workers'
- 38:06Gyeongjae Choi: runtime support Node.js socket APIs.
- 38:08Gyeongjae Choi: So they are actually wired up inside Pyodide.
- 38:11Gyeongjae Choi: So that by calling socket syscalls inside Pyodide actually calls a Node.js socket calls.
- 38:17Gyeongjae Choi: So that's how AverageRM works.
- 38:18Hood Chatham: This is really crazy because the socket APIs in Node, of course, are all asynchronous,
- 38:25Hood Chatham: but most of the socket system calls that you have in Linux are synchronous calls.
- 38:30Hood Chatham: And so in order to handle the system call,
- 38:37Hood Chatham: the system call has to stack switch and let the JavaScript event loop turn so that it can get the IO completed and then it unstacks switches and returns to the...
- 38:51Michael Kennedy: Yeah, that's wild.
- 38:52Hood Chatham: So this is all transparent to C code.
- 38:54Hood Chatham: So if you have a C application that consumes libc APIs to handle sockets,
- 39:00Hood Chatham: it just works.
- 39:01Michael Kennedy: Yeah,
- 39:01Michael Kennedy: I was kind of wondering if somehow you could unify the event loop of Node and the event loop of asyncio and kind of make them all one thing.
- 39:11Hood Chatham: So that's what we've done.
- 39:12Hood Chatham: So we have our event loop in Python,
- 39:15Hood Chatham: which we use for PyTag, which we call WebLoop.
- 39:18Hood Chatham: And it basically just subscribes to the browser event.
- 39:21Hood Chatham: And this is essentially necessary for two reasons.
- 39:24Hood Chatham: One is that all actual IO happen on the browser loop.
- 39:28Hood Chatham: Like there is really no way,
- 39:30Hood Chatham: like if you can make your own like separate loop,
- 39:33Hood Chatham: but like it can't do IO.
- 39:36Hood Chatham: And while it's spinning the real IO,
- 39:38Hood Chatham: it's blocking the real event loop,
- 39:40Hood Chatham: which can't do the real IO.
- 39:42Hood Chatham: Yeah.
- 39:42Hood Chatham: And I said there were going to be two reasons,
- 39:45Hood Chatham: but I feel like that was both reasons.
- 39:47Michael Kennedy: Well,
- 39:49Michael Kennedy: it sounds like an important one.
- 39:50Michael Kennedy: Okay.
- 39:50Michael Kennedy: So we also have R2,
- 39:53Michael Kennedy: which is like S3-ish.
- 39:56Gyeongjae Choi: Exactly.
- 39:57Michael Kennedy: How is it different,
- 39:59Michael Kennedy: though?
- 39:59Gyeongjae Choi: Well, I think it's like almost the same.
- 40:02Gyeongjae Choi: The name R2 actually comes from S3.
- 40:04Gyeongjae Choi: It's like a 1 minus S minus 1 and 3 minus 1.
- 40:08Gyeongjae Choi: I see.
- 40:08Michael Kennedy: Yeah, so RS and then 3, 2.
- 40:10Dominik Picheta: It's exactly the same.
- 40:11Dominik Picheta: I think the main thing with it is that there's no egress fees.
- 40:16Dominik Picheta: So it's cheaper.
- 40:17Michael Kennedy: No egress fees.
- 40:18Michael Kennedy: Okay, very interesting.
- 40:19Michael Kennedy: All right.
- 40:20Michael Kennedy: And you can use this.
- 40:21Michael Kennedy: Some of these things,
- 40:22Michael Kennedy: I guess probably almost all of them,
- 40:23Michael Kennedy: you can use regardless of whether you're using Cloudflare workers or not.
- 40:27Michael Kennedy: I could use R2 just because I want object storage.
- 40:31Michael Kennedy: Interesting.
- 40:31Michael Kennedy: I'm about to think more about that.
- 40:33Michael Kennedy: It's giving me ideas.
- 40:34Michael Kennedy: Okay.
- 40:35Michael Kennedy: And you've got queues, Cloudflare queues,
- 40:37Michael Kennedy: and AI inference.
- 40:39Michael Kennedy: So these are all the...
- 40:40Michael Kennedy: I kind of wanted to go through these because these are the building blocks
- 40:43Michael Kennedy: or the platform pieces that are available to these new Python workers,
- 40:47Michael Kennedy: right?
- 40:47Gyeongjae Choi: Yeah, you have a lot of building blocks.
- 40:50Gyeongjae Choi: inside Cloudflow.
- 40:51Gyeongjae Choi: Developer platform, we keep adding it every month.
- 40:54Gyeongjae Choi: So I'm not,
- 40:55Gyeongjae Choi: to be honest,
- 40:56Gyeongjae Choi: not following all those releases,
- 40:58Gyeongjae Choi: but queues and AI and their workflows,
- 41:01Gyeongjae Choi: things like that.
- 41:02Gyeongjae Choi: But you can easily connect your workers
- 41:04Gyeongjae Choi: with those new features
- 41:07Gyeongjae Choi: and to build a full stack application.
- 41:09Gyeongjae Choi: If you need a queue, you can use queue.
- 41:10Gyeongjae Choi: If you want to run AI inference into Edge,
- 41:13Gyeongjae Choi: you can use Worker's AI,
- 41:14Gyeongjae Choi: which is awesome.
- 41:15Michael Kennedy: Yeah, that's super,
- 41:16Michael Kennedy: super neat.
- 41:17Michael Kennedy: All right, let's go to the announcement.
- 41:18Michael Kennedy: And here it is.
- 41:19Michael Kennedy: September 21.
- 41:21Michael Kennedy: Took us a little bit to actually press record,
- 41:23Michael Kennedy: but it's been a few weeks, not too long though.
- 41:25Michael Kennedy: This announcement by the three of you,
- 41:27Michael Kennedy: Python web workers are now generally available.
- 41:30Michael Kennedy: Hooray!
- 41:31Michael Kennedy: That's awesome.
- 41:32Michael Kennedy: How long had they been in beta style availability before that?
- 41:37Hood Chatham: Feels like since like spring of 2024.
- 41:39Hood Chatham: So I started in October of 2023
- 41:42Hood Chatham: and it took about six months to get a beta going
- 41:46Hood Chatham: and then it took like over two years
- 41:47Hood Chatham: to make it generally available.
- 41:50Michael Kennedy: Wow.
- 41:51Michael Kennedy: So what was that work?
- 41:52Michael Kennedy: Like trying,
- 41:52Michael Kennedy: for example,
- 41:53Michael Kennedy: the IO loops
- 41:54Michael Kennedy: and all the different,
- 41:55Michael Kennedy: all the just the sockets that Jay worked on,
- 41:57Michael Kennedy: all these things that you need in place.
- 41:59Michael Kennedy: That's what like data science pyodied
- 42:02Michael Kennedy: to full runtime pyodied work was.
- 42:05Dominik Picheta: I think the packaging story was actually a big thing.
- 42:07Dominik Picheta: I mean,
- 42:08Dominik Picheta: when we started,
- 42:09Dominik Picheta: we,
- 42:11Dominik Picheta: so there was two parts to this.
- 42:13Dominik Picheta: One was trying to make sure
- 42:15Dominik Picheta: that the cold starts are as fast as possible
- 42:17Dominik Picheta: and especially when we're using packages.
- 42:20Dominik Picheta: And when we started,
- 42:21Dominik Picheta: we figured we'll just allow people
- 42:23Dominik Picheta: to use certain built-in packages that Pyodite provides.
- 42:28Dominik Picheta: But we just realized that that isn't flexible enough
- 42:30Dominik Picheta: and we just need to allow people to use
- 42:32Dominik Picheta: whatever packages they want,
- 42:33Dominik Picheta: ideally.
- 42:34Dominik Picheta: So we basically switched away from that approach
- 42:37Dominik Picheta: to building a UV-based tool called PyWrangler,
- 42:41Dominik Picheta: which lets you just install any package that you want
- 42:44Dominik Picheta: and get it into your worker very easily.
- 42:47Dominik Picheta: And then there's the memory snapshots aspect of it, which I think we might get to later.
- 42:51Dominik Picheta: Oh, yeah.
- 42:51Michael Kennedy: Oh, yeah.
- 42:52Hood Chatham: Memory snapshots were basically what I started working on as soon as I came to Cloudflare.
- 42:56Hood Chatham: I spent like two months researching memory snapshots before I wrote like any code, made
- 43:01Hood Chatham: any pull requests at all.
- 43:03Michael Kennedy: Interesting.
- 43:03Michael Kennedy: Okay.
- 43:04Michael Kennedy: And you just gave a presentation at the Python Language Summit,
- 43:07Michael Kennedy: also at EuroPython a little
- 43:08Michael Kennedy: while ago,
- 43:09Michael Kennedy: right?
- 43:09Hood Chatham: Yeah,
- 43:10Hood Chatham: right.
- 43:10Hood Chatham: So this was about the fact that there is an important difficulty that comes up with memory snapshots, which is that it introduces a difference between sort of startup time or like, you know,
- 43:25Hood Chatham: sort of like top level execution and like your actual like runtime logic.
- 43:31Hood Chatham: And the Python language does not have a distinction like this,
- 43:36Hood Chatham: right?
- 43:36Hood Chatham: Like the Python runtime,
- 43:38Hood Chatham: when you start it up, it bootstraps itself.
- 43:40Hood Chatham: And then it just starts evaling user code.
- 43:44Hood Chatham: And whether it's top level user code or calling a function,
- 43:48Hood Chatham: it doesn't matter.
- 43:49Hood Chatham: Like it just evals until it stops evaling.
- 43:52Hood Chatham: And when it runs out of stuff to do, it shuts down.
- 43:54Hood Chatham: Yeah,
- 43:54Michael Kennedy: even things like import statements are really code execution,
- 43:58Michael Kennedy: not just, you know,
- 43:59Michael Kennedy: linking or whatever.
- 44:00Michael Kennedy: It takes a bit to wrap your head around it.
- 44:02Hood Chatham: It's just right.
- 44:04Hood Chatham: Like the import statement is compiled into something.
- 44:07Hood Chatham: And then like those op codes get like interpreted.
- 44:09Hood Chatham: And that causes import lib to go look up files on disk,
- 44:13Hood Chatham: find the thing that it wants to import.
- 44:15Hood Chatham: And then it like starts executing that file.
- 44:18Hood Chatham: And so for memory snapshots,
- 44:21Hood Chatham: you know, we say like, okay,
- 44:22Hood Chatham: look,
- 44:22Hood Chatham: all of that top level stuff,
- 44:23Hood Chatham: it's going to happen the same every time.
- 44:26Hood Chatham: So it's very wasteful to keep doing it every time someone's deployed an application to the edge.
- 44:32Hood Chatham: Like every single time it cold starts, it's going to execute exactly the same top level code and end up with exactly the same outcome.
- 44:40Hood Chatham: And so we would really like to just save that work.
- 44:44Hood Chatham: And this is actually very similar to the work that like optimizing Python compilers like PyPy and Grawl Python do,
- 44:52Hood Chatham: because they also want to evaluate all that stuff at compile time.
- 44:57Hood Chatham: This is like partial evaluation.
- 44:59Hood Chatham: So it's a bit of a different technology than a memory snapshot.
- 45:01Hood Chatham: But it has the same fundamental issue,
- 45:03Hood Chatham: which is that it needs to impose a model of like what is startup time,
- 45:08Hood Chatham: what can be precompiled onto a language that doesn't have one.
- 45:12Hood Chatham: Now, of course,
- 45:13Hood Chatham: you know, I think this is this is this talk is like a fun thing to think about.
- 45:18Hood Chatham: But,
- 45:18Hood Chatham: you know,
- 45:19Hood Chatham: I mean,
- 45:19Hood Chatham: at least Thomas Vouders said that it was like a nonstarter.
- 45:23Hood Chatham: And I think he is right that like, you know, it's sort of too late for the language to get something like this.
- 45:27Hood Chatham: But I have friends that are working on on,
- 45:29Hood Chatham: you know, new programming languages.
- 45:31Hood Chatham: My friend Antonio Cooney is trying to make this language called SPI,
- 45:34Hood Chatham: which stands for static Python,
- 45:37Hood Chatham: which is supposed to be like a better R Python,
- 45:39Hood Chatham: which was used for PyPy.
- 45:41Hood Chatham: And basically,
- 45:42Hood Chatham: the main idea in some sense of the language is to pre-bake a notion of
- 45:48Hood Chatham: compile,
- 45:48Hood Chatham: to create a notion of compile time versus execution time,
- 45:52Hood Chatham: and then allow lots
- 45:54Hood Chatham: of compile time evaluation of spy code so that it can perform that.
- 45:59Michael Kennedy: Yeah, the basic idea is something like you're going to load the interpreter,
- 46:02Michael Kennedy: it's going to
- 46:03Michael Kennedy: load all the standard library,
- 46:04Michael Kennedy: it's going to maybe read some of the files,
- 46:07Michael Kennedy: parse them,
- 46:08Michael Kennedy: do the import processing.
- 46:10Michael Kennedy: And that never changes,
- 46:11Michael Kennedy: right?
- 46:11Michael Kennedy: Well,
- 46:11Michael Kennedy: maybe the import, because it depends if you run code or not.
- 46:13Michael Kennedy: But other than that, you theoretically could say,
- 46:17Michael Kennedy: let's just see what happens.
- 46:18Michael Kennedy: And like a VM,
- 46:20Michael Kennedy: just go,
- 46:20Michael Kennedy: your memory's back.
- 46:21Michael Kennedy: Continue.
- 46:22Michael Kennedy: Yeah?
- 46:22Hood Chatham: Right.
- 46:22Hood Chatham: And of course, there's a lot of subtlety in there because we have,
- 46:26Hood Chatham: for instance,
- 46:27Hood Chatham: if you
- 46:28Hood Chatham: import a dynamic library,
- 46:29Hood Chatham: it does all this relocations.
- 46:33Hood Chatham: It allocates space for all the global variables that the dynamic library is going to define.
- 46:40Hood Chatham: And then it relocates them all into that space.
- 46:42Hood Chatham: And it, you know,
- 46:43Hood Chatham: relocates all the functions from the dynamic library.
- 46:46Hood Chatham: And somehow you have to do some crazy magic with the dynamic loader.
- 46:50Hood Chatham: Basically,
- 46:51Hood Chatham: like I have a loader patch that when it loads a dynamic library,
- 46:54Hood Chatham: writes down the relocation base that it's putting the dynamic library at.
- 46:59Hood Chatham: And then when I'm going to restore the memory snapshot,
- 47:01Hood Chatham: I have to make sure that it gets relocated to the same place.
- 47:04Hood Chatham: So I patch the malloc so that it will,
- 47:08Hood Chatham: instead of actually doing a memory allocation,
- 47:10Hood Chatham: it just looks,
- 47:11Hood Chatham: oh,
- 47:11Hood Chatham: in this context,
- 47:12Hood Chatham: I'm allocating memory for this dynamic library.
- 47:15Hood Chatham: In the snapshot,
- 47:16Hood Chatham: we allocated it at this address,
- 47:18Hood Chatham: so we're going to play back that address.
- 47:20Hood Chatham: And then all this crazy magic just sort of...
- 47:23Michael Kennedy: That sounds supremely complicated.
- 47:25Hood Chatham: It's very...
- 47:26Hood Chatham: It was a lot of fun.
- 47:27Hood Chatham: It's really horrible.
- 47:29Michael Kennedy: All right, so let's go back to the announcement.
- 47:31Michael Kennedy: There's a couple of code samples
- 47:33Michael Kennedy: and different types of things here.
- 47:35Michael Kennedy: So programming model is a little bit like writing an API,
- 47:39Michael Kennedy: yeah?
- 47:39Gyeongjae Choi: Yeah,
- 47:40Gyeongjae Choi: I think the major usage of workers runtime is writing an API server.
- 47:45Gyeongjae Choi: So we used Face the API a lot in our examples.
- 47:48Gyeongjae Choi: So a lot of Python users might use Python in different ways,
- 47:53Gyeongjae Choi: but I think the major use case of workers runtime is to build an API server
- 47:57Gyeongjae Choi: and connecting different findings in it.
- 47:59Gyeongjae Choi: So yeah, that's the examples we show in our flow post.
- 48:02Michael Kennedy: Yeah, you want your API to be super snappy and responsive.
- 48:06Michael Kennedy: So if you could put your data in D1 and then have your code also run right literally in
- 48:12Michael Kennedy: the same process right there,
- 48:13Michael Kennedy: like that's going to be really great.
- 48:15Michael Kennedy: Yeah.
- 48:15Michael Kennedy: So you can,
- 48:16Michael Kennedy: if you know how to write a FastAPI app,
- 48:18Michael Kennedy: it's the same thing.
- 48:19Michael Kennedy: Just instead of uvacoron.run,
- 48:21Michael Kennedy: it's just hand off the app and off it goes,
- 48:24Michael Kennedy: which is really,
- 48:25Michael Kennedy: really neat.
- 48:26Michael Kennedy: Now, the examples that I saw on this page, I don't remember,
- 48:29Michael Kennedy: I'm pretty sure they all
- 48:30Michael Kennedy: have like one request,
- 48:32Michael Kennedy: just like forward slash.
- 48:33Michael Kennedy: can I have a more complicated app with,
- 48:35Michael Kennedy: say, five or six different endpoints?
- 48:38Michael Kennedy: Yeah,
- 48:38Michael Kennedy: that's just per short, yes,
- 48:39Michael Kennedy: right?
- 48:39Hood Chatham: Like, you know, you could make any FastAPI app you want here, right?
- 48:43Dominik Picheta: Yeah, there is no limits to how many endpoints you can have.
- 48:47Dominik Picheta: I suppose it might be worth talking about the actual limits that the workers have.
- 48:51Dominik Picheta: And that is,
- 48:52Dominik Picheta: yeah, so it's memory,
- 48:53Dominik Picheta: which is 128 megabytes,
- 48:55Dominik Picheta: and CPU time as well.
- 48:59Dominik Picheta: You know, I think actually a great thing about workers is that you can do quite a lot
- 49:03Dominik Picheta: free,
- 49:04Dominik Picheta: like completely for free, you don't have to pay anything to Cloudflare,
- 49:06Dominik Picheta: you can run a very
- 49:08Dominik Picheta: simple FastAPI application,
- 49:09Dominik Picheta: even I think,
- 49:10Dominik Picheta: for free.
- 49:11Hood Chatham: What's the free request limit is like 100,000
- 49:14Hood Chatham: requests a day?
- 49:15Hood Chatham: Is that right?
- 49:15Dominik Picheta: Yeah,
- 49:16Dominik Picheta: yeah, you get 100,000 requests,
- 49:18Dominik Picheta: I think, per day.
- 49:20Dominik Picheta: And yeah,
- 49:21Dominik Picheta: if you type in workers limits into Google,
- 49:25Dominik Picheta: it should show up.
- 49:26Dominik Picheta: But if you know, if you're just
- 49:27Dominik Picheta: doing kind of more CPU intensive stuff,
- 49:29Dominik Picheta: then that is another limit that we have.
- 49:33Dominik Picheta: Yeah,
- 49:33Dominik Picheta: it's basically
- 49:34Dominik Picheta: there 10 milliseconds for free of CPU time and five minutes for paid.
- 49:39Dominik Picheta: But yeah, you can do quite a lot.
- 49:42Dominik Picheta: It's very,
- 49:42Dominik Picheta: very flexible.
- 49:43Hood Chatham: Right.
- 49:44Hood Chatham: Speaking of what we were doing for those two years,
- 49:46Hood Chatham: another thing
- 49:46Hood Chatham: that took a lot of careful work was making sure that when you run out of that 10 milliseconds of
- 49:51Hood Chatham: CPU time that a signal is delivered to the Python runtime,
- 49:56Hood Chatham: and it gracefully interrupts its
- 49:58Hood Chatham: execution and returns to Cloudflare so that it doesn't like leave it in a broken state.
- 50:04Hood Chatham: Because
- 50:05Hood Chatham: if you do this the naive way,
- 50:07Hood Chatham: JavaScript throws a non catchable exception into the runtime and
- 50:12Hood Chatham: forcibly unwinds all of the call stack without executing finally blocks or,
- 50:17Hood Chatham: you know, catch blocks.
- 50:18Hood Chatham: And so like any locks that you've taken
- 50:20Hood Chatham: that you were expecting to release in a finally block,
- 50:22Hood Chatham: that just doesn't get executed.
- 50:23Hood Chatham: And then the runtime is like completely broken.
- 50:26Hood Chatham: And so
- 50:27Michael Kennedy: Or
- 50:28Michael Kennedy: like half written files that are not, the
- 50:30Michael Kennedy: buffer's not flushed. All
- 50:31Michael Kennedy: sorts of things could go wrong. All
- 50:32Hood Chatham: sorts of things, you know, like
- 50:33Hood Chatham: loss of code relies on finally blocks executing
- 50:36Hood Chatham: and
- 50:37Hood Chatham: it was not executing the finally blocks. And
- 50:39Hood Chatham: so we had to like do some very elaborate thing to
- 50:42Hood Chatham: make the CPU time limiter deliver the signal correctly
- 50:46Hood Chatham: to the Python
- 50:47Hood Chatham: M-scripted operating system inside of the
- 50:50Hood Chatham: runtime.
- 50:50Hood Chatham: Of course, we have the same problem with
- 50:52Hood Chatham: Rust workers.
- 50:52Hood Chatham: So we basically have
- 50:54Hood Chatham: the same solution for both Python
- 50:56Hood Chatham: workers and for Rust workers for that.
- 50:57Michael Kennedy: As you start to bring in more languages,
- 50:59Michael Kennedy: you're like,
- 50:59Michael Kennedy: this is kind of the same problem.
- 51:01Michael Kennedy: Okay, this is great.
- 51:02Michael Kennedy: You've got a lot of
- 51:04Michael Kennedy: computer.
- 51:05Michael Kennedy: 100,000
- 51:06Michael Kennedy: requests a day for free?
- 51:07Michael Kennedy: That's a lot.
- 51:08Michael Kennedy: You can do a lot.
- 51:10Michael Kennedy: Many, many little hobby
- 51:11Michael Kennedy: apps and small apps live well under
- 51:13Michael Kennedy: that limit.
- 51:14Gyeongjae Choi: Right. I think the good part of
- 51:16Gyeongjae Choi: for like hobby developers
- 51:18Gyeongjae Choi: is we have really generous pricing.
- 51:20Gyeongjae Choi: I don't want to be too marketing pitch,
- 51:22Gyeongjae Choi: but I also used Qualifier when I was a student
- 51:25Gyeongjae Choi: because they really offered a good free pricing.
- 51:28Gyeongjae Choi: Like you can have like 10 gigabytes of R2 for free,
- 51:30Gyeongjae Choi: I guess.
- 51:31Gyeongjae Choi: So there's a storage,
- 51:32Gyeongjae Choi: there's a runtime,
- 51:34Gyeongjae Choi: there's everything you can use freely.
- 51:36Michael Kennedy: Yeah, well,
- 51:36Michael Kennedy: and you know, the storage is one thing,
- 51:38Michael Kennedy: but the egress,
- 51:40Michael Kennedy: that's where you pay money often
- 51:41Michael Kennedy: for S3 is you pay tons of bandwidth charges.
- 51:45Michael Kennedy: Yeah,
- 51:46Michael Kennedy: very neat.
- 51:46Michael Kennedy: All right, let's see.
- 51:47Michael Kennedy: Let's go back to this.
- 51:49Michael Kennedy: So first class language,
- 51:51Michael Kennedy: really good.
- 51:52Michael Kennedy: FastAPI,
- 51:54Michael Kennedy: Django,
- 51:54Michael Kennedy: Flask.
- 51:55Michael Kennedy: Does it basically run anything that does WSGI or ASCII
- 51:58Michael Kennedy: as each return that?
- 52:00Hood Chatham: You know,
- 52:01Hood Chatham: like,
- 52:01Hood Chatham: of course, there could be problems
- 52:02Hood Chatham: with them trying to start threads and things like that.
- 52:04Hood Chatham: But assuming that they don't try to start too many threads,
- 52:08Hood Chatham: then,
- 52:08Hood Chatham: like,
- 52:08Hood Chatham: you know, we have a general purpose ASCII
- 52:11Hood Chatham: and WSGI adapters that you see here.
- 52:13Michael Kennedy: Okay.
- 52:14Michael Kennedy: Yeah, well, you know, that was one of the best things that happened to Python web,
- 52:16Michael Kennedy: right?
- 52:17Michael Kennedy: That you got this interface that you can plug into all these different runtimes.
- 52:21Michael Kennedy: And,
- 52:21Michael Kennedy: you know, it sounds like you're as well.
- 52:23Hood Chatham: It's amazing for us.
- 52:24Hood Chatham: Yeah,
- 52:24Hood Chatham: because they don't try to do IO directly.
- 52:26Hood Chatham: And so,
- 52:27Hood Chatham: you know, I mean, that's exactly the problem we have with something like URL of three.
- 52:30Hood Chatham: Of course, URL of three specifically supports Pyodide.
- 52:32Hood Chatham: So it's okay.
- 52:33Hood Chatham: But like,
- 52:34Hood Chatham: it's normal way of doing IO just doesn't work.
- 52:36Hood Chatham: So it needs a separate path for Pyodide.
- 52:40Hood Chatham: And all of these things would need that if it weren't for these beautiful adapters.
- 52:44Michael Kennedy: that... Yeah, they're super
- 52:46Michael Kennedy: polished and optimized.
- 52:47Michael Kennedy: It's really nice.
- 52:48Michael Kennedy: Yeah. Let's talk. We only got
- 52:50Michael Kennedy: a couple minutes left before we're out
- 52:52Michael Kennedy: of time.
- 52:52Michael Kennedy: It's late
- 52:54Michael Kennedy: in some places,
- 52:54Michael Kennedy: early in others.
- 52:56Michael Kennedy: Let's maybe round out this
- 52:58Michael Kennedy: conversation by the types of
- 53:00Michael Kennedy: apps that you see people building
- 53:02Michael Kennedy: in Cloudflare workers in general, and
- 53:04Michael Kennedy: specifically also in Python.
- 53:06Michael Kennedy: Everyone knows what an API that
- 53:08Michael Kennedy: talks to a database looks like, but can I
- 53:10Michael Kennedy: do data science work here?
- 53:11Michael Kennedy: Can I do
- 53:12Michael Kennedy: long-running work? What types of things are people building here?
- 53:15Hood Chatham: A lot of the workers that I've looked at are big piles of boring business logic.
- 53:20Hood Chatham: It's just a mess,
- 53:22Hood Chatham: and it does apparently what they are needing.
- 53:25Hood Chatham: I would not recommend data science.
- 53:28Hood Chatham: It's not really a platform that has a lot of computing
- 53:32Hood Chatham: power.
- 53:33Hood Chatham: If you want to do things like graphics cards, SIMD,
- 53:35Hood Chatham: it doesn't have any of that.
- 53:38Hood Chatham: But it's a very powerful platform for stuff.
- 53:43Michael Kennedy: That's totally fair.
- 53:44Michael Kennedy: And I think that's one of the things
- 53:45Michael Kennedy: I was trying to kind of explore is, right?
- 53:47Michael Kennedy: Like how far can you push it before it just starts timing out
- 53:51Michael Kennedy: or whatever, it runs out of memory.
- 53:53Michael Kennedy: But what if I'm,
- 53:54Michael Kennedy: let's say I'm a researcher or a student
- 53:56Michael Kennedy: and I've got a pandas or just a parquet file
- 54:00Michael Kennedy: with 20,000 records.
- 54:01Michael Kennedy: And I do basic,
- 54:02Michael Kennedy: like, here's a,
- 54:03Michael Kennedy: let me do a little bit of query on that
- 54:04Michael Kennedy: then I'll draw a graph or whatever.
- 54:06Hood Chatham: It can, in principle, do stuff like that.
- 54:09Michael Kennedy: Yeah, that seems like it might work.
- 54:10Hood Chatham: Right.
- 54:10Hood Chatham: You can load pandas.
- 54:11Hood Chatham: You can load,
- 54:12Hood Chatham: you know,
- 54:13Hood Chatham: whatever the parquet package that is popular now is.
- 54:18Hood Chatham: And,
- 54:20Hood Chatham: you know, I mean,
- 54:21Hood Chatham: just the packages,
- 54:22Hood Chatham: you know, if you start,
- 54:23Hood Chatham: you know, like, for instance,
- 54:24Hood Chatham: SciPy is just too big,
- 54:27Hood Chatham: too horrible.
- 54:28Hood Chatham: And it doesn't really work to import SciPy.
- 54:32Hood Chatham: I mean, SciFi,
- 54:33Hood Chatham: when you bring it in,
- 54:34Hood Chatham: it has like over 100 different shared libraries.
- 54:37Hood Chatham: You know,
- 54:38Hood Chatham: yeah,
- 54:39Hood Chatham: SciFi has been like a real journey for us in Pyodide.
- 54:43Hood Chatham: Like it's really like the most horrible package.
- 54:47Hood Chatham: But if it's not SciFi,
- 54:49Hood Chatham: you know, Pandas works and you can just,
- 54:51Hood Chatham: you know, load your Parquet file and share your graph as long as it's not too big.
- 54:56Gyeongjae Choi: Well,
- 54:56Gyeongjae Choi: in my opinion,
- 54:57Gyeongjae Choi: like pandas or docdb or other data processing libraries are not very optimized for Python workers.
- 55:02Gyeongjae Choi: It's because like there are different,
- 55:04Gyeongjae Choi: like the concept is a little bit different because workers is very memory limited environment.
- 55:09Gyeongjae Choi: So we basically recommend everything to run in streams,
- 55:13Gyeongjae Choi: not like load a bunch of memory,
- 55:15Gyeongjae Choi: like lots of data frames inside memory.
- 55:17Michael Kennedy: More polars,
- 55:18Michael Kennedy: less pandas type of flow,
- 55:20Michael Kennedy: yeah?
- 55:20Gyeongjae Choi: Yeah,
- 55:20Gyeongjae Choi: like,
- 55:21Gyeongjae Choi: yeah, more polars,
- 55:22Gyeongjae Choi: not pandas.
- 55:23Gyeongjae Choi: if you need to load all the data frames in your memory,
- 55:26Gyeongjae Choi: that it won't fit.
- 55:27Gyeongjae Choi: You need to do streams.
- 55:28Gyeongjae Choi: But actually,
- 55:29Gyeongjae Choi: like Python packages are,
- 55:31Gyeongjae Choi: especially legacy Python packages,
- 55:32Gyeongjae Choi: are not very optimized for that.
- 55:33Gyeongjae Choi: So we'll need to do a lot of back and forth
- 55:36Gyeongjae Choi: to make it work properly.
- 55:37Michael Kennedy: Right.
- 55:38Michael Kennedy: Yeah,
- 55:38Michael Kennedy: I mean...
- 55:39Michael Kennedy: Go ahead.
- 55:39Hood Chatham: You go.
- 55:40Michael Kennedy: So we're talking about Pyodide and WebAssembly.
- 55:44Michael Kennedy: Another way, if I was this theoretical person
- 55:46Michael Kennedy: I was describing,
- 55:47Michael Kennedy: wanted to put this stuff on workers,
- 55:49Michael Kennedy: maybe what I do is I just put my parquet file
- 55:51Michael Kennedy: and my WebAssembly stuff on Cloudflare
- 55:54Michael Kennedy: and just put it on the front end,
- 55:55Michael Kennedy: right?
- 55:56Michael Kennedy: You could run it like a JupyterLite style of execution.
- 55:59Michael Kennedy: And then everyone gets their own little browser runtime
- 56:02Michael Kennedy: instead of Edgeware runtime.
- 56:03Hood Chatham: Lots of people are doing exactly that.
- 56:06Hood Chatham: And then of course,
- 56:07Hood Chatham: all of the compute is paid for by the end user.
- 56:10Hood Chatham: Exactly.
- 56:11Michael Kennedy: That's your iPhone battery or your iPad battery
- 56:15Michael Kennedy: or whatever,
- 56:15Michael Kennedy: rather than your compute bill.
- 56:19Michael Kennedy: Because setting up that kind of stuff is really tricky
- 56:21Michael Kennedy: for researchers who are not developers
- 56:23Michael Kennedy: and they're not DevOps people.
- 56:24Michael Kennedy: They're just like,
- 56:25Michael Kennedy: I just want to share this thing, right?
- 56:27Michael Kennedy: So maybe that's the way to go.
- 56:29Michael Kennedy: All right.
- 56:29Hood Chatham: I've talked to so many people
- 56:31Hood Chatham: who are doing that,
- 56:31Hood Chatham: like sharing their data science notebook,
- 56:34Hood Chatham: like instead of having to have
- 56:36Hood Chatham: a Jupyter notebook
- 56:37Hood Chatham: and then they make it
- 56:38Hood Chatham: and then their collaborators
- 56:39Hood Chatham: don't have the right things
- 56:40Hood Chatham: on their computer
- 56:41Hood Chatham: or it doesn't quite work.
- 56:43Hood Chatham: You know, this is exactly
- 56:43Hood Chatham: the same sorts of problems
- 56:44Hood Chatham: I saw in math all the time.
- 56:46Hood Chatham: And,
- 56:47Hood Chatham: you know,
- 56:47Hood Chatham: these internet-based tools
- 56:49Hood Chatham: are just like so great for them
- 56:51Hood Chatham: You know, and it really is like what happens with like a math or science project is like if there's a lowest common denominator effect where like the technology you can use your research is only the things that the least technically competent person in your group can use.
- 57:07Hood Chatham: Because if you can't get get it onto their computer and get it working for them,
- 57:10Hood Chatham: then they won't be able to productively contribute to a project that needs it.
- 57:13Michael Kennedy: Yeah, yeah.
- 57:14Michael Kennedy: And you're looking over at your 67 year old thesis advisor who still thinks Fortran is like the hot stuff. And you're like, Oh,
- 57:22Michael Kennedy: gosh,
- 57:23Hood Chatham: some of these people literally like it's like they have they like dictate to their secretary and like they've never touched a computer. And some of these people like contribute to the Linux kernel like regularly.
- 57:33Hood Chatham: Yeah,
- 57:33Hood Chatham: exactly.
- 57:34Hood Chatham: They both look like a 67,
- 57:35Hood Chatham: like nerdy mathematician,
- 57:37Hood Chatham: but like,
- 57:37Hood Chatham: just like the farest ends of the scale of like confidence with computers.
- 57:43Hood Chatham: Incredible.
- 57:44Michael Kennedy: All right,
- 57:45Michael Kennedy: you guys, let's call it there.
- 57:46Michael Kennedy: There's a lot of stuff that we could talk about.
- 57:48Michael Kennedy: I guess one really,
- 57:49Michael Kennedy: really quick thing I just want to give a shout out to is this memory snapshot stuff that we talked about.
- 57:53Michael Kennedy: Hood, you all are using that for basically increasing the startup time,
- 57:57Michael Kennedy: the cold start time.
- 57:58Hood Chatham: We want it.
- 57:59Hood Chatham: We want it to go.
- 57:59Michael Kennedy: Sorry, you're right.
- 58:01Michael Kennedy: Increasing the speed,
- 58:03Michael Kennedy: decreasing the time.
- 58:04Michael Kennedy: Yes, I blended those together and that doesn't work.
- 58:06Michael Kennedy: So just that's part of the mix,
- 58:08Michael Kennedy: right?
- 58:09Hood Chatham: That's absolutely right.
- 58:10Hood Chatham: It's to not do that startup stuff again.
- 58:13Michael Kennedy: Yeah, awesome.
- 58:14Michael Kennedy: All right, final thought.
- 58:15Michael Kennedy: I'll give you all a chance to give a quick shout out to listeners who are like,
- 58:19Michael Kennedy: huh,
- 58:19Michael Kennedy: this is interesting.
- 58:21Michael Kennedy: What do I do now?
- 58:22Michael Kennedy: Dominic,
- 58:22Michael Kennedy: you're first.
- 58:24Dominik Picheta: Well,
- 58:24Dominik Picheta: I was just going to say,
- 58:25Dominik Picheta: actually,
- 58:27Dominik Picheta: I think the best thing for workers is IO-bound applications.
- 58:31Dominik Picheta: if you have something that's like pushing a lot of bytes,
- 58:34Dominik Picheta: isn't doing a lot of CPU with them,
- 58:36Dominik Picheta: then give it a try.
- 58:38Dominik Picheta: I think you'll be surprised how far you can go how many users you can handle
- 58:41Dominik Picheta: even on the free tier.
- 58:43Dominik Picheta: And yeah, just check it out type in Python workers into Google and give it a
- 58:47Dominik Picheta: try.
- 58:48Gyeongjae Choi: Well,
- 58:48Gyeongjae Choi: yeah,
- 58:48Gyeongjae Choi: I also say just give it a try.
- 58:51Gyeongjae Choi: Because I'm already running a lot of my hobby
- 58:53Gyeongjae Choi: applications in Python workers.
- 58:55Gyeongjae Choi: It's working really well.
- 58:57Gyeongjae Choi: So please go give it a try.
- 59:00Gyeongjae Choi: If
- 59:01Gyeongjae Choi: let us know in our Discord and we'll exit.
- 59:03Hood Chatham: And I just want to advertise to anyone out there
- 59:06Hood Chatham: that WebAssembly is like a really cool ecosystem.
- 59:09Hood Chatham: There's a lot of missing pieces
- 59:10Hood Chatham: in terms of like fundamental computing.
- 59:12Hood Chatham: So if you like operating systems,
- 59:14Hood Chatham: if you want to think about like how LibC works
- 59:18Hood Chatham: or,
- 59:18Hood Chatham: you know,
- 59:19Hood Chatham: low level details,
- 59:21Hood Chatham: and,
- 59:22Hood Chatham: you know, you feel like Linux works too well
- 59:25Hood Chatham: for you to get into,
- 59:26Hood Chatham: then like I think WebAssembly is a really great space
- 59:28Hood Chatham: because a lot more of that stuff is just
- 59:30Hood Chatham: I think no one has ever even tried to make it work.
- 59:33Hood Chatham: There's not that much effort.
- 59:35Hood Chatham: The total number of people working on it is quite small.
- 59:37Hood Chatham: So there's lots of open niches.
- 59:39Hood Chatham: And if you find something that you wish worked that doesn't work,
- 59:42Hood Chatham: you can just sort of wedge yourself in there and fix things.
- 59:45Hood Chatham: So I think it's a great space.
- 59:47Michael Kennedy: Excellent.
- 59:48Michael Kennedy: All right.
- 59:48Michael Kennedy: Thank you all for being on the show.
- 59:49Michael Kennedy: I learned a lot.
- 59:50Michael Kennedy: I didn't point out at the beginning,
- 59:52Michael Kennedy: I should have,
- 59:52Michael Kennedy: that I'm a complete newbie at all this edge worker stuff.
- 59:55Michael Kennedy: So it was really interesting to get a look into it.
- 59:58Michael Kennedy: And it's awesome to see it come into the Python space.
- 1:00:00Michael Kennedy: See you all later.
- 1:00:01Hood Chatham: Thank you.
- 1:00:02Hood Chatham: Thank you.
- 1:00:04Michael Kennedy: This has been another episode of Talk Python To Me.
- 1:00:07Michael Kennedy: Thank you to our sponsors.
- 1:00:07Michael Kennedy: Be sure to check out what they're offering.
- 1:00:09Michael Kennedy: It really helps support the show.
- 1:00:11Michael Kennedy: Tomorrow,
- 1:00:12Michael Kennedy: Wednesday,
- 1:00:12Michael Kennedy: November 4th,
- 1:00:13Michael Kennedy: we're having our first tech meetup,
- 1:00:16Michael Kennedy: our live tech event as part of Talk Python membership.
- 1:00:19Michael Kennedy: If you're not yet a member,
- 1:00:20Michael Kennedy: well,
- 1:00:21Michael Kennedy: join up and support the show
- 1:00:22Michael Kennedy: and get an awesome community and experience to boot.
- 1:00:26Michael Kennedy: Just visit talkpython.fm,
- 1:00:27Michael Kennedy: Click membership in the nav bar and you'll be off to the races.
- 1:00:31Michael Kennedy: If you are a member,
- 1:00:32Michael Kennedy: we'll be talking about Talk Python in production and some really wild new ideas that I'm exploring.
- 1:00:38Michael Kennedy: I think you will find both fascinating and actually really practical,
- 1:00:42Michael Kennedy: but no one's doing it.
- 1:00:43Michael Kennedy: So join me on Wednesday, November 4th.
- 1:00:44Michael Kennedy: And if you're listening to this after and thinking, Michael,
- 1:00:46Michael Kennedy: why did you just put this in here?
- 1:00:48Michael Kennedy: Nobody can listen to it because most people listen to after.
- 1:00:51Michael Kennedy: These tech meetups come with recordings.
- 1:00:53Michael Kennedy: Just visit talkpython.fm,
- 1:00:54Michael Kennedy: click on membership,
- 1:00:55Michael Kennedy: and then browse past member meetups and you'll be able to get it.
- 1:00:58Michael Kennedy: So hopefully either you can join live or you can join afterwards.
- 1:01:01Michael Kennedy: Become a member,
- 1:01:02Michael Kennedy: support the show,
- 1:01:03Michael Kennedy: join the event.
- 1:01:04Michael Kennedy: If you or your team needs to learn Python,
- 1:01:06Michael Kennedy: we have over 270 hours of beginner and advanced courses
- 1:01:10Michael Kennedy: on topics ranging from complete beginners to async code,
- 1:01:13Michael Kennedy: Flask,
- 1:01:14Michael Kennedy: Django,
- 1:01:14Michael Kennedy: HTMX, and even LLMs.
- 1:01:16Michael Kennedy: Best of all,
- 1:01:17Michael Kennedy: there's no subscription in sight.
- 1:01:19Michael Kennedy: Browse the catalog at talkpython.fm.
- 1:01:22Michael Kennedy: And if you're not already subscribed to the show
- 1:01:24Michael Kennedy: on your favorite podcast player,
- 1:01:25Michael Kennedy: what are you waiting for?
- 1:01:27Michael Kennedy: just search for Python in your podcast player.
- 1:01:29Michael Kennedy: We should be right at the top.
- 1:01:30Michael Kennedy: If you enjoyed that geeky rap song,
- 1:01:32Michael Kennedy: you can download the full track.
- 1:01:33Michael Kennedy: The link is actually in your podcast player share notes.
- 1:01:36Michael Kennedy: This is your host,
- 1:01:37Michael Kennedy: Michael Kennedy.
- 1:01:38Michael Kennedy: Thank you so much for listening.
- 1:01:39Michael Kennedy: I really appreciate it.
- 1:01:40Michael Kennedy: I'll see you next time.
- 1:01:52Michael Kennedy: I'm out.