[Weekend Drop] Temporal - Not so Temporary (with Jaden Baptista)

Download MP3
My conversation with Jaden Baptista introducing him to Temporal.
Video version on youtube: https://www.youtube.com/watch?v=ErO9Ujccwds

My conversation with Jaden Baptista introducing him to Temporal.

Transcript

[00:00:00] swyx: Hey everyone is Swyx. I've been gone for the past couple of days and you may or may not be wondering what's happened. I basically got a cold and at this conference, it's actually nice to have a conference cold. I guess, because that means that things are going back to normal, even the, not so great stuff about being meeting back in person. 

[00:00:22] But I have a cold and I did not feel great. And I think gets COVID. But anyway, I decided to take a little bit of a break, but I also, I'm not sure if you know, but the weekday topics are all done on the same day. And I tried to do this pattern of batching things in weekly themes and this week's theme. 

[00:00:43] Basically it was poorly chosen. I thought that I had enough to do some, some stuff on basically the how technologies get adopted or get their traction. But I just didn't I ended up not liking any of the other episodes or any other podcasts that I shortlisted for that particular topic. So I just ran out and I just didn't feel inspired. 

[00:01:06] I felt trapped in the format and didn't really know what to do with it. So I ended up not doing anything. I also had other work to catch up on, on top of the conference stuff. So that was all in my head recently. And in general, and wondering whether or not I'm going in the right direction. So if you do that, And I really am grateful. 

[00:01:26] Checking out this podcast, because it's like a weird experiment with no particular theme or direction apart from cause it's stuff that I like. If you are, if you have a strong opinion and if you particularly think that there's some ideas that I should just pursue further and you're just mad at me for not doing. 

[00:01:42] Now's the time to tell me, because I'm also a little bit direction as to where this podcast could go. That's it? I do think that there's a strong thesis for exploring or having a central place for exploring ideas. I am personally interested in and recent dictating my podcast appearances on other people's podcasts to my own feed. 

[00:02:03] So people who are interested in what I do can follow up directly. So here's a conversation that I had with Jen Battista on Twitter spaces that was recorded. And it's about Tim Poro. So this is the first of maybe. Three podcasts that I did in the last month or so. So I'll be dripping them out over the weekends the next couple of weeks. 

[00:02:23] And we'll see, we'll see where this goes. I want to get back more into writing. I still have hopes of spinning out my YouTube more seriously, but I think the creative journey. The part-time creative journey of these, where I have a day job and that should take priority over the other side of stuff. 

[00:02:42] I do dictates the format of the things that I can take on. So, so far the podcast thing has been really great. I actually have a lot, a long backlog of things, which I selected for sure. They just don't fit in any, any particular theme. I think that theme is really nice when I can do it. And just, maybe you don't have enough backlog to do it just yet, so maybe I might go back to not having themes anyway. 

[00:03:06] So here's my conversation with Jane and review stuff. Well, thank you for  

[00:03:09] Jaden Baptista: joining me today, Sean. I really appreciate you taking the time are you doing today?  

[00:03:14] swyx: Very good. I'm very entertained by your Twitch title called temporal nutso temporary. Very interesting.  

[00:03:22] Jaden Baptista: Oh yeah. I was trying to come up with like a S a stupid clever name for the Twitch streams, despite them not really helping out with what the stream is usually ends up being about. 

[00:03:34] We tend to wander from topic to time.  

[00:03:37] swyx: Sure sure. Yeah. Thanks for having me in a happy to chat to portal. Awesome.  

[00:03:42] Jaden Baptista: Yeah. Well, let me ask you just the first quick question. You know, every, every big program that we all talk about w we really enjoy using was, was built to solve a problem, some sort of problem. 

[00:03:55] What problem was tempura both too soon, but what was the point of building it in the first.  

[00:03:59] swyx: So, to be clear, I did not build it. Who did exactly it was built to solve the problem of The abstract problem that the category of problem, this is called is workflows anything long running that needs to take anything more than a simple request response cycle, a request response will be just like, you know, you're paying a serverless function. 

[00:04:20] It gets back to you in, let's say 300 milliseconds, right? That's a typical cycle, but sometimes you need to do long running work. Typically I would think this is something like video projects. So, if you kick off a job, it takes like four hours to transfer code audio file. But actually it is both longer and shorter than that. 

[00:04:40] So, this is actually a topic of my recent blog posts. Because even if you, so Dropbox, so box is one of our users and they use us for file transfers and normally a file transfer just feels instantaneous until you try to transfer a million files. Right. They just change that. A thousand of them. 

[00:04:58] So you need a solution that scales pretty nicely from like a single transfer that should feel instantaneous to you know, something that's gonna take a while. Cause, cause it's just distributed across a lot of systems and you need it to be perfect or you lose data. And if your box you cannot lose data the other super long running task is why does anything have to ever end? 

[00:05:17] So what if you could just model the entire journey of your customer from. Like their first contact with you to the time that they unsubscribe. And that is a single entity that you just interact with. So it then becomes easy to say things like, okay, on their seventh visit, send them a coupon. Every month charged them based on their, you know, their, their usage or the billing. 

[00:05:38] And all of this is encapsulated in a single function. So  

[00:05:43] Jaden Baptista: yeah.  
 
[00:05:44] swyx: Yeah, because because we have an internal basically, so. Solves, it brings together a database, a scheduler some networking, some search capability and it, and it does. And then it uses, it offers you an SDK, so you can write it in idiomatic language. 

[00:06:01] The, there, this is not a new problem. Our founders have been working on this for something like 20 years. The tech leads for Amazon SQS. And then in simple workflow Azure doable functions and then when they arrived at Uber, they, they built the initial version of temporal where it now power is like, Something like 400 use cases at Uber mostly driver onboarding marketing which they call communications or something like that. 

[00:06:25] It's just like, whenever you do something that is so fundamentally asynchronous, you could use it for a lot of things. And it tends to grow that way. So, you know, it was open source that Uber and then it was adopted by other companies like Coinbase. Airbnb Stripe and then once it lands in a, in a company, it just starts growing from there. 

[00:06:43] And it's just a, it's just a really interesting thing to watch when you solve a problem as well. You get a really strong developer adoption and that's, that's one of the reasons I joined it, just because you know, a bit about my, my personal history, like I typically have been on the front end and serverless side working at another fire in AWS. 

[00:07:00] But the thing I think that sort of doesn't do well, is anything long running. And the more time you spend studying developer businesses, the more time you understand that, actually, a lot of the money, a lot of value is in the long running stuff. So we've got to do this. And we got to do this and we're going to make it easy to do asynchronous stuff. 

[00:07:22] And when I say easy, I mean, easy to do production grid services. So, things like retries failures, timeouts, heartbeats you know, when, when systems go down do you have an easy way to. Bring it back up again. If systems go wrong, do you have a way to have everything tracked and audited? Do you have everything properly tracks so you can go back and see what happens, right? 

[00:07:43] Are you, is your as your monitoring practices? Correct. And then finally, When you need to scale when, when stuff is going really, really well, can you just throw more machines at it? Sometimes if you have the wrong system design, you can not, because you've just, you've just assume a single dependency somewhere. 

[00:07:57] So every part of your system needs to be horizontally, scalable, completely fault tolerant. And that's what tomorrow brings.  

[00:08:03] Jaden Baptista: Awesome. I mean, I, I'm going to be going to be totally honest with you. I, before interacting with you for the first time, never heard of temper. But I ran into this problem a lot. 

[00:08:15] When I got first into development, I wanted to schedule things and kind of like model a workflow around that schedule instead of the other way around. And we, we ended up switching to like a weird monolithic backend just to get that done with the first projects as a developer. And it was miserable. I hated it. 

[00:08:36] That's actually why I got into the jam sag in the first place. Cause I hated those monolithic backs. So much that we tried to use this, solve this problem. But I'm curious, one thing that we ran into and by the way, anybody who's listening, if you have questions for Sean about temporal feel free to ask it to be a speaker or in the chat in Twitch. 

[00:08:52] I'm watching both of them, but my, my first question I've run into situations where that schedule is not set right. So, you know, perhaps with your Uber onboarding flow, maybe there's a set set of steps that you've, you've got that you're going to use to onboard this user, but that might change on a lot of different platforms. 

[00:09:15] Like, for example, the one I was working on we didn't know what email we would be sending a month down the line because it completely depends on what happened in the meantime. How, how would temporal handle something like that? Is there built in flexibility if the schedule were to change?  

[00:09:32] swyx: Oh, migrations. 

[00:09:33] Yeah. Yeah, absolutely. In fact that's one of the key selling points. So they're the three select, the three key selling points. I'll go in reverse order. Cause that's, that's where we happen to be starting. One of the key selling points is that you want to model workflows as code and that's pretty much. 

[00:09:47] We're one of the only few workflow engines that do that. And by the way, there are others. That's why, that's why we do have to have our talking points straight. So when you migrate, you need migration, tooling, and you need tests, right. To move with confidence. Would it surprise you to learn that most people, when they set up their asynchronous workflows have no idea. 

[00:10:06] They, they just they're there. They're happy that it works. That's about it. And then when it, when they moved,  

[00:10:14] Jaden Baptista: sorry,  
 
[00:10:16] swyx: when they, when they made changes, they they're just like, okay, should work now. You know, and then, and that's about it. That's the state of the industry is pretty sad. But I, I. Once you have the right abstraction, things just really lock into place. 

[00:10:29] And being the main thing about tests is that you have to be able to mock out every single possible source of determinism in time. And that's one of the reasons why we're called to Poro. We help you to handle time. And one of the pictures actually for the front end, Because we're going to launch our JavaScript SDK in October. 

[00:10:47] That's off the record. I, I, I didn't, I did not promise that like, we are components for time, right? So we help you mock out time. We help you test time. We help you structure asynchronous workflows in the same sort of component ties, logic that you might with a reactor view of whatever components. 

[00:11:03] And I think that that pitch. I'm testing it still and I'm still working on it. That pitch would probably make sense to, to front end developers who are like, yeah. Okay. You know, I have rendering solved, but like what happens to like all the asynchronous stuff? I'm still a black box  

[00:11:21] Jaden Baptista: that that's kind of the, the situation that, that I ran into too. 

[00:11:25] Like I got all of them. That'd be awesome.  

[00:11:27] swyx: What was, what was the tech stack? What did you use?  

[00:11:30] Jaden Baptista: So at first we were trying to go with like a, a sort of like almost the JAMstack kind of thing. It was very bare bones. This is when I was first getting into web development and I went all gung-ho on this project with the classmate of mine that did not turn out well, but it was, it was basically just a simple JAMstack site actually hosted on Heroku. 

[00:11:50] Cause we didn't know any better. And we ended up trying to solve like the problem. Of sending messages back and forth. And then depending on the content of those messages doing something like a month later, like sending an email with a recap of some of those messages, or if there were no messages sent and do something else, we ended up actually having to create a PHP backend, like a second backup. 

[00:12:17] And then a third one later in Python. So we actually had three backends for this problem because the only tools that we could find were all over the place like I said, we didn't know what we were doing, but we were, we're all over the place trying to solve this problem. And so talking to you, it's very fascinating to me that somebody had this problem 20 years ago and decided to fix it. 

[00:12:37] Yeah, 
 
[00:12:41] swyx: there's a weird, there's an interesting pipeline, I think. And you know, this is a more general career reflect. The pipeline is, is as such you work on a large web-scale company early on in your career. You face all these problems at scale early on, and then you, you leave that company and then you start the problem. 

[00:12:59] You start a company to solve that problem for everyone else. Right. It's kind of that, that's a lot of the the Google too. There's there's a lot of ex Googlers. So, I think now we're starting to see the emergence of the Uber and Lyft mafia who solve a lot of problems that we were in Lyft. And now they're just emerging as like, you know, independent startups get hub, you know, spawn kind of scale. 

[00:13:23] Lyft respons there's, there's a bunch of, there's a bunch of them. Twitter  

[00:13:26] Jaden Baptista: has done that a lot too people who worked at Twitter and then spun off and did something else, like fauna comes up.  

[00:13:33] swyx: Yes. Yes. So, it's interesting. So, so this is, you know, this is an export of Amazon, Microsoft and Uber. 

[00:13:39] Cause that's the path that, or, 

[00:13:44] yeah. So, so, I want to give you, yeah. So that's the other thing, right? I want to, I want to really impress upon you this point, which is that you want to, so the, the, the first, the first talking point was, was worthless. Second talking point is about orchestration that you want a single engine that handles retries, timeouts, heartbeats, all that stuff. 

[00:14:05] And. Anytime you call an API, it actually has a, has a probability of failure, which is like you're calling you're you're crossing network boundaries. You were you know, running into rate limits, whatever, whatever that is. Have you handled it correctly? And that error handling is something that you don't typically think about. 

[00:14:22] Cause when you code you're typically coding. But having it properly. Exactly. And especially if you think about this in a large company setting you have service call service, a calling service B it's called service C each of these services cannot trust the others essentially. Right? Each of each other, every time you cross the service boundary, you're essentially entering untrusted territory in some sense of the word. 

[00:14:43] So in order to ensure the reliability of your service or that a response very well, you start building up defenses against each other service. So around the boundaries of your service, you're building in like, okay, like, you know, if, if this call failed, like wait five minutes and we try again, make them and that kind of thing. 

[00:14:59] And if you run a large enough company, you realize that every team is doing this and. In their own way. And they're all solving problems, incident by incident like this, you don't have to sit down and. Design this from scratch, like you run into an incident and you're like, oh, okay. Yeah, we better put in some production hardening on this thing. 

[00:15:16] Right. And they're all provisioning infrastructure. It's not just about duplication of code. They're also provisioning infrastructure, right? Like you went from running. Just one little machine somewhere toward to like, okay, now I need a database because I need to store what requests I've made what tracking everything. 

[00:15:32] Now I need a scheduler, like a Cron job to, to retry things. And you just like build up a lot of. And so what orchestration engines do is they provide reliability on rails. You have a CTO that says, okay, I have a central platform team that does this. Everyone just like use this platform and we'll scale it for you. 

[00:15:50] Now, you never have to think about the production hardening between your system boundaries. Again. You can just reliably. Things and, and they'll behave properly and feel according to a, a company-wide standard that we can predict and examine this also centralizes failures. So, so in other words, like, if you, if you could like one of the fun jokes about microservices is that they turn every outage into a murderer. 

[00:16:13] Like who who's at fault. Right. You know, then you go through the trace and then you, you, you, that's the  

[00:16:18] Jaden Baptista: one, the one I've heard is a murder mystery where you're both the detective and the murderer.  

[00:16:22] swyx: Exactly, exactly. The way to solve it is to have a global view of, of. What happens? So, so yeah, I mean, there's, there's that, which, which I think is, is pretty under appreciated by a lot of people. 

[00:16:31] And I think it's, it's very core to what we do, but also what a lot of other people do. So we're not the only workflow engine out there. You can try in other, in different contexts Amazon step functions Apache airflow and there's a bunch of others. I don't have to go through all of them. 

[00:16:47] Jaden Baptista: No, there's a really long list and I've looked into a lot of these, cause like I said, I've seen this problem a lot. And I'm just wondering a lot of those other ones, there was, there was a ton of setup work with those other ones. Like I've tried step functions and I, I actually didn't even get to the point of creating the step function because before that there was so much. 

[00:17:11] What's the word I'm looking for. Administrative stuff, just to get to that point is how much do you have to do to get temporal working for a really small project? Because you said it will scale with you as, as you start growing bigger. So what, what's the, the investment of time that you'd have to put into it, like a hobby project  

[00:17:33] swyx: That's an interesting question for us right now. 

[00:17:35] It depends on your skill with dev ops, essentially. 

[00:17:37] So  
 
[00:17:39] Jaden Baptista: is going to help out a lot with this.  

[00:17:41] swyx: We still need to do a lot of work. Maybe not coming. We still, we still need to do a lot of work on that. So essentially right now it's a, it's a single go binary. That is that's that runs four services and those four services can be scaled independently. 

[00:17:55] You will also need a persistence layer. So we support Cassandra my sequel. And then optionally, we also support visibility search. So, using elastic search. So if you want to run all of that you can, we're not, we're not opinionated on how you deploy that. You can try to run it on a single box but also you probably wants to have like a managed database layer. 

[00:18:15] So you don't, you don't have. Handle the database stuff yourself. But it is very easy to get up and running with our Docker proposed file. So that's the way that we typically get people to get started. If you run Kubernetes, we have a helm chart that you can reference. We definitely don't you'll probably want to customize a home in some way. 

[00:18:31] People have all sorts of other container orchestration and stuff that they might want to use. But that is essentially the story right now. What it will be in the future is that we will have a single binary that you can one-click deploy on Heroku. Right. 

[00:18:43] That's obviously the best developer experience. It's just not ironically something that we're optimizing for right now, because right now a lot of our users already have that knowledge. So we're better off spending time working on other stuff. So, and SDK's awesome.  

[00:19:00] Jaden Baptista: Cool. 
 
[00:19:00] So other than the JavaScript SDK, that we didn't really mention earlier what other things are in the roadmap for your temporal and by the way, anybody else who has any questions in case you just came in? So feel free to request to be a speaker and a astronomic question. But yeah, what is on your roadmap for them? 

[00:19:17] A little bit  

[00:19:18] swyx: we I've been forbidden from publicly discussing them. So yeah, it's just the thing. Like we we look bad if we let our users down by saying we're working on something and then it doesn't pan out for whatever reason. So we just don't do that. I will say that our JavaScript and Python SDKs are highly, highly, highly in demand. 

[00:19:35] So, you know, Make your own conclusions there? I am also, maybe  

[00:19:41] Jaden Baptista: I was thinking more like your priorities for like, not necessarily like a specific feature or anything, but like, what are you. Planning to focus on .  

[00:19:52] swyx: Yeah, yeah, sure. Appreciate that question. Yeah, so, I mean, this is, this is a part of that, like getting us in front of the largest developer populations in the world is very important. 

[00:20:01] Our web UI is under a major rewrite right now. And that, that will hopefully. Help us be more intuitive, especially to people who are new to the system. always have this view that the docs or docs are. Dogs are a last resort. If, if at all possible use your UI to teach people as they go, instead of having to read a wall of docs. 

[00:20:21] And then, and then finally, so we're not generally available yet. We're just in private design partnerships with people. So we have, you know, some, some very, very well-known customers, some of them publicly listed and yeah, and, and we're basically learning how to scale. Service and scale a multitenant version of this, right? 

[00:20:39] It's the, you have to think about the origins of this company was an open source project running solely within Uber. So it never really had to think about You know, often organizations and like security and billing and all that. So we have to build out all of that. We have a list of about 30 things that we need to build before we are a production ready cloud. 

[00:20:58] But it is a very different startup from other forms of startup, because it seems like this company is like, it there's no risk of mismatch in product market fit. Like we already there in terms of. Right. You're already there. It, I, there, the reason I hesitate to say that we have product market fit is because we don't actually have a full product yet. 

[00:21:22] Right. Like, we need to build that product. And then we need to be able to repeatedly sell it either from enterprise sales or through a bottoms up, like just developers, trying stuff out. And yeah, there's a long way to get before we go there. But we have plenty of open source developers who are open-source users who are happy. 

[00:21:38] Build out. You know, we're looking forward to our production hosted cloud.  

[00:21:43] Jaden Baptista: Awesome.  
 
[00:21:44] Well, thank you for joining me, Sean today. I really appreciate you. You teach me a little bit about this because I've been looking to try and figure out what temporal is about so that I can potentially be using it in the future. 

[00:21:54] Once it fully launched. Yeah.  

[00:22:00] swyx: You hear more stuff from me about it? There's a lot more, I haven't covered. We use event sourcing. So the way that we do reliability is that events are the source of truth. And we are able to resume from any downtime because of that, right there. That's just a fundamentally opinionated architecture, which I think a lot of people struggle with. 

[00:22:15] Like they eventually find it, but then they're like, oh, I have like five years of legacy work that I had to throw away now. Right. Yeah. I'll you hear more from me about, about this, for sure, but thanks for taking the time to, to check it out. Cool.  

[00:22:28] Jaden Baptista: Well, maybe you can just, while we're finishing up here tell us a little bit about your social media and I have one more bonus question. 

[00:22:37] swyx: Can you, can you help me here? Like what, what specifically about social media follow him on Twitter at, oh yeah. Yeah. It's Swyx, it's my English and Chinese initials. SWIX but also, you know, just. Temporal, we have a mailing list or we're doing a meet up next week. A lot of people, you know, we'll have one of our users presenting airbikes and we're just trying to grow our community, you know, and, and help people solve their problems. 

[00:23:00] We're still cool. 30. Yeah. I mean, I'm pretty excited.  

[00:23:04] Jaden Baptista: Awesome. Well, I have one little bonus question for you. I didn't let you know about beforehand, but I've been asking all of our interviewees, thus what is one tool that you use all the time that you just could not live with? Put me on the spot here. 

[00:23:15] swyx: Man, there's Honestly, simple notes. Very good. Oh yeah. Just the notes and notes app has to be reliable offline first and multi-platform I know there are other notes I have out there. Simple notes free. It's backed by WordPress. And it's very reliable and it just does notes, right? It doesn't do any, any rich media. 

[00:23:37] So you don't like, I know, I know notions the new hotness and all that, but like anything that slows it down, like notion we'll choose fancy new feature over speed and reliability. And I value speed and reliability. So I, yeah, I shout out for simple notes. I think everyone should have at least as reliable a note taking. 

[00:23:56] Jaden Baptista: Cool. Cool. I'll have to go. I'll have to go down and download that. Then I've been using notion forever. So anyway,  

[00:24:03] swyx: it's like, like anytime you search it, it's like that spinner just like ticks you off. Like anytime you accidentally or something on the mobile app, it takes you off. Like just stuff like that. 

[00:24:13] Just don't do it around  

[00:24:15] Jaden Baptista: and around and around. But thank you for introducing me to that. I'm going to go download that right now, actually. Well, thank you for joining me today, Sean. I really appreciate you. Teach me all about them for us. I'd love to have you back in the, in the coming weeks to tell us a little bit more about progress once those SDKs are released. 

[00:24:31] So let me know, but in the meantime maybe we should cap it off there. Thank you, Sean. All  

[00:24:37] swyx: right. Thanks everyone.
[Weekend Drop] Temporal - Not so Temporary (with Jaden Baptista)
Broadcast by