Serverless kinda sucked without this...

Ғылым және технология

DISCLOSURE: VERCEL PAYS ME BUT NOT FOR THIS SPECIFIC VIDEO. I just wanted to rant about this
waitUntil and the benefits for us serverless diehards is huge. I've been asking for this forever so I'm pumped I finally have it.
Check out my Twitch, Twitter, Discord more at t3.gg
S/O Ph4se0n3 for the awesome edit 🙏

Пікірлер: 97

  • @coffeeintocode
    @coffeeintocode24 күн бұрын

    Sounds like you should just use a server

  • @thepeer
    @thepeer24 күн бұрын

    why don't you just use a 5 dollar vps

  • @Om4r37

    @Om4r37

    24 күн бұрын

    great for 99% of projects, but it’s not scalable.

  • @kevgoeswoof

    @kevgoeswoof

    24 күн бұрын

    @@Om4r37 how about a second five dollar vps?

  • @Om4r37

    @Om4r37

    24 күн бұрын

    @@kevgoeswoof idk how nobody thought of this before, you’re a genius 😂

  • @JakobRossner-qj1wo

    @JakobRossner-qj1wo

    24 күн бұрын

    And if you blow up? What happens if many users want to access your site at the same time? Your company dies if you cant handle a spike in user traffic.

  • @JakobRossner-qj1wo

    @JakobRossner-qj1wo

    24 күн бұрын

    It does not scale

  • @kontent_king
    @kontent_king24 күн бұрын

    waitUntil(...) -> but don't wait too long. Go and ask her out.

  • @lucaruana9404

    @lucaruana9404

    24 күн бұрын

    Thank you, man, now that I've read this in the place I least would have expected to I will

  • @mohitkumar-jv2bx
    @mohitkumar-jv2bx24 күн бұрын

    Classic example of first creating the problem and then "fixing" it. 😂

  • @isakhansson917
    @isakhansson91724 күн бұрын

    So like Cloudflare Workers?

  • @stephan553

    @stephan553

    24 күн бұрын

    Theo loves to sell Cool Aid after it boiled in the Sun for three summers.

  • @drprdcts

    @drprdcts

    24 күн бұрын

    Theo the type of guy to create a schedule for wearing each of his clothes

  • @stephan553

    @stephan553

    24 күн бұрын

    Worst of all... #NotAVercelShill Only talks hype, no technical insight...

  • @ndrut

    @ndrut

    21 күн бұрын

    @@drprdcts 🥶

  • @geekthegeek730
    @geekthegeek73024 күн бұрын

    Lambda ( response ) -> SQS -> Lambda ( wait until task ) = 🎉🎉

  • @emptycodes

    @emptycodes

    24 күн бұрын

    Skip the SQS, just invoke another Lambda asynchronously.

  • @BCRooke1

    @BCRooke1

    24 күн бұрын

    Ah but you’d want to have retries, and maybe a dead letter

  • @raghavrudhra3327

    @raghavrudhra3327

    24 күн бұрын

    works for your own lambda's and server side logic but if you are using nextjs and server actions. they control the infra

  • @DeltaByte
    @DeltaByte24 күн бұрын

    So like Cloudflare workers has had for years? or y'know just invoke a second lambda, or do the (at least IMO) just fire off a PutMessage to SQS since that is far more reliable for background processing anyways and with the minor overhead of having to await that put request. AWS Also support directly putting into SQS/EventBridge/SNS/Etc. directly from API Gateway anyway without you having to write even a single Lambda function (great to receiving spikes in traffic for submitting forms and such)

  • @rtorcato
    @rtorcato24 күн бұрын

    The whatever service you are wondering about is most likely Cloudlfare.

  • @JuliaOrtiz-ti6ku
    @JuliaOrtiz-ti6ku24 күн бұрын

    I had so many issues with that. Stale-while-revalidate made no sense at vercel because you had to pay the cost of waiting for revalidation while it still gave you the stale response in the end..

  • @noah12121
    @noah1212124 күн бұрын

    Why not just use a $5 vps?

  • @helleye311
    @helleye31124 күн бұрын

    I always wanted something like this, but I didn't even think about making my own architecture on top of lambda, I'm a noob. It just makes sense to do what you need to do, send response, and then finish any extra stuff like updating cache, logs etc. Not to mention streaming.

  • @cnikolov
    @cnikolov24 күн бұрын

    ❤ love that it didn't take you long to come around that feature, my main use case is logging and internal processing that the user doesn't/shouldn't care about

  • @mubashir3
    @mubashir324 күн бұрын

    For vast majority of devs serverless is a massive headache with absolute garbage ROI.

  • @Lorofol
    @Lorofol7 күн бұрын

    That streamData issue seems like it's going to bite many people in the ass.

  • @glorrin
    @glorrin24 күн бұрын

    logging, sending emails, writing stuff in db the user don't need, There are so many times I wanted to have those and it frustrated me because "it worked on local dev though"

  • @RaZziaN1

    @RaZziaN1

    24 күн бұрын

    Stop using javascript, problem solved. It was already done 1000 times in other languages or backend languages.

  • @luka1790

    @luka1790

    24 күн бұрын

    @@RaZziaN1 what do you use now?

  • @glorrin

    @glorrin

    24 күн бұрын

    @@RaZziaN1 you are right that's why I use typescript

  • @issueBucks
    @issueBucks24 күн бұрын

    it's crazy seeing this video because I just spent my entire weekend figuring this out. - Vercel should keep this same behaviour in dev (drove me crazy) - Also having issues with adding this to multiple requests

  • @underflowexception
    @underflowexception24 күн бұрын

    Laravel has queues built in. You can then interface with a number of drivers. Theres also a dispatch after response function you can use in your controllers to run arbitrary code.

  • @nicksdrumsticks
    @nicksdrumsticks24 күн бұрын

    I currently have a project that could use this. I'm holding back the client response artificially to wait for something it shouldn't need to wait for. Cool.

  • @FeLiNe418
    @FeLiNe41824 күн бұрын

    The video is not sponsored by vercel BTW

  • @MegaMage79
    @MegaMage7924 күн бұрын

    I believe that Lambda function doesn't die after it serves sync invocation request. It is kept around for ~15mins to potentially serve more requests.

  • @gusryan

    @gusryan

    24 күн бұрын

    The deployment lives but you can't run code after you've returned a response. If you want to do that you have to invoke another lambda no?

  • @MegaMage79

    @MegaMage79

    24 күн бұрын

    Well, for example with dotnet runtime lambda is just a regular dotnet app so it can run what it wants in the background. I would assume it's the same for node. But yeah, that still doesn't guarantee that secondary logic will actually eventually succeed. I wonder if the vercel invention can provide some actual guarantees

  • @gusryan

    @gusryan

    24 күн бұрын

    @@MegaMage79 It's definitely not hence the video. Once you return a response in a JS lambda the lambda is killed even if it's still running some other async task

  • @Yxcell

    @Yxcell

    24 күн бұрын

    @@gusryan What's the downside of just letting it continue running the other async task?

  • @gusryan

    @gusryan

    24 күн бұрын

    @@Yxcell it doesn't, that's the whole point of the video lol. Once the lambda returns the whole process is killed. If you want something to keep running you have to call to a second lambda before you return from the first one

  • @Salzian
    @Salzian24 күн бұрын

    So... Like cloudflare workers had since forever?

  • @FujiLivz
    @FujiLivz24 күн бұрын

    The ending demo gave me nice jquery nestalgia. The waitUntil pattern idea itself seems universally awesome though, good for the client, good for the data, a tiny-bit-rougher on servers (more long-running processes). Pretty good value-add from Vercel, from the end-customer and dev perspective. If this is just something we can nab and tinker with without the need for vercel hosting, as it sounds like, I'd be down to tinker with it for a couple nights and see what happens.

  • @michaelczolko6093
    @michaelczolko609323 күн бұрын

    please promise me that you will never stop doing content!

  • @SirMeowric
    @SirMeowric24 күн бұрын

    Continuations still newsworthy in 2024. Maybe they should replace "off-by-one-errors" in the top 3 hard problems list.

  • @_Aarius_
    @_Aarius_19 күн бұрын

    My way of handling tasks after lambda response has been to setup a lambda extension registered to invokes - its been honestly pretty painless for me (rust lambdas)

  • @MrManafon
    @MrManafon24 күн бұрын

    I think they’ve been lowkey doing this with revalidateTag. Remember how they removed the await from the docs.

  • @gdmk1000
    @gdmk100024 күн бұрын

    for js deno deploy is strictly superior for such characteristics

  • @dytra_io
    @dytra_io24 күн бұрын

    woah this is very nice

  • @karaloop9544
    @karaloop954424 күн бұрын

    Lambda isn't that much different from CGI of old, right?

  • @soniablanche5672

    @soniablanche5672

    24 күн бұрын

    lambda is basically php

  • @BCRooke1

    @BCRooke1

    24 күн бұрын

    I’ve never thought of it like that before. But I guess spinning up containers to run a program is like a distributed version of CGI in a way

  • @menglin7432
    @menglin743224 күн бұрын

    Second a few comments below. I don't think serverless itself is bad I think CloudFlare workers is better designed for frontend SSR workloads than AWS lambda.

  • @rawallon
    @rawallon24 күн бұрын

    Dax is anti vercel because he suggest there's already an alternative in place? oof

  • @BloodvorteX7
    @BloodvorteX724 күн бұрын

    What color scheme does he use?

  • @torreysmith6277

    @torreysmith6277

    24 күн бұрын

    Poimanders

  • @SameerAli-bk7vo
    @SameerAli-bk7vo24 күн бұрын

    the vercal is good at copying cloudflare worker :D

  • @RemiKalbe
    @RemiKalbe24 күн бұрын

    A queue would make way more sense especialy for retries, I'm sure there is a use for this but the example you used is not the best in my opinion.

  • @huge_letters
    @huge_letters24 күн бұрын

    4:30 - of course it will die, you can't write to files on lambda 🤓

  • @emptycodes

    @emptycodes

    23 күн бұрын

    You can write files at /tmp 🤓

  • @keithjohnson6510
    @keithjohnson651024 күн бұрын

    `.repeat(1024)`, to fudge gzip, was header -> 'accept-encoding: identity' not an option?

  • @KevinVandyTech
    @KevinVandyTech24 күн бұрын

    Why not just use a $500,000 VPS?

  • @ktxed
    @ktxed24 күн бұрын

    vercel shilling lol

  • @Mike-zr9wq
    @Mike-zr9wq24 күн бұрын

    Solving a pain point that doesn't really exist. Coolify + VPS = Freedom. Screw this VC funded companies

Келесі