Complete Intro to Temporal Workshop - TypeScript SDK
Вставка
- Опубліковано 24 лип 2024
- New to Temporal? Got 2 hours to code along? Join us in our complete Intro Workshop - now updated for TypeScript? Lots of questions along the way!
Slides: docs.google.com/presentation/...
00:00:00 Part 1: TS SDK Intro
00:12:15 Part 2: Your First Workflow
00:16:42 Part 3: Workflows vs Activities
00:23:52 Live Code Demo
00:36:00 Part 4: Timeouts and Retries
00:57:00 Part 5: Workflow APIs
01:24:00 Signals and Queries
01:29:40 Fullstack Next.js App
01:41:50 Part 6: Workers and Task Queues
01:45:19 Recap and Q&A
Sign up for future Temporal Workshops: lu.ma/temporalintro
Sign up for Temporal Office Hours: lu.ma/temporal
Learn more about Temporal:
Website: temporal.io/
Email updates: temporal.io/subscribe
Github: github.com/temporalio
Community Forum: community.temporal.io/
Documentation: docs.temporal.io/
Work at Temporal:
temporal.io/careers - Наука та технологія
Signup to our newsletter to be the first to know of future workshops: temporal.io/subscribe
Timestamps:
00:00:00 Part 1: TS SDK Intro
00:12:15 Part 2: Your First Workflow
00:16:42 Part 3: Workflows vs Activities
00:23:52 Live Code Demo
00:36:00 Part 4: Timeouts and Retries
00:57:00 Part 5: Workflow APIs
01:24:00 Signals and Queries
01:29:40 Fullstack Next.js App
01:41:50 Part 6: Workers and Task Queues
01:45:19 Recap and Q&A
The newsletter form didn't work for me. It just says "There are errors below" but I can't find any errors.
the slack notification got me startled as i thought it was someone sending me a slack msg
sorry! will try to mute that next time
@@Temporalio do not disturb mode on macos is awesome for presentations
Great presentation. It's valuable because it covers the white space, so to speak, around how the system works. I especially enjoyed the answers to questions from the audience, which covered some questions I had as well.
1:32:35 solid keyboard slam
1:40:00 Why does the useState function work? Since it now holds some state (the signal and query) and state in a workflow needs to be serializable. Or does Temporal somehow also serialize functions and stores them in the event history?
The state doesn't need to be serializable, just the history of events (including workflow start and signals). For more information on how it works, see: temporal.io/blog/building-reliable-distributed-systems-in-node-js-part-2
Noob question: Is there a way to have Temporal backend interface running in the browser when we are running samples locally?
I don't think so-the two dev setup options we recommend are:
- Both code and server running in browser: github.com/temporalio/samples-typescript#in-browser
- Running both locally with the CLI server: github.com/temporalio/samples-typescript#locally
I am still finding it difficult digesting this. Will continue to study the docs
sorry to hear that - please let us know what questions you have and we'll try to answer right away!
49:09 Hot Take: activities should be a regular import instead of return values of the proxyActivities function.
It is confusing how this proxyActivities function knows to return the activity defined in another file. Turns out there’s lots of magic going on under the hood! So, might as well put that magic in a regular import call.
An import matches the mental concept of bringing in the activity into the workflow. A function return type does not.
I don’t think the function call to proxyActivities helps to clarify that the activity execution environment is didferent than the workflow execution environment. You already write activity and workflow code in the same language in colocated files. A function call doesn't help at all. In fact, it's even more confusing since we all have this question why this magic function isn't just an import. Explaining the different execution environments should be part of documentation on concepts (which has much headroom to improve on clarity btw.). There’s lots of magic going on in Temporal anyways - so might as well make the magic “nice”.
Thanks for the feedback! Improving our concept docs clarity is definitely on our todo list. We sandbox workflow code in the TS SDK to assist devs in writing deterministic code (a common footgun in other SDKs), which (by design) prevents importing modules like http that activities import. So importing activities would error, which is why we only import activity types. More info on the sandbox here: temporal.io/blog/intro-to-isolated-vm
25:17 Temporal Clusters cannot be deployed Serverless.
yup! should have made that clearer. but Clients can be.