im becoming increasinglymore convinced that workflows are the wrong model just build state machines folks
Make any TypeScript function durable
41–50 of 89 posts
Re: Make any TypeScript function durable
#42Use client and use server aren’t great, but the fact they had to be declared at the top of a file was at least clear. Starting to scatter magic strings throughout a code base feels like a real step back.
There's nothing about "use server" that requires it to be at the top of the file though, it can go in function bodies and you have a typed RPC method. I think "use client" is the only one that has to go at the top of a file.
Re: Make any TypeScript function durable
#43So vercel is adamant on making nextjs apps behavior completely unpredictable and hidden behind tons of magic code? At least in any other framework library I can just command click and see why things are not working, place breakpoints and even modify code.
Re: Make any TypeScript function durable
#44Of all the syntax options they could've gone with, they settled on what I would say is arguably the worst. If you want a one-liner, decorators are widely used across different languages and Typescript supports them as well.
Yea but it's a vercel product and they also pushed the 'use server' and 'use client' directives and probably want to build on them.
Re: Make any TypeScript function durable
#45This is actually pretty cool. We have a similar custom library at Xbox that's used extensively across all of our services. I do wish that there was some kind of self-hostable World implementation at launch. If other PAAS providers jump onto this, I could see this sticking around.
But we did have convos in the last couple of days on what we can do next on the pg world ;D
Re: Make any TypeScript function durable
#46can anyone point to the "Durable" part? looking at the docs and examples, I see Workflows and Steps and Retries, but I don't see any Durable yet. none of the examples really make it clear how or where anything gets stored
Re: Make any TypeScript function durable
#47So this seems similar to https://temporal.io/ , am I reading this right? I used that briefly a few years ago and it was pretty nice at the time. It did make some features much easier to model like their welcome email example. Would love to hear from someone with extensive temporal experience, iirc the only drawback was on the infra side of things.
Re: Make any TypeScript function durable
#48What happens if you saw a bug, or you want to update and change a workflow? Is there a way to discard / upgrade the existing in-memory workflows that are being executed (and correspond to the previous version) so they are now "updated"?
Re: Make any TypeScript function durable
#49Earlier quoted context omitted.
Since this magic string requires a preprocessor step anyway, there's no reason they couldn't make it a decorator that works on functions. I don't see the problem?
But then it's not valid TypeScript anymore. So all the other tooling breaks: syntax highlighting, LSP, Linter, ...
[0] https://ts-ast-viewer.com/#code/GYVwdgxgLglg9mABMOcAUBKRBvAU...
Re: Make any TypeScript function durable
#50So vercel is adamant on making nextjs apps behavior completely unpredictable and hidden behind tons of magic code? At least in any other framework library I can just command click and see why things are not working, place breakpoints and even modify code.