Podcast Fights, SST Astro API Issues, and Being Wired for Bad Things

Speaker 1:

Wait, can you not hear me?

Speaker 2:

No, I'm just messing with you. Oh, okay.

Speaker 1:

Oh, man. That was stressful. Number 47. There's nothing special about the number 47. There's nothing I can say about it.

Speaker 1:

It's just a number.

Speaker 2:

Did you see that we have competition? We have competition. Did you see that we have competition?

Speaker 1:

What are talking about competition? In podcasting?

Speaker 2:

We've got yeah.

Speaker 1:

There are a lot of podcast decks. I don't know if you realize this. It's a it's a pretty popular medium. Yeah. I didn't know about other podcasts.

Speaker 1:

Specifically?

Speaker 2:

Thought we invented podcasts.

Speaker 1:

Is there another Adam and Dax?

Speaker 2:

Well, Aaron Francis, started one with someone. And it just it's similar. It just it's just two people that are friends that are talking, I think. I I didn't listen to their first episode.

Speaker 1:

Oh, well, two friends that are talking. I mean, that they're in tech, so I I guess that makes sense. I'm assuming it's tech.

Speaker 2:

In tech. I think they they had a good name. I think it was called Mostly Technical or something.

Speaker 1:

That sounds like our podcast, kind of.

Speaker 2:

I think we're more like sometimes technical.

Speaker 1:

Well, yeah. Sometimes accidentally technical.

Speaker 2:

Yeah. When we have to be.

Speaker 1:

I wouldn't say mostly.

Speaker 2:

Mostlytechnical.com.

Speaker 1:

Who's this friend? I'm Aaron's friend. Apparently not. Podcast.

Speaker 2:

Podcast level friends. Ian Landsman.

Speaker 1:

Ian Landsman. I've not heard the name.

Speaker 2:

I think it's another Laravel person.

Speaker 1:

Oh, Laravel. Oh, okay. I'm a big Laravel fan. I don't know if you know this about me. I was just recently in a GitHub article about it.

Speaker 2:

Were you really? What is hang on. What is a GitHub article?

Speaker 1:

Or, like, the Gitme GitHub ReadMe. You know what I'm talking about? It's like let's see. It's like a blog that they do.

Speaker 2:

How are you in it? What do they say?

Speaker 1:

They interviewed me because I'm a I'm a Laravel person. I don't know what to tell you.

Speaker 2:

Are you kidding me?

Speaker 1:

No. They wanted someone with an outside perspective, which I have.

Speaker 2:

Okay. I was gonna say, like, you're definitely

Speaker 1:

a scammer

Speaker 2:

if you got into

Speaker 1:

Oh, come on. I'm not a scammer. I've been very upfront, but I've not actually used it. I can't find their blog. Where is their blog?

Speaker 1:

Readme? No. The Readme project.

Speaker 2:

It's funny because everyone uses Transistor. So, we all have the same, like, podcast page layout design, everything looks the same. So it just feels like a direct like clone but like obviously That's is art design but yeah, it's funny.

Speaker 1:

I wonder I wonder if they thought about our podcast when they started this Mostly Technical Podcast because we I mean, that is kind of like what we are. We are kind of mostly technical. Yeah. I mean, we're technical people. We just don't like talk about much technical stuff, I guess.

Speaker 1:

Yeah. So if they're mostly technical, oh, I gotta listen to it now. Because if they're mostly technical, then it will be pretty different.

Speaker 2:

We started off more technical and then we just ran Yeah. Out of We did.

Speaker 1:

We just we got tired of talking about Next. Js and whatever else.

Speaker 2:

Yeah. Exactly. Yeah. We'll see. We'll see.

Speaker 2:

So it's it's competition.

Speaker 1:

I like their logo. That's a cool logo.

Speaker 2:

We gotta take them down. We gotta we gotta

Speaker 1:

sabotage them. That's such a Dax, stop it. That's such a, like, scarcity mindset. You gotta have an abundance mindset. We're all here just trying to grow the space.

Speaker 1:

That's what they say. Grow the space.

Speaker 2:

But which one sounds more fun? Does your version of the world sound more fun, or does my version of the world sound more fun?

Speaker 1:

I mean, it does sound more fun, but it also sounds just more hostile and more anxiety inducing. But fun too. I'll give you the fun. Why are we wired as humans? Why are we so wired for the negative?

Speaker 1:

Why do we thrive on, like, bad things? It's like the whole reason the Internet economy works. A com a comedy?

Speaker 2:

A comedy.

Speaker 1:

It's the reason the economy works.

Speaker 2:

Mostly technical. Are we wired for bad things? I think I mean, this place where I think about this is when something new comes out that could potentially work. You have a lot of people that will bet that it doesn't work.

Speaker 1:

Yeah.

Speaker 2:

And oftentimes they're right, but I always feel like it's not hard to bet that something would not work because most things don't work. It's like a lot harder to bet that it would work.

Speaker 1:

That it will work? What's something you bet will work? Sorry, that's a side note.

Speaker 2:

Everything I do.

Speaker 1:

Everything you do specifically.

Speaker 2:

Everything I do. Oh, I have to think that way. Otherwise, I wouldn't be

Speaker 1:

able to Yeah. Yeah. You gotta get you out of bed every day.

Speaker 2:

Yeah. But I think I think people feel like like they have good predictive ability because they like they're like, oh, knew that wouldn't work and it didn't. Yeah. Most things don't work so you're just playing the odds. It's not really like any insight.

Speaker 2:

Yeah. When someone bets that something will work and most people think it won't work and then it does work, that's when I'm like, oh, that like is like a special moment because I was Oh,

Speaker 1:

okay. I'm just gonna start betting everything will work Exactly. So that I can have one of those special moments.

Speaker 2:

No one's gonna remember the times you were wrong but they're gonna remember that time that you were When you

Speaker 1:

nailed it. Nostradamus style.

Speaker 2:

Exactly.

Speaker 1:

Wasn't that Nostradamus? Did I make that up? That's a person. Right? That was like a person that predicted a lot of things.

Speaker 2:

I don't know exactly what the origin is, but I got it. I understand the reference. It's like someone like a prophecy person.

Speaker 1:

I think it was a person who, like, nailed a bunch of stuff. I gotta look it up now. I remember as a kid them talking about all the things that he predicted that came true.

Speaker 2:

That's a think

Speaker 1:

crazy if you're vague enough, it is a crazy name, Nostradamus.

Speaker 2:

It's like a storybook name.

Speaker 1:

Yeah. It's true. He was probably from a long time ago when people had those names.

Speaker 2:

He predicted that one day.

Speaker 1:

Yeah. If you're vague enough, like, I don't know, you can make a prediction that's pretty meaningless but can be interpreted as true later. I don't have an example. I'm terrible at examples and analogies and anything like that. But I bet there's some good ones if you wanna think of one.

Speaker 1:

That'd be great.

Speaker 2:

Yeah. I've seen this, one of my favorite concepts is this scam that people can do where they like first develop a mailing list of like, I don't know, 10,000 people, whatever it is. And on some pivotal moment, let's say like an earnings report or something like involving like a moment for a publicly traded company, you send half the list that they're gonna fail to meet expectations by puts or the other other side, other half you tell them to buy calls. And obviously one half thinks you're lying, well, thinks that you were wrong, the other half thinks you're right. And you do this like three or four times and you end up with like a list of a small group of people, But from their point of view, you are just like a genius that has predicted every single thing correctly.

Speaker 2:

And at that point, you sell them a course or like

Speaker 1:

So you have 5,000 people now, like half the people that Yeah. That think you're a genius. That's that's pretty smart.

Speaker 2:

Yeah. And you do, like, once or twice, 2,500, and again, like, then you end up with somewhere around a thousand and and that's a lot of people that think you're a genius. So Yeah. It all takes.

Speaker 1:

Wait. Does that is the math work there? So cut it down to 5,000 by getting it wrong and right. Like, you got right for half of them. Yeah.

Speaker 1:

And then you split that one as 2,500. Okay. Yeah. So every time you're you're there's people who think you got like three or four things right by the end.

Speaker 2:

Yeah. As long as you're picking like binary situations that are yes, no, then, like, half the people think you're you were right.

Speaker 1:

It could also just be like sports, like,

Speaker 2:

you bet that you tell them, like, this this team is gonna win or or whatever.

Speaker 1:

Yeah. Okay. I gotta work on my mailing list. By the way, adam dot dev slash nah, I'm just kidding. I don't don't think I have one anymore.

Speaker 2:

That's the only reason I'm building my Twitter following to one day I'm I'm just gonna spend years developing credibility to then one day run this scam on 50,000 people and

Speaker 1:

But it only works in a newsletter. Right? Because you gotta send they can't they can't be up public for it. Yeah.

Speaker 2:

Yeah. Send it privately. That makes sense. I'll DM everyone on Twitter. Yeah.

Speaker 2:

There you go.

Speaker 1:

You probably write an API thing. I don't know.

Speaker 2:

Yeah. Yeah. So great scam, unstoppable.

Speaker 1:

So what I was getting at with the negative thing, like, we're wired for, like, outrage. It's like all the negative emotions are so much stronger. Like, we I mean, that's why social media is the way it is. Right? Because that's what gets so much engagement.

Speaker 1:

We get so fired up over the bad stuff. Right? Like positive emotions don't sell.

Speaker 2:

Yeah. I think so. Because I mean, the thing I said the other day where I feel like knowing how to be happy is a skill. And I guess a lot of people It's a difficult skill and I think what we see is people struggling with that so they like tap into things that don't make them happy. Yeah.

Speaker 2:

That's why I think it it does well because it takes work to like ignore those things to realize, like, okay, long term is gonna make me feel better not to read this thing. Yeah. That's hard.

Speaker 1:

It is.

Speaker 2:

I don't know.

Speaker 1:

It's mostly it's easy if you just don't if you don't use those apps. I don't really use Twitter much anymore or x, and I do find I'm happier. It's like I'm busy. I know once I'm not busy and, like, things calm down, I'll be back on there and I'll be back in the same patterns. But every time I'm out of it, it's like, oh, this isn't actually that hard to not be on it because I feel really great not being on it.

Speaker 1:

Just a lot less, like, thinking about stuff that I would be thinking about.

Speaker 2:

Don't know. That's why it's really good to be busy and that's why I don't think Yeah. I think people fantasize about not having to work and retiring and I'm like, I don't know if gonna like that. I don't know if you're gonna like not having anything to do every single day. I'm very busy right now too and I feel the same way.

Speaker 2:

I feel like I'm in better harmony with everything in my life because I have something plus my time.

Speaker 1:

I do wish I was able to stream. I wish I could stream right now. That would be nice.

Speaker 2:

Technically, you are streaming right now in a way.

Speaker 1:

I mean, yeah, I guess yeah. I'm on your your your yeah. You're Twitch. Oh, I just I thought of something in the middle of something you were saying. I was totally listening.

Speaker 1:

But I thought of you you wanna go to war with this new podcast. Aaron wasn't following me on Twitter. And I noticed this one day, and I it's like this weird I don't know how I ended up on his profile. Was like, wait. Aaron doesn't follow me?

Speaker 1:

And Aaron used to follow me. And I was so outraged, but at the same time, felt I like there's no way he'd just, like, unfollow me and not say anything. Like, we've been in the DMs. We've had calls. Like, I feel like we're pretty close.

Speaker 1:

Not like how close can you be with somebody over the Internet when you haven't really met in person. But, like, in terms of Internet friends, I count him as a dear friend, you know, like a dear Internet friend. And I finally, after a couple glasses of wine one night at the off-site, sent him a DM. I was like, Aaron, why don't you follow me anymore? Like, what's going on?

Speaker 1:

And it was an accident. It was like a total like, just a fluke. He didn't know. And I can I can resonate with that? I actually retweeted something the other day on accident, like, I guess, like, butt dialed All or the time.

Speaker 1:

All the time. And it's like, someone said, like, why did you retweet that? Like, DM me. And I'm like, oh, didn't mean to. It was like some deep reply.

Speaker 2:

Oh my god. I accidentally retweeted, I don't think well, people must have saw it, and no one liked it because it was something like

Speaker 1:

Oh no.

Speaker 2:

I don't remember exactly what it was but it was someone posting so the original tweet was someone posting like a picture from some meetup in San Francisco how it was like just all a bunch of dudes. And someone said something else like as an overreaction, something like kinda maybe like anti women, just something not good. I accidentally retweeted it. And I'm like, oh, man. I really hope nobody saw that.

Speaker 2:

Because I didn't notice till the next day and I was like

Speaker 1:

Yeah. This was the next day for me too. And my mind wasn't mine was innocuous

Speaker 2:

but Yeah. It wasn't really it wasn't direct. It was like but the problem is okay. It was something that was like it was said in a humorous way but it wasn't funny enough. Like, wasn't funny enough to be worth the thing to retweet it so they just sound like salty about something and I like

Speaker 1:

Oh retweeted no.

Speaker 2:

This is literally how works than a retweet. Yeah. And then my other situation is, the CEO of PlanetScale. I started talking to him initially just over over Twitter. Yeah.

Speaker 2:

We had like an initial brief conversation about just some some things about how PlanetScale works and I was like, oh, this is cool. I like him. Like, this is a new relationship I'm into. Then I accidentally DM'd him, just like a butt DM'd him like this really stupid like crypto related thing. Was Wait, like

Speaker 1:

you butt dm'd him actual words and they were about crypto.

Speaker 2:

No. I I sent him I like somehow like

Speaker 1:

Oh, it sent him sent a tweet to him.

Speaker 2:

Yeah. Oh, no. It was something it was like just like the lamest point. Was like it was something so stupid like like crypto needs a GitHub or just just like there's something like this like

Speaker 1:

a lame, like, really

Speaker 2:

lame point. And I sent it to him and then he replied in a really nice way being like, oh, yeah, that is true. And I was like

Speaker 1:

No. I'm like, I think

Speaker 2:

I like found this so interesting that I sent it that I needed to send it to you of all people. And I replied being like, lol, that was a yeah. I don't know if he believed it but That's so funny. I hope in the time since as he got into know me more that he would understand that

Speaker 1:

He'd realize you wouldn't have

Speaker 2:

I wouldn't have Send him send him that.

Speaker 1:

That's awesome. Well, we could just pretend that Aaron really did unfollow me. He did point out to me, like, if he really didn't wanna hear what I had to say, he could mute me and not create a big fuss. So I believe him. It was an accident.

Speaker 2:

I don't believe But

Speaker 1:

we could just pretend. Let's not believe him, you know. They're competing on our podcast. Let's just we're gonna make it a blood feud. And let's just unfollow Aaron right now.

Speaker 2:

He unfollowed you and he started his own podcast. Like,

Speaker 1:

this guy sucks. We can do this so much better.

Speaker 2:

Yeah, exactly. I wouldn't believe him if I were you and I would be Okay. I would start more drama. He probably thought

Speaker 1:

that You heard it, Aaron.

Speaker 2:

He probably thought that the content you were putting in his feed was really bad and negative and bad for the world.

Speaker 1:

Honestly, when I saw he had unfollowed me, was like, checks out. He's really into positivity and I'm really negative. It's kinda kinda made sense despite having a relationship. But, yeah, it never feels good. It never feels good when you notice that somebody unfollowed you.

Speaker 1:

That's the thing that I've noticed in the past. Or just when someone who you feel like you've got a mutual connection to just never does follow you. I've talked about that before. I'm weird about stuff like this. Why am I so weird?

Speaker 2:

This is what I mean, it's I think this is like a great explanation of why it's been good for you to be off of Twitter.

Speaker 1:

Yes. This has been it's been nice because these are the kind of things that I go crazy over.

Speaker 2:

Yeah. I've been enjoying this. I don't know if you saw the stuff I've been doing for the past couple of weeks where I've been

Speaker 1:

posting We these were like, here's a challenge. You're too dumb. You won't figure it out. Let's see let's see you try, dumb dumbs. Sorry, that's how I interpret them.

Speaker 1:

Go ahead. Yeah,

Speaker 2:

That's tell me fairly accurate. Yeah. So I mean, I always complain that there's just never back end discussion on Twitter. So all I get to engage with is front end stuff. And I was like, oh, but I can probably do more than just complain.

Speaker 2:

Like maybe I can just try like talking more about back end stuff. And I think these challenges are good because they're very engaging, like people to transfer like people to discuss and like actually take part as opposed to being just like a one way thing.

Speaker 1:

Almost as engaging as quote tweet this with Sorry.

Speaker 2:

Yeah. So I've just been posting it and they they all come from I basically just pay attention to stuff I'm working on throughout the week and I'll be like Yeah. Oh, that was like a very specific thing I had to do but it's like a generalized problem. Let me like make a generalized version of the challenge and I'll post it. And it's been pretty cool because I've found that they're valuable and that almost no one as as you know, what you said earlier, almost no one gets gets them.

Speaker 2:

I'm not saying that as in like, I went stupid. A little bit. I am a little bit slaying

Speaker 1:

A little bit. High or

Speaker 2:

one stupid. But it it actually shows as valuable because like it's an opportunity for most people to something to take for granted. I I don't know why but like, whatever my career trajectory was, like, it hit these problems like very directly or early on. So I just assumed, okay, everyone just thinks about stuff all the time but I guess it's not the case. And then I occasionally will actually get an answer that's very good and thorough and sometimes I even like learn learn something from it, is which is pretty awesome.

Speaker 2:

So yeah, it's been fun. Of course, it's Twitter, so there's always a way that people will find People will always find a way to be annoying no matter what. And the classic thing is they'll reply being like, this isn't even hard. I'll play the challenge

Speaker 1:

and be like, you just

Speaker 2:

didn't Isn't answer even hard. And of course, they're wrong. They like missed something or like the thing they posted is wrong. Someone the the on the first one, someone replied being like, this isn't even wrong, you just do this. Then someone corrected them being like, oh, you have to consider this thing.

Speaker 2:

They were like, well, it's still not that hard, you just do this. And then they corrected them again believing he misses other thing and they concluded like, oh, it's just like so easy. And I'm like, you literally proved this. You like demonstrated why it was a challenge because it seems straightforward but it's a little bit more complicated than it seems. That's a form of challenge I like.

Speaker 2:

I like when it seems simple but like you start to go into it and you're like, oh, what about this case or about that case? Yeah. But some people just take it at face value.

Speaker 1:

Does it sort of like, I assumed when I saw you posting these things that it was sort of highlighting some of the challenges with the modern web stack that everyone's sort of gone down. Like, does it challenge those things? Does it make it hard? If the only thing you know about back end is, like, Next. Js API routes, is it tough to implement some of these patterns or is that not part of your I

Speaker 2:

well, wasn't thinking about that but, know, I I would love to make

Speaker 1:

that Maybe a little bit.

Speaker 2:

I'm making that point, that's that's fantastic. No. I actually I actually wasn't. I I I it started with something simple. It was just the first one was just I have a thousand tasks I need to do but I only wanna do them 25 at a time.

Speaker 2:

But I do wanna do them concurrently 25 at a time. And I was thinking about how in other languages, this is like very natural or native. And in JavaScript, it's kind of not as straightforward, or just takes a lot of code. So yeah, it was Yeah. It was just that, that's where it started.

Speaker 2:

And then I was just kind of taking it from there. And it's been pretty easy to think about them, like something I run to something almost every day that that fits into this.

Speaker 1:

So I've been working very hard. Lots of lots of slinging code around

Speaker 2:

Mhmm.

Speaker 1:

And deleting code and doing all the things with code. I never think of like a thing that I would distill and share with the world. I just don't. Is that a is that like a different personality? Is it a different set of skills?

Speaker 1:

Like, I can't imagine at the end of my day being like, oh, I solved this problem today. Here is how I can distill that and hand it over to the world to learn. I don't think I could ever do that. It's just not in me.

Speaker 2:

I don't think it's like anything like that because I I remember very clearly thinking at one point where I would see people that were doing stuff more publicly and I was like, oh, all they're doing is remembering that once they finish solving a problem they're not done, they have this opportunity to then like post it. So to me just felt like a habit that I did develop because I didn't have the, like, the mindset of, okay, I should take note of this or like, this is this is useful more than just, you know, my direct problem. Yeah. So I remember not doing that at all and then now, like, being able to, like, constantly remember to do that. So I don't know, think it's just So

Speaker 1:

it's something I could develop. It's something I could I could work on. Yeah.

Speaker 2:

I mean, even some of the stuff you ran into because you're doing all the Astro stuff and AWS and all those little details, there's probably some general general stuff there.

Speaker 1:

Yeah. It just feels so specific. But I I guess that's just my mindset. I don't know. Yeah.

Speaker 2:

But people even like specific stuff. Yeah. Use them an eye into, like, something that they don't already know about.

Speaker 1:

Yeah. It's so fun when, like, in the SSC Discord, seeing other people that are using ASTRO and SSC and, like, they're creating PRs and, like, knowing that there's other people

Speaker 2:

Mhmm.

Speaker 1:

That are, like, super into this very specific stack enough to, like, contribute and push it forward. I just love that. I love knowing, like, I'm not a snowflake. I'm not alone in this little tiny branch of software development I'm in. Yeah.

Speaker 1:

There's people that think about this stuff all the time. That's really

Speaker 2:

That's what's crazy about the Internet. It's just like, no matter how small minority you are, it'll like just connect you with enough people so it feels like a real real community. But the SST, the Astro on AWS combo, I actually have heard from Fred that that's technically the majority. That that's if you rank all their deployments of Astro. Really?

Speaker 2:

It makes sense because we always forget like all real companies with paid employees deploy on AWS so any technology that's at all adopted, it just kind of is the default. They might not be deploying it in this like really effective way, it might be just like static pages or like something a lot simpler. Yeah. But yeah, AWS is like where most of most if you I guess if you rank them, I don't know, like, what percentage it is. Yeah.

Speaker 1:

That's so interesting. I mean, I think it is the best way by a lot. But I just assumed that the easiness of, like, just clicking a button and sending your astro site to Vercel, I just figured that would, like, be their their predominant thing.

Speaker 2:

Yeah.

Speaker 1:

Can we talk about astro as we've done this before? We've talked about astro and SST, but can we talk about this PR specifically? Is that getting a little weird? We can cut

Speaker 2:

this part out. Let's do it.

Speaker 1:

Okay. So let's talk about whether, you know, the fallback approach, this PR out there. You'll I feel like we need to talk about this anyway.

Speaker 2:

Just, like,

Speaker 1:

come to some kind of resolution or you can take something back and, I don't know, make a case. API gateway versus not API gateway, all that conversation. Do you want let's just do it.

Speaker 2:

So I guess I'll I'll lay out the situation. So, when you build when you use some of these frameworks like Asher or Next. Js, you start to define lots of lots of routes. There's routes for dynamic content, there's routes for static content, there's routes for, I don't know, like your assets. There's like all kinds of different ways that whatever is getting a request needs to route it to a different place.

Speaker 2:

Like sometimes it's to a function to like render it live, sometimes it's to something cached in s three. And as your app gets more complex, you just get a lot of these different patterns. Unfortunately, in AWS, their front facing like the router that the end user hits called CloudFront, their CDN. There's a limitation, but default limitation, what is it? 20 behaviors?

Speaker 2:

Something like that?

Speaker 1:

25, I think. Yeah. Something like that.

Speaker 2:

Okay. So basically, they're saying like we can only specify 25 patterns of things. And sometimes that works like if all of your static assets are under just slash assets or whatever, like that's just one behavior. But with like a real, like big website, like a real application, like you're gonna get all kinds of complicated patterns. So we're trying to figure out how to work around this problem because, AWS will lift the limit if you message them, but they don't lift it infinitely.

Speaker 2:

They like, like, they'll bump you up and then you have to keep asking them to bump it up as it gets more complicated.

Speaker 1:

We've got it up to 50 right now for what it's worth. Yeah.

Speaker 2:

So as for us, by building, an adapter to deploy AWS, we can't rely on people having the limit bumped up. So we're looking at at different options. Is that a good summary?

Speaker 1:

Yeah. I think so. And I think the traditional, the easy answer is like you put API gateway in there between your your handler code that's in Lambda's Lambda functions. Oh, I said Lambda's. So sorry, Chris.

Speaker 1:

I just every time I hear the word, I think of Chris Moons. There's, like, putting API gateway in between and doing all the routing there. So basically, you have, like, one default behavior in your CloudFront distribution that just routes everything to your API gateway, and then you can do all the complicated routing stuff you want in your API gateway layer. There's downsides that, like, API gateway is another thing that you kinda have to think about. It's it's serverless.

Speaker 1:

I mean, there's not a lot of, like, not a lot of management there, but it does introduce a little bit of latency. It's not as fast as going straight to a a Lambda function with a just a Lambda function URL, And you don't get streaming. And I don't know why I'm so hung up on streaming because the more I learn about streaming, the more I think it's a dumb feature. No one cares. Like, it's really like I don't know.

Speaker 1:

It's it's kind of neat. It's

Speaker 2:

kind

Speaker 1:

of neat. But like, at the end of the day, you don't have loading states. Like, it's just Yeah. Sending chunks. It's like if you if your page is really long and you could defer loading stuff on the bottom of the page, then like you get a little benefit.

Speaker 1:

The top of the page can render first. And it's nice that, like, the CDN caches the full response. Like, after the stream is complete, it's a full page that ends up in the CDN. So it's not like caching a spa where you have a bunch of spinner states, and it's just a dumb empty HTML page that then makes calls to to fetch data. It's better than that in that sense.

Speaker 1:

But it's worse than that in the sense that you can't put like a skeleton loader in there

Speaker 2:

Mhmm.

Speaker 1:

Or something like that because it's just streaming sequential chunks of HTML. Does that make sense so far?

Speaker 2:

Yeah. The streaming thing is interesting because I've I've also been kind of confused by that. And I think if you look at where it was kind of like born, this pattern, it makes a lot more sense. And your project might actually fall into this but the majority of like SaaS applications talk to a singular back end. You built your back end and like the majority of requests talk to like your database.

Speaker 2:

It's like pretty simple. Yeah. It might be a little bit more complicated than that but it doesn't go too crazy. If you build, an e commerce website, you might have, like, here's some content from Shopify, here's some content that's stored in our CMS, here's some content that's that's stored in our inventory system that might be separate for some reason. So like a single page might be talking to like all kinds of data sources.

Speaker 2:

So I imagine like

Speaker 1:

Mhmm.

Speaker 2:

Each UI component on the page talking to different data sources that you can't like batch the request to or like they return at different speeds. Yeah. See how streaming kind of makes sense there because like, yeah, then just the fact that one of your back ends for one component on the page being slow doesn't prevent the whole page from not showing up. Yep. So I get that.

Speaker 2:

Once again, I am extremely confused why this is at all exciting for anyone that They I know working on got lucky because there's weird coincidence that OpenAI, you know, is all like a good streaming type interface. So like, there was some like synergy there. But again, like still kinda niche because any like serious product integrating, like OpenAI, you actually don't stream it. You buffer and you do some additional processing.

Speaker 1:

Yeah. If you're just wrapping the OpenAPI

Speaker 2:

With like an OpenAPI or OpenAPI.

Speaker 1:

Yeah, okay. Then, like, congratulations. You're competing with a thousand other people doing the same thing and it's worthless.

Speaker 2:

Yeah. Yeah, exactly. So I I am, like, just not I'm confused by that. So, yeah. Again, like, your situation is a little bit different because you work on like a big consumer facing thing.

Speaker 2:

But most people I know don't. They just work on business facing things.

Speaker 1:

But honestly, yeah. The the benefit of streaming is very tiny and I've considered just ripping it out even if it's supported because I don't know that it's really adding enough to justify. I I think, like, there's something in me that just hates the idea of, like, not being feature complete. Like, if ASTRO supports a thing

Speaker 2:

Yeah. I know.

Speaker 1:

I want it to be there in the SSC adapter. And then and that goes to code splitting. So then code splitting the the person that that authored this PR says that they think there's a path to support code splitting with that approach, with the fallback approach. I guess we didn't talk about the PR or the fallback approach. This is a very weird specific conversation to have on a podcast.

Speaker 1:

But but aren't all of our conversations, I guess? We're always just talking about whatever is going on. So whatever. They they did say, don't know how that would work. You can't just, like, fall back, like chain them together.

Speaker 1:

That would be awful.

Speaker 2:

Like That would be too slow.

Speaker 1:

Yeah. That would be really slow. Yeah. Because the Lambda invocations are semi expensive as opposed to like an s three miss.

Speaker 2:

Yeah. Exactly. So yeah, I'm like still not sure. There's just so many dimensions of things you can trade off. So like if you want streaming, then you can't get splitting.

Speaker 2:

If you want splitting, then maybe you can't get streaming. The reason I was thinking about splitting was I was actually giving the Astro team a demo of the new SSD console and I was showing them one of the things that I love about, like this event driven stuff, the serverless stuff is you can be way more aggressive with log statements. So you can put way more log statements than you normally would because it's not a single log stream of like your whole application. It's already naturally broken down into this function's log stream or this route's log stream and like you get like that granularity. When you go into the console and you're like, oh, okay, I'm looking for an issue that happened in this part of my application, you just go to the function that handles it and you see just the logs for it, which is great.

Speaker 2:

But when with our current way we do SSR sites, we bundle all your routes into a single function so you lose that. So then when you go to the logs. Function, you see the logs for all of your routes. So I like splitting, not from a performance point of view, and again, if you look at our console for most applications, you'll see that even people that split up their functions, all the functions are like eerily almost the exact same size because your dependencies account for 99% of it. So Yeah.

Speaker 2:

I don't care about splitting for performance but from observability standpoint of like organizing it, like I'm almost willing to accept some performance trade off to like maintain that, like, niceness I get when I'm debugging.

Speaker 1:

Yeah. I get that. Yeah. I I guess, like I wanna make sure I understand splitting fully. If you have dependencies on one route that aren't on any other route, then that bundle is going to be larger in that function.

Speaker 1:

Right? Because, like, there are pages for us. Like, we have a finance product and then we have the sports product. And on the finance side, we have to do a bunch of other stuff. Like, there's a bunch of stuff, a bunch of dependencies we pull in that I don't love all of them, but I'd love for those dependencies to not affect the bloat of our sports pitch because they can be pretty light on the server side.

Speaker 1:

So I I think splitting actually would benefit my use case.

Speaker 2:

Yeah. It it just depends. It's like very, very specific to exactly your situation and it's it's just hard to measure also because is a slower cold start worth it if you have fewer cold starts overall? Right? Yeah.

Speaker 2:

That's a very hard question to answer. Yeah. And splitting means you have more cold starts, but theoretically they get slower, they get faster. But again, how faster? Like, is it 10% faster, 20% faster, is it three times faster?

Speaker 1:

Right.

Speaker 2:

So because it's just not like a slam dunk, obviously, is what you should always do. It's it's hard for us to make a decision.

Speaker 1:

Well, we got a lot of users, so I lean towards splitting would be better for us. Yeah.

Speaker 2:

That makes sense because you'll always have a bunch of warm

Speaker 1:

Yeah.

Speaker 2:

Stuff. You're not gonna have a lot of cold starts in general. Right.

Speaker 1:

Because the routes I mean, it's like it's not a cold start per page. It's a I mean, it's a cold start per route but the routes are all dynamic and there could be a million different pages literally under one route with one dynamic segment.

Speaker 2:

Yeah. That's true.

Speaker 1:

So that's just one cold start for any of those million pages.

Speaker 2:

Yeah. Yeah. That makes sense. Yeah. I think for you guys, like splitting is a little more obvious.

Speaker 2:

Yeah. I think the observability angle to me, that's like universally a good thing so Yeah. That's what that's like my first decision point. But yeah, it might just be good to split as a default.

Speaker 1:

So could you maybe maybe you could follow-up on the PR or Frank or somebody could follow-up and just ask how would we implement splitting in this because we wanna move to splitting and if there's not a path forward, then we wanna look at the API gateway thing. Maybe that's a good I don't know. I'm telling you how to run SST here. I'm sorry.

Speaker 2:

That makes sense. No. I I want I was just love it.

Speaker 1:

Want me to over your stream too? Is that would you like me to

Speaker 2:

Just run this ticket. Hey,

Speaker 1:

Opti's here.

Speaker 2:

It's called delegation. I heard that's good.

Speaker 1:

Exactly. Delegate to the community. It is, I think. Especially when there's only three of you.

Speaker 2:

Yeah. No. But we like when people tell us what to do because then there's less that we have to think about.

Speaker 1:

Yeah. Exactly. Well, we'll, we'll link the PR in the show notes so that any of this made maybe some sense if you care to dig in and you wanna understand what we're talking about. There's some documentation on GitHub. There are things you could read, and this would maybe make a little more sense.

Speaker 1:

If you've listened this far, you probably are curious. So there you go.

Speaker 2:

Yeah. We're at the the odd intersection of, like, weird AWS infrastructure stuff with, like, the most front end y things Yeah. That you can think about.

Speaker 1:

Yeah. It's a weird it's a it's a niche. But it's the Internet. There's people out there that care about that niche. Yeah.

Speaker 1:

I guess there's other people that listen to us because we talked about aliens once or something. I don't know. I don't know why anyone listens to us. Do you know?

Speaker 2:

I don't know. But more and more every single day.

Speaker 1:

More and more. It's growing. Yeah. You're part of a burgeoning community. Maybe we should have a Discord or something.

Speaker 1:

I don't know. Do people that listen to show wanna hang out? No? You're shaking your head no.

Speaker 2:

Yeah. I just like Too many Discords. I just don't have time though. I just realized I just like I'm not I'm not able to allocate enough time to like invest in something like that.

Speaker 1:

Yeah. So

Speaker 2:

we gotta find

Speaker 1:

something We'll wait until we have, like, a lot of listeners. We'll wait till there's so many listeners that we have multiple people who are like, can I please run your Discord? Like, okay, I guess. Hey, here's the thing. There's a lot of people that listen to this show, and there are not a lot of reviews or ratings or any of those things.

Speaker 1:

And if you're still listening thirty four minutes into this podcast, that means you probably like this show, and you could just go tell someone about it or write it on the Internet so lots of someone's could see it. That'd be good. We'd like that. I hear that that's good for spreading the show. Okay.

Speaker 1:

I always hate doing that. I'm but I did it. I did I did it. No, good.

Speaker 2:

I appreciate that. You're the one that took the burden of of doing that.

Speaker 1:

You're welcome.

Speaker 2:

Appreciate it. Thank you. I'll go run a review.

Speaker 1:

Is appreciation oh, well, is that a thank you or not? Like, if somebody says I appreciate that, is you're welcome an appropriate response?

Speaker 2:

It does sound weird to say you're welcome.

Speaker 1:

It does. Yeah. I don't know what to say in I appreciate that you appreciate it, Dax. That's my response.

Speaker 2:

Maybe I should start saying thank you. I'm gonna I'm gonna rotate out the phrase appreciate. I'm just gonna say thank you so it's not awkward for the other person. And they would appreciate me So

Speaker 1:

I can say, you're welcome. I would appreciate that. Now what do you say?

Speaker 2:

You're welcome.

Speaker 1:

Oh, man. Alright. Let's get off here. I think we gotta

Speaker 2:

go. Okay. Yep.

Speaker 1:

Okay. Bye. The why are you looking at me like that for? I just do it the silent

Speaker 2:

I said Oh, you did it. You already said it. Okay. And there was a pause.

Speaker 1:

Oh, okay. Okay. See you. Bye.

Creators and Guests

Adam Elmore
Host
Adam Elmore
AWS DevTools Hero and co-founder @statmuse. Husband. Father. Brother. Sister?? Pet?!?
Dax Raad
Host
Dax Raad
building @SST_dev and @withbumi
Podcast Fights, SST Astro API Issues, and Being Wired for Bad Things
Broadcast by