Temporal: Orchestrating Success in Distributed Systems with Security and Simplicity with John Kattenhorn
Summary
John Kattenhorn, CEO of Applicator, introduces Temporal.io, a durable execution platform for building resilient distributed systems. Temporal solves the problem of running code to completion despite transient failures, managing workflows and activities across services. It is particularly useful for long-running processes—workflows can last for years, such as customer lifecycle management—while efficiently dehydrating inactive workflows to save resources.
The discussion covers how Temporal differs from traditional approaches like message queues (RabbitMQ) or job schedulers (Hangfire). Unlike polling-based systems, Temporal only activates workflows when there is work to do, reducing resource consumption. It also provides robust debugging capabilities, allowing developers to replay production workflows locally with a debugger attached, which is invaluable for troubleshooting complex distributed transactions.
Security and deployment flexibility are key advantages. Temporal workers run in your own environment, ensuring sensitive data never leaves your infrastructure. The platform supports multiple languages (Go, Python, TypeScript, PHP, .NET), enabling polyglot teams to collaborate. The .NET SDK, recently released, integrates seamlessly with ASP.NET Core, making it easy to adopt.
John explains how Temporal changes architectural decisions by lowering the cost of adding resilience. Developers can focus on business logic rather than plumbing, as Temporal handles state persistence, retries, and orchestration. The episode concludes with resources for getting started, including Temporal’s YouTube channel, GitHub samples, and community Slack.
Recommendations
Companies
- Applicator — John Kattenhorn’s company, a Microsoft-focused tech firm involved in bespoke software, solutions creation, and managed services.
People
- Chad — The developer who created the .NET SDK for Temporal; there is a video where he discusses the process of building it.
Tools
- Temporal.io — The main platform discussed, a durable execution system for building resilient workflows that can run for years, with support for .NET and other languages.
- Orleans — Mentioned as a .NET actor framework that has some similar concepts to Temporal, like deactivating grains when not in use, and could be used to build a similar system.
- Docker Compose — Recommended as an easy way to run the Temporal server locally for development and testing.
Websites
- Temporal YouTube channel — Recommended for primers and deep dives into Temporal concepts and features.
- Temporal GitHub samples — Contains sample code for various Temporal features in .NET and other languages.
- Temporal Slack community — An active community where developers can ask questions and get help, including a dedicated channel for the .NET SDK.
Topic Timeline
- 00:00:00 — Introduction to Temporal and durable workflows — Jamie introduces the episode and guest John Kattenhorn. John gives an elevator pitch about Temporal.io, explaining it as a platform for durable execution that ensures code runs to completion despite failures. He mentions its use by companies like Snapchat, Airbnb, and Stripe, and highlights its recent .NET SDK release.
- 00:06:24 — Comparing Temporal to traditional approaches — Jamie asks how Temporal compares to using message queues like RabbitMQ. John explains that Temporal manages workflow state and recovery, allowing developers to focus on activities rather than plumbing. He emphasizes that Temporal handles the orchestration, reducing custom glue code significantly.
- 00:08:27 — Security and deployment flexibility — John discusses Temporal’s security model: workers run in your environment, and only instructions are sent from the Temporal server, not sensitive data. This makes it suitable for finance and other regulated industries. The platform is open-source, allowing self-hosting or using Temporal’s managed cloud service.
- 00:16:02 — Long-running workflows and resource efficiency — John explains that Temporal workflows can run for years, like customer lifecycle management. The system dehydrates inactive workflows, hydrating them only when needed, which allows high density without constant resource consumption. This contrasts with traditional polling-based systems.
- 00:19:12 — Temporal vs Hangfire and saga patterns — Jamie asks about the difference between Temporal and Hangfire. John clarifies that Temporal is event-driven, not polling-based, which matters at scale. He relates Temporal to the saga pattern but notes it is out-of-process and more robust, with built-in state persistence.
- 00:22:13 — Debugging and replay capabilities — John highlights Temporal’s powerful debugging features. The UI shows workflow history, including inputs and outputs of activities. Developers can export a workflow’s journal and replay it locally with a debugger attached, making it easy to reproduce and fix production issues.
- 00:32:35 — Developer focus and DevOps mindset — Jamie and John discuss how Temporal allows developers to concentrate on business logic rather than infrastructure wiring. They critique the misinterpretation of DevOps as requiring developers to be infrastructure experts, advocating instead for a collaborative mindset where specialists work together.
- 00:40:40 — Temporal and Kubernetes resilience — Jamie asks how Temporal compares to Kubernetes for durability. John explains that if a pod running a Temporal worker crashes, the worker can restart and resume from the saved state, whereas a pod running custom code might lose in-memory data. Temporal provides state persistence across failures.
- 00:46:02 — Getting started with Temporal in .NET — John describes how easy it is to start with Temporal in .NET: add a NuGet package, configure a few lines in Program.cs, and use Docker Compose to run the Temporal server locally. The SDK integrates with ASP.NET Core’s background service system.
- 00:52:10 — Retrofitting and architectural impact — John explains that Temporal can be retrofitted into existing codebases, especially if they use patterns like Mediator. It changes the cost-value calculation for architects, making it affordable to add resilience everywhere, leading to more robust systems.
- 00:57:53 — Examples and community resources — John acknowledges that .NET examples are still emerging due to the SDK’s recent GA. He points to GitHub samples for individual features and Temporal’s YouTube channel for primers. The community Slack is active, and there are plans to create more comprehensive .NET examples, like temporalizing eShop.
Episode Info
- Podcast: The Modern .NET Show
- Author: Jamie Taylor
- Category: Technology
- Published: 2024-05-31T06:30:00Z
- Duration: 01:11:02
References
- URL PocketCasts: https://pocketcasts.com/podcast/the-modern-net-show/91f7d1c0-7bea-0136-7b90-27f978dac4db/temporal-orchestrating-success-in-distributed-systems-with-security-and-simplicity-with-john-kattenhorn/1a0fcc79-e3ee-4a34-8105-45442dfd8096
- Episode UUID: 1a0fcc79-e3ee-4a34-8105-45442dfd8096
Podcast Info
- Name: The Modern .NET Show
- Type: episodic
- Site: https://dotnetcore.show
- UUID: 91f7d1c0-7bea-0136-7b90-27f978dac4db
Transcript
[00:00:00] when you talk to the temporal guys and look at the way that they’ve done some of their work
[00:00:15] is they have a they have stuff that can run for years so for instance they’ll kick off a workflow
[00:00:20] for one of their customers kicks off a workflow when the customer’s created
[00:00:24] and that workflow is like managed by temporal for as long as that customer is a customer so
[00:00:31] it could be you know i don’t know occasionally sending out an email to you know welcome happy
[00:00:37] birthday or something or sending them promotions or whatever so they see they see workflows as
[00:00:42] like lifetime things welcome to the modern.net show formerly known as the.net core podcast we
[00:00:47] are the go-to podcast for all.net developers worldwide and i am your host jamie kaprogman taylor
[00:00:54] in this episode john cattenhorn joined us to talk about temporal.io and their platform for
[00:01:01] building durable workflows that can operate for years at a time john is the ceo of applicator
[00:01:07] and wanted to talk about the ways that developers can build applications and workflows that can live
[00:01:11] in the cloud for a very long time the great thing about um temporal is it manages all of those
[00:01:18] resources for you so if you imagined me and you trying to do that we’d end up standing up i don’t
[00:01:24] know around the world and we’d be like oh my god we’ve got to do this we’ve got to do this we’ve got to
[00:01:24] running service or something that was constantly polling the data looking for you know eligible
[00:01:30] customers or something you know you’d be burning some resources looking at that stuff and that’s
[00:01:35] not how they that’s not how they do that so you know if you’ve got like a million customers there
[00:01:41] the temporal system dehydrates everything that isn’t relevant and only hydrates the workflows
[00:01:48] that have an action to perform so let’s sit back open up a terminal type in
[00:01:54] and we’ll dive into the core of modern.net so john welcome to the show um you’re a very busy chap i’m
[00:02:06] not so busy but like not as busy but i really appreciate whenever anyone takes the time
[00:02:12] to uh to have a chat with me and we’re going to get into some stuff here today that i have
[00:02:16] literally no idea about you know i’ve done some research in that but i’ve never actually used
[00:02:21] this so this will be really quite interesting so welcome to the show
[00:02:24] awesome thanks for uh having me jamie it’s a uh yeah pleasure to come and talk to you about
[00:02:28] temporal and all things durable nice yeah yeah so yeah we’ll get on to i mean people have been
[00:02:37] listening so far they’ve seen the name of the uh the episode topic so we’ll and you’ve just said
[00:02:41] it as well we’re going to talk about temporal and some uh durable stuff yep but i thought before we
[00:02:46] do that um would you mind giving the folks a bit of like a an elevator pitch a bit of a background
[00:02:51] on john and like what he does and all that kind of stuff yeah
[00:02:54] no problem yeah so my name is uh john captain i’m the ceo of uh the implicit group uh so we’re
[00:03:01] a microsoft focused tech company uh we started off originally in uh bespoke software development
[00:03:06] now um sort of more solutions creation um hardware and software technology supply
[00:03:12] and managed services so yeah it’s um it’s been a wild journey so i’ve started in 2012
[00:03:18] um all kind of like i say microsoft focused um we tend to i certainly
[00:03:24] on the software creation side we’re very focused on sort of dot net everywhere
[00:03:27] um so we’re sort of known i suppose for doing interesting things with dot net hence uh sort
[00:03:35] of pushing boundaries a bit and advocating for dot net which is how we kind of got involved
[00:03:39] in temporal which i’m sure we’ll get into right nice okay cool um yeah so uh i guess
[00:03:49] i guess we kind of need to talk about about temporal and what it is
[00:03:54] um so i know that um i did a bit of uh looking into it and the website is temporal.io
[00:04:00] um and i was like i’ve literally never heard of this before um but um so like what is it
[00:04:08] okay so um yeah temporal’s pretty new to dot net so um they’ve only recently brought out their sdk
[00:04:16] but we started talking to temporal about um bringing kind of dot net support for their system
[00:04:23] uh way back in
[00:04:24] 2021 i think it was like november 2021 and so yeah what the problem that temporal solves is
[00:04:31] around um what they call durable execution and that really uh means about running code
[00:04:39] to completion no matter what you know transient failures or anything like that which is often some
[00:04:46] of the issues you have in um yeah sort of distributed systems you’ve got maybe third
[00:04:51] party apis you’ve got other bits of your own system
[00:04:54] um that can’t always be there um or you know you’ve got a big system you want to
[00:04:59] be able to take bits of it down but some of it’s still sort of functional so
[00:05:03] they uh temporal tend to sort of view this um as like workflow workflow and activities so
[00:05:12] effectively what their their durable execution system is doing is executing workflow um and
[00:05:18] within those workflows you’ve got um various activities so you know what a good example of
[00:05:23] activity might be you know you’ve got a lot of activities that you’ve got to do and you’ve got
[00:05:24] to be you know calling an external api or perhaps um you know calling another service that you’ve
[00:05:30] got internally and what it does is it’s actually marshalling and managing how the workflow is
[00:05:36] working and um you know restarting if there’s been failures at the correct place so fundamentally
[00:05:43] it’s it’s kind of doing a lot of it’s doing a lot of the work that you can obviously do in dot net
[00:05:49] um yourself i mean there’s some great libraries around that help with some transient failures
[00:05:54] and you know a few other things but this kind of goes way beyond that um it’s used um for instance
[00:06:00] for you know snapchat use it airbnb use it stripe use it it’s used a lot uh in finance you know to
[00:06:08] sort of guarantee the completion of transactions and stuff like that so so yeah temporal now
[00:06:14] finally um supports dot net which is kind of what piqued our interest right okay so we’re
[00:06:24] based on that um but like so um my my uh my thinking behind it is like you were saying
[00:06:31] let’s say i have a number of systems that are tied together they don’t have to be microservices
[00:06:36] they can be monoliths they can be whatever absolutely monoliths whatever and a number of
[00:06:41] like apis that i want to call maybe i’m handling payment of a using like stripe or something right
[00:06:47] yeah and and uh in previous years i’ve used something like perhaps rabbit mq to place a job
[00:06:54] and then a bunch of different services would maybe watch that queue and say oh that job’s for me take
[00:06:59] it off the queue i’ll run the thing and then maybe i’ll crash or maybe i’m having to be interrupted
[00:07:05] or something and then where’s that job gone right yeah is that what that solves yeah it is yeah so
[00:07:11] i mean there’s like a bunch of different techniques for that i mean i’ve also built
[00:07:14] that kind of outbox um sort of system as well you you end up having different sort of recovery
[00:07:21] strategies don’t you so you end up like either having like compensating transactions or like
[00:07:24] transactions where you have to let’s say you’re taking a payment for something that you then can’t
[00:07:28] book you end up having to you know have another process that backs out that that um transaction
[00:07:34] to keep everything consistent um temporal uh takes a lot of that pain so basically you
[00:07:41] you hand control of the status of you know where you are the in that workflow to temporal and
[00:07:49] manage for you um how to recover so it will know which
[00:07:54] um sort of activities have completed so you know did the strike payment go through did the
[00:08:00] um did the inventory was the inventory actually available you know all that kind of stuff and
[00:08:06] you can basically then focus on the the what of of the activity not necessarily the sort of
[00:08:13] worrying about the plumbing of of you know making sure that you can do recovery and make sure that
[00:08:18] things are consistent um so that that’s really what um
[00:08:23] uh
[00:08:24] temporal’s there to do one of the things that’s really cool about it that’s um
[00:08:27] that i found interesting in their approach was that there are some other systems around that do
[00:08:34] something similar to temporal but it effectively like ships data to like a central cloud service
[00:08:40] and if you’re in a an organization that has some you know security concerns or is handling
[00:08:46] sensitive data you can’t you can’t really do that you can’t really use those you can’t ship off i
[00:08:51] don’t know people’s account details into some unknown third party system so you can’t really do
[00:08:54] that um so in terms of your hardware you can’t do that which is the reason why i don’t think that
[00:08:57] it’s so the way that temporal gets around this problem is that they actually
[00:09:01] you install the workers as they call it um in your environment so that could could be on the cloud
[00:09:07] you know if your company’s company you know got private cloud or something it could equally be on
[00:09:11] a bunch of vms or whatever and then it’s only it’s receiving its instructions to do things from
[00:09:18] the temporal um from the temporal server itself which is either hosted again yourself um
[00:09:24] uh it’s entirely open source so you could literally run the whole temporal environment
[00:09:29] um yourself if you wanted to or they provide a like a sas cloud environment that allows
[00:09:34] um the workers to be you know sort of marshaled by the by the um by the cloud system but the
[00:09:41] great thing is you’re not shipping any data at worst you’re shipping uh keys you know sort of
[00:09:47] primary keys or or you know external id keys and then even then they have a way of encrypting those
[00:09:53] so that they can’t see them and neither can you know neither can anybody else that’s observing the
[00:09:57] server so they’ve they’ve thought hard about um how to do that in a more secure environment which
[00:10:04] i guess is another reason why it gets picked up a lot in finance and and that kind of stuff and
[00:10:08] right right i mean that that’s the the fact that they’ve thought about that is is a brilliant um
[00:10:17] brilliant thing because like like you’re saying right if i’ve got some maybe some cyber security
[00:10:23] books or a security policy that says like you say don’t yeah do not send this data anywhere yeah
[00:10:29] and i’m like but we’ve architected the app so that we have to send the data somewhere
[00:10:33] yeah yeah yeah yeah i mean the um the the thing about um all of these systems regardless of
[00:10:41] temporal and the things that are potentially difficult is that you need those activities just
[00:10:47] to be idempotent so and that can sometimes be um
[00:10:53] you know more difficult uh than you think so um it’s not it’s not anything to do with temporal
[00:11:00] it’s just about building reliable distributed systems right that you have to be able to
[00:11:04] architect your system in a way where you can make calls to uh something you know more than once
[00:11:11] and it’s state change only changing on the first time you know so there’s no side effect of calling
[00:11:18] um that thing you know multiple times um
[00:11:23] so you have to bear that in mind in terms of like distributed systems and like building
[00:11:28] distributed systems and stuff and there’s plenty of plenty of techniques for doing that but once
[00:11:32] you get your you know your teams and your people’s heads around how to do that um then it becomes
[00:11:40] really easy i mean some of the code that we’ve we’ve done some comparisons between uh code we’ve
[00:11:46] written ourselves to do the things that temporal do and then um you know a temporal solution and
[00:11:53] like shrinks like crazy it’s it’s really um probably we reckon about 35 of the code that
[00:11:59] we wrote was just like glue for making these things like you know act properly and they’re
[00:12:04] still probably not doing the complete job that temporal’s doing but you know with none of the
[00:12:10] code which is like super good right yeah right the last code that i write it means the last code i
[00:12:18] have to look after right yeah yeah it’s kind of like every you know line of code
[00:12:23] is an opportunity to get something wrong right so uh so yeah the less code i write the better i look
[00:12:28] you know absolutely that’s what we do this for right yeah and uh and i guess because they are
[00:12:38] like the experts at writing all of this stuff that helps wire stuff together
[00:12:42] you know that it’s going to be battle tested right yeah they’ve um i mean the guys that
[00:12:48] actually are behind uh temporal that founded it um if you’ve ever used a
[00:12:53] durable tasks in um uh from uh microsoft or you’ve used azure event hubs or service bus
[00:13:01] or any of those big services they’re the same people um so the the couple of the founders
[00:13:08] they basically were working at microsoft they then got lured over to um uber um which uh they
[00:13:15] then developed an open source platform that was sort of the precursor to temporal which is called
[00:13:20] cadence um it didn’t have a dot net
[00:13:23] um sdk i believe it was like predominantly supported by go but i think the go community
[00:13:28] um it was very popular in the go community um this in cadence and then that spawned temporal
[00:13:35] um which was sort of almost a sort of second go slash commercialization slash
[00:13:41] um let’s build more sort of um language support so off the top of my head they support not only
[00:13:50] dot net now which is their newest one but they’ve got um
[00:13:53] python typescript php um go um i’ve probably missed a couple of others but um you know they’ve
[00:14:03] got quite a lot of other um sdks and again if you’re in a sort of larger organization that’s
[00:14:08] pretty useful as well because um you know not perhaps every team is using dot net you know
[00:14:14] they’re using you know a combination of different languages and you can all still you know get into
[00:14:20] the temporal ecosystem and still be you know you know you know you know you know you know you know
[00:14:23] using you know activities and workflow in fact of there’s examples around of workflows where
[00:14:28] some of the activities are in dot net some of the exact activities are in go and like basically
[00:14:33] temporal will will will deal with all of that for you right right and and you know that makes
[00:14:40] perfect sense right because like you said you’re if you’re in a team where you’re using shall we
[00:14:46] say the best tool for the job and you know i’m very aware of the the show that i produce but
[00:14:52] dot net isn’t always the best tool for the job and you know i’m very aware of the the show that i
[00:14:53] produce but dot net isn’t always the best tool for the job right the same that term with it like
[00:14:56] typescript isn’t always the best tool for the job yeah python isn’t always the best tool for the job
[00:15:00] or even go isn’t the best tool for the job all the time right if i’m going to write for instance
[00:15:04] a a video game that is going to target like home video game consoles all right i may use the uh the
[00:15:12] godot or godot um uh ide but i may not be actually writing go itself right whereas i might want to be
[00:15:22] using unity or something like that right so i’m going to write a video game that’s going to target
[00:15:23] or unreal or any of those big ones and some of those have dot net stuff in them but um you know
[00:15:28] and if i’m doing machine learning stuff like maybe i’m doing some actual building the machine learning
[00:15:33] stuff rather than using an api the python is probably the best way to go so yeah i i really
[00:15:37] like the idea that um there are multiple different um language uh how do i put it so it sounds like
[00:15:45] there there’s an sdk for a bunch of languages but itself is not sdk specific right it’s like
[00:15:51] agnostic to
[00:15:53] i said sdk i meant languages but you know what i mean you know what i mean right yeah indeed yeah
[00:15:58] i mean the other the other couple of cool things and it takes you a little while to get your head
[00:16:02] around um this and and again this isn’t necessarily a temporal thing although they they sort of
[00:16:07] highlight it to us is your workflows we as dot net developers typically think about workflows
[00:16:12] as being fairly short-lived things you know it could be you know to your example it could be like
[00:16:17] a e-commerce transaction or something where you’ve got to do a bunch of things fairly quickly
[00:16:21] you know you’ve got to move some
[00:16:23] inventory you’ve got to take a payment credit card or whatever when you talk to the temporal
[00:16:27] guys and look at the way that they’ve done some of their work is they have a they have stuff that
[00:16:33] can run for years so for instance they’ll kick off a workflow for one of their customers kicks
[00:16:39] off a workflow when the customer’s created and that workflow is like managed by temporal for
[00:16:44] as long as that customer is a customer so it could be you know i don’t know occasionally
[00:16:50] sending out an email to you know welcome
[00:16:53] happy birthday or something or sending them promotions or whatever so they see they see
[00:16:57] workflows as like lifetime things um and the the great thing about um temporal is it manages all
[00:17:03] of those resources for you so if you imagined me and you trying to do that we’d end up standing up
[00:17:09] i don’t know a running service or something that was constantly polling the data looking for you
[00:17:15] know eligible customers or something you know you’d be burning some resources looking at that
[00:17:20] and that’s not how they that’s not how they do it
[00:17:23] that so you know if you’ve got like a million customers there the temporal system dehydrates
[00:17:30] everything that isn’t relevant um and only hydrates the workflows that um have an action to perform
[00:17:36] so you end up with this sort of super compressed um uh sort of situation where you’ve got like
[00:17:44] really high density you know you could have like millions of workflows but they’re not
[00:17:47] they’re not actually active at the moment so they’re not consuming resources and that’s quite
[00:17:52] difficult to do yourself in the .NET world I mean we’re I think you already know but we’re big
[00:17:58] Orleans users and Orleans has something in it which does something it’s in some respects a
[00:18:03] durable execution framework or platform rather than a framework it just doesn’t have any of
[00:18:09] the semantics of temporal but you could definitely build a you know a temporal like system on top of
[00:18:13] Orleans if you wanted to and that also has a you know a way of um uh expiring kind of you know um
[00:18:21] grains as they call them
[00:18:22] which are effectively actors and you know put them to sleep until they’re till they’re needed so
[00:18:26] um yeah when you start to get like start to get some of that capability together you you can build
[00:18:33] some things in some really interesting ways that wouldn’t always be like options you would choose
[00:18:38] you know be like oh wow okay that means I could do a this thing you know so yeah workflows can be
[00:18:44] minutes seconds weeks months years long um the temporal doesn’t care right okay
[00:18:52] so like a question that I just sort of had whilst you were talking about the the long-lived nature
[00:18:59] I suppose of workflows is that like and it’s going to be hyperbolic and it is going to be um
[00:19:05] a bit of a a leading question I suppose but like why do I need this if I’ve got hang fire
[00:19:12] yeah yeah yeah yeah so so I mean obviously apart from the semantics of having to
[00:19:22] write a really good hang fire job that’s executing the fact that you’ve got something that’s kind of
[00:19:28] like constantly polling constantly making an assessment for um for work to do that’s sort of
[00:19:36] taking resources right it’s kind of like even if that job’s like super efficient you know it’s
[00:19:41] having to make you know do I need to do any work kind of thing uh decisions where
[00:19:45] temple’s kind of like inside out it’s kind of like it only is executing things it knows
[00:19:52] has work to do so you don’t have to have a you know consuming any resources that might be I don’t
[00:19:58] know trawling a database table or looking at queue or or something else looking for work um
[00:20:04] that basically the way it works I think is it keeps like the metadata kind of contained within
[00:20:10] its system so it kind of knows when it needs to work up wake up workflows or activities and then
[00:20:16] kind of like does some does some work against them um I think they’ve just introduced um
[00:20:22] an equivalent I suppose of hang fire which is you know what they use I think they call cron jobs
[00:20:27] which is being able to do instead of like event driven triggers um for execution it’s basically
[00:20:33] time-based you know so you can say like oh every 60 minutes you know go do this kick off this
[00:20:38] workflow or kick off this activity but but they’re predominantly looking at doing things through
[00:20:45] eventing you know so it’s kind of like is this customer has this customer event occurred yes
[00:20:52] so there’s a subtle difference there but it’s really important when you get to big scale
[00:20:56] sure and and that makes sense right that’s that’s why I asked that question yeah it’s like somebody
[00:21:05] out there will be thinking yeah what is the difference and you know there is a difference
[00:21:10] and it’s a initially a subtle difference but it will make a big difference when you’re um
[00:21:16] you know designing and architecting your apps right yeah yeah I mean it um temporal if you
[00:21:21] wanted like a a
[00:21:22] a good analogy and a like a saga pattern is probably um a really sort of close
[00:21:29] uh kindred spirit of of temporal you know so like you know if you’ve um trying to think of a good
[00:21:35] dot net one now but um there’s a couple of good um dot net implementations around of like the
[00:21:42] saga pattern which is doing kind of orchestration and understanding where it is in that orchestrative
[00:21:48] pattern and you know managing all of that um
[00:21:51] temporal’s
[00:21:52] very similar to that um albeit it’s kind of out of process not in process so
[00:21:57] so if you’re doing some sort of saga you know again you can do saga pattern with all lanes you
[00:22:02] know we do we’ve done that a lot um so there was definitely some there’s definitely some overlap I
[00:22:08] mean there’s one of the the other couple of things I’ve mentioned up to now is actually the
[00:22:13] post go live right so you’ve probably built um systems like this as well where
[00:22:18] if you’re in a distributed system something’s gone wrong
[00:22:22] you know you’ve had a customer complaint where they I don’t know they receive the it’s been
[00:22:26] delivered email but it’s nothing’s been delivered or something and you’re like right okay well what’s
[00:22:30] happened then because you’ve had all of these sort of isolated activities or steps in you know
[00:22:36] that have sort of had to happen but unless you’ve been really cute with kind of like uh observations
[00:22:43] and using spans and stuff like that you’re into like a really deep investigation inside logs
[00:22:48] trying to piece together the timeline of of okay well this I
[00:22:52] see this activity happened at like 11 or 12 and 300 milliseconds and this one’s happened and you
[00:22:58] end up you’ve probably sat there before like me you know kind of like scribbling that stuff down
[00:23:02] trying to figure out you know which order these things happened oh no that one threw an exception
[00:23:07] but oh well what time was that you know and was that utc was that like local time you know so
[00:23:12] um quite difficult sometimes to debug that distributed stuff whereas temporal actually
[00:23:17] gives you this really nice um ui basically i mean you can look at it in the ui but you can
[00:23:23] actually also pull it um pull it as logs and it will basically run you through you know the retries
[00:23:29] all of the sequencing all of the success all the returns you can actually get like it actually
[00:23:35] shows you snapshots of the of the inputs and the outputs to activities so in the context of an api
[00:23:41] that would be well here were all the inputs that went into that api this was the return codes that
[00:23:45] we got from the api um
[00:23:47] um
[00:23:47] you can do this really nice sort of investigation but not only that you can so if that shows you a
[00:23:53] problem like a transient problem say in production but you’re like okay well we can’t reproduce this
[00:23:58] and test you can actually ask temporal to give you a copy of that um activity journal i suppose
[00:24:05] for want of a better word and then you can go and take it to your local dev environment or some other
[00:24:09] environment and replay it and ask them ask temporal to replay it while you’ve got the
[00:24:13] debugger attached to basically which is like super super cool
[00:24:17] so you can take a real world sort of production you know weird edge casey kind of um you know
[00:24:26] workflow type issue and then go replay as many times as you like in your dev environment without
[00:24:30] having to you know piece together all that test data and try and recreate all of those results
[00:24:36] and when i saw that i was like it just brings back so many memories of working very late at night
[00:24:41] trying to figure out um you know why some of these sort of really subtle things were happening and
[00:24:46] you’re like oh i can just go back to my workstation and like play it over over and over and over again
[00:24:51] with the debugger attached and figure out what what’s gone wrong you know which is pretty awesome
[00:24:57] and i’ve not i’ve not seen that anywhere else and uh that that really um really tends on to temporal
[00:25:03] right yeah because that that was always one of the big things when uh when i’ve worked with
[00:25:10] microservices like you said it’s like let’s say you have a chain of say six different i mean they
[00:25:15] don’t have to be microservices but six different services that need to take place you know we
[00:25:19] we talked briefly about perhaps an e-commerce system right so a customer interacts with a user
[00:25:25] interface to buy uh a thing right let’s say it’s an amazon or whatever right uh they go to
[00:25:31] my website.sale or whatever and say i want to buy this thing right when they when they complete that
[00:25:38] transaction there’s actually a bunch of things that need to happen and they can happen asynchronously
[00:25:43] but we tend to if you’re coming
[00:25:45] directly from an asp.net core mvc razor pages sort of thing um we especially if it’s a monolithic app
[00:25:52] we tend to do them synchronously right so it’s like uh go to you know do something in stores to
[00:25:58] actually put that inventory to one side then go process the payment when the payment processing
[00:26:02] comes back which will be each of these will be asynchronous but we’re doing them almost
[00:26:06] synchronously one after the other um and then it’ll be like right okay send a message to the
[00:26:11] the picking team so they’ll go out and pick the uh the inventory off the shelf and then they’ll
[00:26:15] go get the data from the the client database that or the customer database sorry that gets the
[00:26:22] information on where to send it to and things like that and then there’s this whole process
[00:26:26] involved in actually going from user has clicked buy now all the way through to putting it on the
[00:26:32] lorry and it delivered being delivered at their house whereas you know like you’re saying splitting
[00:26:38] those up into services where you can in my past it’s been putting a job on a queue and everybody
[00:26:42] looks at the queue and pulls the correct job to run and it’s like oh i’m going to do this and i’m
[00:26:45] going to run and then puts maybe a different job on the queue but it sounds like like in the in the
[00:26:50] past when i’ve done that uh like you were saying like debugging that entire journey is is horrendous
[00:26:56] if you split up into small uh services because then you’re like well where where did it get to
[00:27:02] like was it running these services in parallel was it running them in in serial or one after
[00:27:09] the other and and where did it break and how do we how do we get to that point fix that and
[00:27:15] send it back through right do we have to start back at the beginning or can we just send it back
[00:27:18] to that yeah that one step that fell over and carry on from there so yeah you end up writing
[00:27:23] something to hack it back together don’t you yeah yeah yeah yeah yeah so being able to debug that
[00:27:31] process is like a godsend yeah yeah definitely i mean i mean there’s there’s sort of two shifts
[00:27:37] that i suppose let’s just stick with the e-commerce system and when the first shift is
[00:27:40] making it asynchronous at all right because um perhaps
[00:27:45] um developers maybe uh earlier in their careers you know it’s quite nervous to say
[00:27:51] you know you’re effectively saying accept the order not process the order so you’re you’re
[00:27:56] basically returning the control back to the user and saying hey you know we’ve got your we’ve got
[00:28:02] your job we’re you know we’re doing it um and temporal allows you to have both scenarios so
[00:28:08] you can basically like execute a workflow and then wait for that workflow to to finish but
[00:28:14] obviously most um
[00:28:15] e-commerce being a good one you know you you want to execute the workflow but just immediately
[00:28:20] return back to the and then let the effects of the activities sort of drive the flow so
[00:28:26] i guess in the e-commerce world like you said you’d be off to do the picking you’d be off to do
[00:28:31] the uh send the email for you know confirmation then you would like kick off the billing and you
[00:28:37] know and sort of do all of that stuff whilst the customer has not gone on with their day basically
[00:28:45] assume that everything’s all fine and dandy and then you need you know quite sophisticated systems
[00:28:52] to make sure that that’s the truth right so even if there is a failure or there is a transient or
[00:28:57] not or oh by the way you’ve sold something that you know because of our eventually consistent
[00:29:03] logistics system we don’t actually have at the moment so this won’t be here now until
[00:29:09] thursday instead of you know ship next day who do we tell so all of that kind of intricate
[00:29:15] flow when you when you disconnect things um needs to be managed by code right and um things like
[00:29:21] temporal um all lanes there’s you know lots of other different um systems we can do that but
[00:29:27] like temple makes that much easier because you can just focus on the code the implementation for
[00:29:32] each of those activities and then sort of put them in a workflow and then the workflow chain itself
[00:29:37] is sort of almost self-documenting and then you can kind of like you know once you’ve tested those
[00:29:45] somehow this job is going to get to completion as long as you’ve got activities for each one of
[00:29:50] the sort of situations it’s just going to work you know the customer you know might receive an
[00:29:56] email that says hey look this is going to be a couple of days longer or by the way you know we
[00:30:00] need you to give us different credit card details because we’ve tried those and they don’t work or
[00:30:04] something anymore you know we did like pre-validation and for some reason post-validation
[00:30:09] they don’t they don’t work anymore or something but i think they’d rather they’d rather receive
[00:30:15] waiting waiting waiting you know for the for the transaction to happen in real time and then
[00:30:22] if it doesn’t you know or times out or crashes or whatever then you know it’s a bad bad experience
[00:30:26] you know but it puts all the complexity back in mind in your lap right as software developers
[00:30:31] do you have a wpf application and want to take it to mac os or linux avalonia xpf a binary
[00:30:38] compatible cross-platform fork of wpf enables wpf apps to run on new platforms with minimal
[00:30:45] effort and maximum compatibility with a few tweaks to your project file your wpf app and all
[00:30:52] of its dependencies are ready for testing on new platforms start your app transformation journey
[00:30:58] with a 30-day free trial head over to avaloniaui.net forward slash the modern.net show to
[00:31:07] get started today or press the link in the show notes as it will have the full url http timeouts
[00:31:15] in software it’s not a matter of if things fail it’s a matter of when one mishap like this and
[00:31:23] some valuable data is lost forever and these failures occur all the time but it doesn’t have
[00:31:31] to be this way introducing end service bus the ultimate tool to build robust and reliable systems
[00:31:38] that can handle features gracefully maintain high availability and scale to meet growing demand
[00:31:45] for more than 15 years end service bus has been trusted to run mission critical systems that
[00:31:51] must not go down or lose any data ever and now you could try it for yourself end service bus
[00:31:59] integrates seamlessly with your.net applications and can be hosted on premises or in the cloud
[00:32:05] say goodbye to lost data and system failures and say hello to a better more reliable way of building
[00:32:12] distributed systems try using end service bus to build robust and reliable systems
[00:32:15] today by heading over to go.particular.net forward slash the modern.net show and start
[00:32:23] building better systems with asynchronous messaging using end service bus there’ll be a full link in
[00:32:29] the show notes so give that a click well i guess i guess it takes the complexity of like you said
[00:32:35] wiring it all up figuring out how do we go from a to b to c to d we’re just focusing on a b c and d
[00:32:45] exactly that yeah yeah you kind of uh don’t have to hold the entire mental model like in your head
[00:32:52] at any one time and what we do is stuff that’s non-trivial is we actually produce um swim lane
[00:32:57] diagrams you know the ones with like sort of where you have like columns and then you’ve got like
[00:33:01] flow chart objects typically and we’ll have a swim lane per external service or external component or
[00:33:09] whatever and then we sit there and we draw it out so we you know have activities as a certain shape
[00:33:15] workflow as a as a different shape and then um and then we sort of do all of that planning up front
[00:33:23] so that we have a good idea of the structure of the workflows and the structure of the activities
[00:33:28] and who’s got to do what you don’t necessarily need to know exactly what the code implementation
[00:33:32] is going to be that helps a lot i think with um figuring out the elegance of of the workflows and
[00:33:39] the you know you don’t suddenly you know have a somebody say oh yeah but what about this scenario
[00:33:44] what about this scenario i mean it’s it’s it’s it’s it’s it’s it’s it’s it’s it’s it’s it’s it’s it’s it’s
[00:33:45] it still happens occasionally but you’ve done a lot more planning up front
[00:33:49] right right and and like you say you’re able to then concentrate on the important bits that
[00:33:57] we have to cut like okay so uh i’m gonna go on a bit of a rant and it’s got nothing to do with
[00:34:03] temporal right but i feel like i need to get those off my off my chest right um uh the the
[00:34:08] devops movement is fantastic and it’s great um but the the problem that i feel it has caused is
[00:34:15] it’s become developers focusing on infrastructure and on how all that works and how all it’s all
[00:34:21] glued together and how the process works whereas actually realistically when you dial when you
[00:34:27] boil everything out dial everything down metaphor your metaphor the way out of it um you you
[00:34:33] actually find that you know we should be writing the code which produces the results that the
[00:34:38] business wants um yes we should probably have our finger on the pulse of how it’s going to get
[00:34:45] developed and deployed and how it’s going to live in the world but realistically we are hired
[00:34:51] we’re hired to do a whole bunch of stuff but one of the things we’re hired to do is to turn that
[00:34:55] human language business logic into computer language business logic um and i like the idea
[00:35:01] that that temporal from the sounds of it allows me to not worry about how these things are connected
[00:35:08] together and how we communicate across them i can just say hey i have service it could be micro
[00:35:13] could be monolithic could be whatever
[00:35:15] a over here service b over there and see service c over there when app talks to service a somehow
[00:35:24] we need to get a message to both b and c and both of those need to send a message back to app
[00:35:30] somehow i don’t care how yeah i will tell you what a b and c need to do because i will give you the
[00:35:35] code for them and i will tell you what app needs to do because i’ll give you the code for them
[00:35:39] but i need you to figure out how to glue it all together yeah that sounds like that’s the case
[00:35:44] is that the case yeah it does it’s a good idea
[00:35:45] definitely yeah that’s exactly yeah i mean you have these things called queries and signals
[00:35:48] in uh temporal um which allow uh workflow to you know tell the world you know where they are
[00:35:56] what they’re doing and stuff like that so you can like you know obviously listen to
[00:35:59] listen for signals which are like raising events basically and you could also query a workflow as
[00:36:05] well so um you know if you want to build a ui or uh for example with our e-commerce example where
[00:36:11] we’d be like hey i’d like to know where you know where is my order or whatever you could
[00:36:15] you know put a page together that’s sort of called this workflow query and it will tell you which
[00:36:21] activity is currently like working on um so you’ve got that sort of visibility but going back to your
[00:36:26] um going back to your devops point which is one of those things that i think was got
[00:36:32] widely misunderstood really and we um at plister we have um all we ask of our developers really is
[00:36:40] to have an appreciation of the of the infrastructure and sort of particularly
[00:36:45] responsibility for um you know what’s coming out from an observability point of view out of the
[00:36:52] software they’ve written um we don’t really we still it’s not a silo because you know people
[00:36:58] think oh silos is a negative thing but it’s more a case of you know these people over here have a
[00:37:03] really deep knowledge of you know rolling out azure this and azure that these guys over here
[00:37:09] have a really deep knowledge of like dot net they have a an appreciation of what each one of those
[00:37:15] sit in a huddle if they need to and kind of like figure stuff out but like you say this movement
[00:37:20] uh to a few years ago is kind of like implying that you know dot net developers suddenly had to be
[00:37:26] um you know experts in like all how many is there would you think 500 services in azure maybe 350
[00:37:35] or something um as well as being good dot net developers as well as being good you know
[00:37:41] business analysts and stuff i think um you know you you’ve hit the nail on the head
[00:37:45] really we’re as developers responsible really for the validity and the quality of the code that we
[00:37:52] that we produce i’d much rather developers were sort of focused on you know the correctness of
[00:37:58] what they were doing than worrying about you know um you know some bit of tin somewhere sitting in
[00:38:04] you know sort of some data center in in azure you know i just don’t think that’s
[00:38:09] i’m sure it wasn’t intended that way but that’s how it got interpreted by a few people right do
[00:38:15] i agree completely yeah um i think that um in my opinion devops itself is more of a uh a what is it
[00:38:26] it’s not like a community it’s like a mindset yeah right yeah you you wanted to be building
[00:38:32] the solution not just the apps but the entire solution how how the infrastructure is held
[00:38:37] together and how it’s deployed and things like you want to build the solution with a with the
[00:38:42] mindset of everyone needs to sort of like
[00:38:45] work together as a uh as a in a specific way to make that happen yeah it’s an attitude isn’t it
[00:38:51] really yeah yeah yeah that’s it right and and devops itself for my from my perspective isn’t
[00:38:57] a role itself right it isn’t a responsibility that anyone a person has you’ll have infrastructure
[00:39:03] people you’ll have developers you’ll have operations when you throw other words in like
[00:39:08] dev sec ops and that becomes about development security and operations it’s not that the
[00:39:13] developers themselves have to deal with this
[00:39:15] security it’s that security is involved from day one yeah yeah exactly that that’s what that’s all
[00:39:20] about yeah yeah you’re right i mean you’ve probably um you know i’ve been doing doing this a long time
[00:39:26] unfortunately now unfortunately depending on the point of view i’ve worked in organizations where
[00:39:31] developers would put software on the end of the shovel and like ping it over the fence you know
[00:39:36] and then infrastructure people would like ping it back at them and say it doesn’t work and there
[00:39:40] was like neither of those two groups much liked each other or saw each other’s point of view
[00:39:45] and it just ended up with a lot of political time wasting going on and that so i guess the
[00:39:50] movement was trying to say hey look you guys have all got skills or girls you know i’ve all got
[00:39:55] skills um let’s all work together towards the common goal which is to your point you know
[00:40:00] shipping a shipping a working solution right so um like you say it’s a mindset i mean it does
[00:40:06] drive you bonkers though because try try uh advertising for a job role now for somebody
[00:40:12] that’s in infrastructure that you can’t where you don’t use the word infrastructure and you can’t
[00:40:15] devops like nobody applies for it because they don’t know what it is so you have to use the word
[00:40:21] in order to get people to oh right okay it means this you know so okay if you like you know um
[00:40:28] but yeah so it does irk me a little bit and i have to throw the word around but like you say
[00:40:32] it’s a culture not a not a skill you know yeah 100 so then i guess sticking with that devops
[00:40:40] idea right somebody may be listening to this and going but but kubernetes lets me
[00:40:45] do durable things right in that like i could put all my all my code in pods and if a pod dies it
[00:40:50] will start it back up yeah but that that’s different to temporal right because my so my
[00:40:55] understanding is if if i have a service that is being hosted by temporal and that service goes
[00:41:01] down the work that it was doing can still be sort of rescued is that right whereas like with
[00:41:08] kubernetes if i have some code in a pod and it’s processing something and then the pod goes down
[00:41:14] and is replaced by a different pod and then the pod goes down and is replaced by a different pod
[00:41:15] then that processing is gone right all that data is gone that’s right you’ve lost am i on the right
[00:41:21] lines yeah you’re right yeah i mean um i mean we actually use uh the temporal workers uh we should
[00:41:30] probably roll back a little bit so the the way that the dotnet implementation of the temporal
[00:41:35] works is really nice right so if you’ve if you’ve ever used asp.net um like service host or or um
[00:41:44] whatever the whatever the
[00:41:45] non-asp.net version of that is um you know you normally get a nice knot of extensions that say
[00:41:52] you know add tracing or add swagger or whatever you literally can say like add worker add temporal
[00:41:59] worker and then you you know tell it where the server is and then you can start registering
[00:42:03] workflows so you can say like dot add workflows you don’t have to do them uh so compile time you
[00:42:09] can do them at runtime too so literally to get temporal up and running um in
[00:42:15] dotnet is like super super simple and what’s happening behind the scenes i believe is that
[00:42:20] it’s firing up um do you remember the background service sort of functionality they brought into
[00:42:25] dotnet core it’s firing that up and it’s basically bringing up the worker role um so it’s you know
[00:42:32] and then registering with the server to say hey you know i’m ready to do work and all that kind
[00:42:36] of stuff so if you then zoom out a little bit and think about okay so my dotnet code running in my
[00:42:42] pod you’re in a temporal world you’ve got a lot of stuff that’s going on and you’ve got a lot of
[00:42:45] your dotnet code which is running also this background service which has got the worker
[00:42:51] role in it and then that’s executing the um the activities that are handed to it by the um by the
[00:42:57] server so let’s say your kubernetes server you know decides this pod needs to be ejected
[00:43:03] evicted for some reason or like say crashes or whatever what happens is is that uh that obviously
[00:43:11] that pod dies new pod comes back online uh brings up the
[00:43:15] brings up the dotnet code just you know your just your regular you know exe or whatever that starts
[00:43:21] up the worker again the worker then like re-registers with this thing and says hey i’m
[00:43:25] ready to do work and the server will say well okay i’ve lost this other one and it was in the middle
[00:43:30] of doing this um and you know we saved this state um you know halfway through this activity or
[00:43:37] whatever and then it will just give that you know with the right if that’s the most important thing
[00:43:42] to do next because there’s a whole bunch of policy stuff and and
[00:43:45] i won’t go into right now but let’s assume that for now there’s nothing else to do it will just
[00:43:49] basically pass it that job and say here’s where you’ve got to here’s the state that you were in
[00:43:53] off you go and it will just you know pick up where it left off kind of thing um so it’s actually
[00:43:59] doing two things it’s not it’s not just running it’s not marshalling you know the running of
[00:44:05] code it’s also saving state uh i mean i’ve seen people build a fairly rudimentary sort of whole
[00:44:12] actor system just in temporal because you know you could literally
[00:44:15] um like actually the way that it follows the same rules actually as um json uh the new system.json
[00:44:27] namespace so if you could serialize the object you don’t even have to you could just have like
[00:44:32] objects in your executable code and never have to save them and never have to persist them anywhere
[00:44:38] because temporal does it for you so you could just basically like live off of local variables
[00:44:42] if you wanted to um uh and
[00:44:45] and it had it sort of basically um will dehydrate anything that’s running in that um or the values
[00:44:53] of any of those things in the in the activity and then rehydrate them again when it’s um needed you
[00:44:58] know if it’s died or because that activity needs to run again or whatever and um yeah it uh it
[00:45:05] handles all of that so so you sort of get this state persistence as well as as well as sort of
[00:45:10] temporal’s workflow marshalling i guess you’d call it you know which is pretty neat
[00:45:15] no i i like that because like like you said um i want to be able to to to persist something as i
[00:45:24] move from state to state because otherwise i’ve got no idea what happened right and we’re back at
[00:45:30] that position we talked about earlier on where you’re sitting there at two o’clock in the morning
[00:45:34] and you’re reading five different logs from five different services trying to figure out where did
[00:45:40] my processing get to and uh and you know let’s not talk about how people don’t log enough to the
[00:45:45] when they’re making their services staring into the darkness yeah yeah yeah yeah okay so like
[00:45:54] right okay so we’ve we’ve talked about how there’s a sdk for it for.net like how do i get started is
[00:46:02] it just like pull in a new get package add a line or two to maybe my app services.json or
[00:46:09] app settings sorry.json and away we go yeah it is it is a sort of um you know like with all of
[00:46:15] these things it’s sort of graduated uh levels of customization you know in terms of like you know
[00:46:21] if you’re pointing at different bits of the server or whatever but it’s got some really nice uh
[00:46:25] opinionated defaults so you know you can just get yourself going really quickly like exactly to your
[00:46:31] point you know pull the.net uh the new get package um probably add you know three or four lines
[00:46:37] depending on you know what you know what you’re doing with workflows and stuff and it’s good to
[00:46:42] go press f5 off it goes um and then you could
[00:46:45] jump into the uh ui i mean there’s a couple of different ways where you can set your own
[00:46:50] environment up in in um for the temporal server itself my favorite is to use docker compose so i
[00:46:57] use you know docker desktop and then use docker compose to bring up the um the temporal server
[00:47:04] but you don’t have to do it that way you could either have a local install in your dev environment
[00:47:09] somewhere if you’re sharing with you know other developers or i believe you can actually run it
[00:47:15] online so you can um they give you a sort of cut down version of um a bit like the dot net cli kind
[00:47:22] of command line you know they have like an equivalent temporal one and you can do you know
[00:47:26] temporal server style or something it’s just my preference is to do uh is to do it through um is
[00:47:33] to do it through docker but um and then you can immediately um so your code is up you can
[00:47:39] immediately go into the ui and it will show you the health of the worker and stuff so you’ll know
[00:47:45] you don’t even really need to register any like workflow or or activities you could just get
[00:47:50] yourself going with like two or three lines of code point it at your local docker environment
[00:47:55] or your local install and um and then you’re and then you’re up and running right okay and i guess
[00:48:03] i would need to do that on each of my things which need to live inside of a worker right
[00:48:09] yeah if you um uh i mean you don’t have to be like one for one
[00:48:15] um in fact the talk i did uh with temporal i sort of misdrew a diagram which i didn’t realize that
[00:48:22] the diagram was wrong actually until i actually um did this sort of presentation so i sort of
[00:48:27] implied that there was like a worker per um instance so like let’s say you had a like an
[00:48:33] e-commerce uh system and it was behind a load balancer and you’ve got i don’t know three
[00:48:39] instances of that uh or three pods say running in um you don’t you don’t
[00:48:45] need to have three workers you could like if you wanted the same code to just be running on every
[00:48:50] one of those pods but an equally valid way would be to leave the e-commerce system exactly as it
[00:48:56] was and then build a another little tiny piece of dot net that did nothing else other than
[00:49:01] start the worker process and then deploy that to a pod so that you had these kind of like three
[00:49:08] e-commerce systems all referring to with their temporal clients all referring
[00:49:13] uh to you know to the e-commerce system and then you could just run it on every one of those pods
[00:49:15] you know a single temporal worker um they’re incredibly efficient um and um they they
[00:49:22] obviously uh depending on the length of your activities and the length of your they can
[00:49:26] process you know um phenomenal amounts of um instructions and stuff so yeah you don’t have to
[00:49:33] you don’t have to do as my you know don’t you hate that when you realize like you died i’d spent this
[00:49:39] ages on this presentation it was only actually while i was presenting i was like this diagram
[00:49:43] is wrong
[00:49:45] but yeah you don’t you don’t need to have an instance um um per thing if you don’t want to
[00:49:51] um i would i would probably steer away from that actually i’d probably
[00:49:55] put it in a separate place to start with and then get comfortable with load and you know
[00:50:02] understanding um you know how how many of these workers do you need to like for your workload and
[00:50:07] then go from there right okay because yeah i can imagine that there is a a fundamental difference
[00:50:15] between how you’re going to um architect your application and services and stuff and so yeah i
[00:50:21] guess not starting with temporal all the things yeah yeah yeah it won’t be the best way to do it
[00:50:27] right yeah definitely yeah yeah i mean it definitely um the thing about understanding
[00:50:33] temporal as well as it gives it opens up the options that you as an architect you might it
[00:50:38] changes your uh cost value calculation a little bit you know as an architect i guess or as a really
[00:50:45] senior developer is you might want to put some some of this kind of extra resilience into the
[00:50:51] system but the cost of doing it uh is too high so you end up with like known fragility in your
[00:50:58] system and it’s you know good a reasonable payoff because you know that you can’t afford the cost of
[00:51:04] you know securing that particular transaction or whatever if you bring temporal to the story
[00:51:11] then those dynamics change completely so you can afford
[00:51:15] um make everything super robust super like they call it indestructible kind of um because there’s
[00:51:22] no the cost to do so is so low you might as well do it all which just generally means that you get
[00:51:28] you end up with a you know super robust system because no matter what smart decisions you made
[00:51:34] as an architect on a sort of roi basis that one thing you left as a you know as a thing that’s
[00:51:41] like hey like it’s very unlikely that’s going to happen you know we can’t afford
[00:51:45] the time or the money to to sort of shore that one up you know that that will bite you on friday
[00:51:50] afternoon at some point about four o’clock you know um so uh yeah it does change the the fundamental
[00:51:58] value decision making that you that you need to make when you when you when you’re building some
[00:52:04] of this stuff it’s it’s pretty easy to retrofit as well like if you’ve got um you know we’ve looked
[00:52:10] at some code bases that aren’t um temporal we we write pretty clean code so like you know we do a
[00:52:15] for instance like mediator so if you’re a um you know if you know if you have commands and command
[00:52:21] handlers and you know you’ve got some reasonable level of um separation of concerns in your code
[00:52:26] it’s really easy to um to temporalize it if that’s a word you know you can kind of um create a
[00:52:34] create a uh you know new class if you want uh or put in a new method and it’s literally like
[00:52:40] an attribute so if you’ve got um reasonable amounts of separation you could just um
[00:52:45] just like okay well what we’re going to do is we’re going to leave the current code as is we’ll
[00:52:48] take a copy of it we’ll put it in this new class with this new method and then we’ll put you know
[00:52:53] the the correct um uh sort of attributes on it to decorate it and then we’ll have some feature
[00:52:59] switches or something that could like switch between like how we used to do it and how we’re
[00:53:03] doing it now we’re temporal and and um you know if you’ve got a big ball of mud that it’s obviously
[00:53:08] going to be a little bit more difficult but um but that’s true of any any refactoring right um
[00:53:15] but yeah we’ve we’ve definitely looked at some some some stuff we’ve built for clients and said
[00:53:20] hey the next time you want us to do some versioning we’ve got this idea where we can
[00:53:24] you know we can do like a big improvement but we can move you know this code from here to
[00:53:29] and what we did which was you know sort of our poor man’s version of temporal
[00:53:33] to to temporal you know um in a really easy way and um then they just get a much more robust system
[00:53:39] almost for free all right okay yeah that’s the that’s
[00:53:45] the the thing that uh like i said it’s important to to sort of point out that you really do kind
[00:53:52] of need to rethink everything but like you said it gives you the the the different um things you
[00:53:58] can add to this particular solution that you can’t really add to others um i like that i think that
[00:54:05] so like if i’m if i’m gonna you mentioned a few times they they have their own hosting platform
[00:54:12] that i can host my apps in yeah if i use
[00:54:15] temporal like do i have to use that or can i go hey i want to host it on azure or aws or things
[00:54:22] like that like am i tied into their service yeah sure okay so yeah the only the the the cloud bit
[00:54:29] that they have provides is just the um temporal server so you don’t have to you know move your
[00:54:36] workloads or you know move your apps or anything like that it’s literally the the back plane if
[00:54:40] you like of temporal um they have a like a sas service which is
[00:54:45] you know automatically scales and you know um super secure and all of those good things that
[00:54:50] you’d expect from a sas platform but you absolutely don’t have to do that um uh you can um you can run
[00:54:58] the whole temporal server yourself um you know from docker containers for instance so you could
[00:55:04] um put it wherever you like you know aks eks um vms whatever you you can even not run it in
[00:55:12] containers i believe i think you can literally you know download the
[00:55:15] there’s a lot to it um so certainly the guidance we’ve been given unless you’re really proficient
[00:55:22] at like progress um and elastic search and you know one or two other tools um don’t run it in
[00:55:31] production unless you really know what you’re doing because it is the i guess the single point
[00:55:35] of failure so if your temporal server was to go offline or be broken or not be performant then
[00:55:42] you’re going to break the the performance of the whole thing
[00:55:45] because uh the workers won’t get their you know won’t get told what to do they won’t be able to
[00:55:50] reliably uh send their updates all that kind of stuff so um i’d probably advise if unless you had
[00:55:57] if you looked at the stack and said we’ve got deep skills and all of these things don’t worry
[00:56:01] then great but if you didn’t i would i would um i would go with the temporal cloud thing because
[00:56:07] it’s um it’s super cheap you mentioned there about if the temporal service falls over then
[00:56:14] you need something else
[00:56:15] then then that’s your single point of failure so yeah clearly we need temporal for temporal right
[00:56:19] yeah yeah that’s right i mean the workers themselves will will carry on you know doing
[00:56:25] the work that they’re doing but of course they can’t phone home so they can’t say that the
[00:56:29] you know hey this activity’s finished and stuff um so you know if you were then to get a sort of
[00:56:35] cascading your failure i don’t know i mean it’s pretty going to be pretty rare but if you had
[00:56:40] like a temporal server that was offline or broken and then you had a worker that was
[00:56:45] went then went offline after doing some new activity then um you’re going to lose you’re
[00:56:51] going to lose where it was because it will bring itself back online and it will obviously have all
[00:56:57] of its state that it had and you know will try and recover itself but it didn’t it didn’t get
[00:57:01] that information back to the server so it can’t say to the server hey what’s next for me kind of
[00:57:05] thing you know um so um you don’t get like day loss or anything like that but but it gets kind
[00:57:12] of stuck um because of the orchestration of that work and then you can’t say to the server hey what’s
[00:57:15] workflow and stuff is being done by that centralized environment which is why temporal
[00:57:19] themselves like people to use the temporal cloud system because it’s like uber resilient and
[00:57:23] i think i believe it’s all hosted in aws and they’ve got um you know a global uh environment
[00:57:30] where um europe and the us and you know lots of other places where they’ve got
[00:57:35] the temporal backplane available so it doesn’t doesn’t suffer with any
[00:57:39] even data center related failures you know it’s pretty pretty neat
[00:57:45] that’s pretty cool okay um so what about um examples and say killer apps that have used
[00:57:53] uh temporal right i know that they make a big deal on their website of saying hey these people use
[00:57:58] yeah our our stuff yeah but i was wondering do you know of any any examples where i know that
[00:58:04] um finding open source examples that use it might not be too easy to do but like do you know of any
[00:58:10] examples where people can could just like um take a look and go oh cool i get it now i’m going to
[00:58:15] know that’s why you yeah you you did it that way or whatever yeah that’s right yeah this is where
[00:58:19] um because the dotnet sdk is like new and by new i mean um i think the official ga i mean we were
[00:58:28] started working on it about 18 about 12 months ago i think 18 months ago maybe but only ga uh like
[00:58:34] a month ago i think six weeks ago maybe um the documentation they’re still catching up and uh
[00:58:42] there are a lot of um i wouldn’t call them
[00:58:45] hello world examples but if you go to the github sample there’s a there’s a sample for every
[00:58:51] feature of temporal you know written in dotnet there’s a really great guy over there
[00:58:56] um who did the the dotnet sdk and he’s put a lot of effort into showing how to use each one of the
[00:59:03] activities but the thing that’s missing at the moment and the thing that we’re like working with
[00:59:07] them is is how do you put all these things together in a best practice way to sort of show um
[00:59:15] you know to to show how to use it all in context and and that’s definitely missing
[00:59:19] um so um where we’re using it um we can’t share that code because it’s like a client project
[00:59:26] so we’re talking to temporal about maybe taking like e-shop or um you know some of the sort of
[00:59:33] more famous known sort of um exemplars i suppose you call them and then kind of you know take a
[00:59:41] fork of one of those and then temporalize it and then give it a little bit of time and then
[00:59:45] back to the community for free and say this is how you know an end-to-end application would look like
[00:59:50] using um i mean they do have end-to-end examples just to be clear in lots of the other languages
[00:59:56] so if you did know go or typescript or they’re the two i focused on then you could go and look
[01:00:05] at those and then there’s do the sort of translation in your head and say right oh okay
[01:00:09] i know what the equivalent of the dotnet version of this would be
[01:00:13] um but we we
[01:00:15] really want to work with them to you know get a bona fide e-shop like thing that you know everybody
[01:00:21] knows and loves um and go oh right okay i see what you’ve done here you know it’s like you know
[01:00:27] looks like this in dotnet and and um that that’s kind of what’s missing in the moment so yeah it’s
[01:00:33] it’s it’s early for sure right okay i mean that’s pretty cool that there’s there’s some samples
[01:00:41] that kind of lay out some of the features already because like yeah
[01:00:45] i can imagine that if the so we’re recording this feb 7th right so if the if the sdk is really
[01:00:51] only a month or so old then i can imagine we’re still in that ramping up stage of how do we you
[01:00:56] know what documentation do we need what examples do we need um and i like the idea that you’re
[01:01:02] saying about taking some of the dotnet stuff from the dotnet team like the eshop and containers and
[01:01:07] stuff and perhaps putting temporal behind it just as an example hey this is this is
[01:01:12] a well-known example that you can sort of you can see the value that you’re getting from this thing
[01:01:15] see how it would fit in this uh in this area that’s pretty cool yeah so um so what about i know
[01:01:23] i’m conscious that we don’t want to just be reading urls right i say this to everyone all
[01:01:28] the time i don’t want but uh like i’ll get some urls off of you um afterwards and i’ll put them
[01:01:33] in the show notes so folks who are listening in make sure you click press whatever to the full
[01:01:37] version of the show notes there’ll be a big big list of uh links to to check out but like where
[01:01:44] are some of the places that folks can go to learn about temporal i know obviously a little bit the
[01:01:48] website you’ve mentioned yeah the uh samples uh um repo you’ve also mentioned a couple of times
[01:01:54] you’ve given a talk on these things are these easy to find on the web so the talk um wasn’t
[01:01:59] recorded unfortunately but the deck is um currently being published so um and it’s a it’s a temple
[01:02:06] slash orleans um kind of talk that i did so i’m just talking to the temporal guys now about doing
[01:02:12] it like temporal only
[01:02:14] uh thing although i make it very clear in the talk that you don’t need orleans to use temporal
[01:02:19] and you don’t need temple to use orleans it was just like a um you know sort of if you wanted to
[01:02:24] build a really high performance um like workflow system this is one way of doing it um but um
[01:02:31] places to go where i um where i found useful definitely temporal’s youtube channel both their
[01:02:38] own channel and if you just like to um type in like temporal io as well you’ll find other
[01:02:44] people that have done um some talks but temporal have been really good right from the outset um so
[01:02:51] if you’re looking for primers on temporal you know done a better job of explaining the principles of
[01:02:55] temporal than than i have today um definitely go to youtube you can see some um some great 101
[01:03:01] stuff from them uh and 102 stuff from them about um that there’s it there’s actually a video on
[01:03:09] from chad who’s the guy who did the uh.net sdk where he talks to all the people who are doing the
[01:03:14] the back of the video about using the sdk but quite a lot of the video is about how he came to create
[01:03:20] it how he came to create the.net sdk and what that and what that took because it was non-trivial as
[01:03:26] you can imagine um yeah samples in dot in github um the trick i use um and there’s a few around now
[01:03:34] is if you go find the activity attribute um which i think is as simple as like square bracket
[01:03:41] activity something
[01:03:44] close bracket or look for the namespace i actually um search through github looking for the temporal
[01:03:50] namespace declaration and you can you know it pulls up what people are doing and and certainly
[01:03:56] over dot net there’s a lot more people doing some non-trivial stuff now there’s some people
[01:04:00] experimenting you can see with like logistics flows and stuff i see um which is you know one
[01:04:06] of the key you know one of the key um places where i sort of see it really shining you know
[01:04:11] people have got long supply chains
[01:04:14] and they’re they’re figuring that stuff out um the read me is really good because chad knew that
[01:04:19] it was going to take a while to get the documentation uh parallel with um with what’s
[01:04:25] already there so like the the actual read me in the in the in the dot net sdk is awesome he spent
[01:04:31] ages on it um and uh yeah i mean if you if you got stuck with a pacific um you know with a pacific
[01:04:39] thing or you just you know needed some more input then obviously you could reach out to me too
[01:04:44] um uh and i could put you on touch with you know one of our team members or or look at it myself
[01:04:50] whatever um so yeah it’s like like i say early but um but there’s you know quite quite a bit around
[01:04:56] and you’ll uh they’ve got a really good slack um uh sort of ecosystem as well so like the whole
[01:05:03] company temporal company uh is on slack and uh they invite um like the public basically into the
[01:05:11] same slack channel so um
[01:05:14] there’s one there for the dot net sdk and i’ve really seen over the last sort of two or three
[01:05:17] weeks the traffic um increasing in that lots of questions lots of people trying things out um and
[01:05:25] there’s a couple of of us you know people that don’t work for temporal that are in there kind
[01:05:32] of answering questions and then chad chad’s in there all the time as well so um yeah there’s a
[01:05:37] plenty of um uh what’s the word i’m looking for non-formal kind of um
[01:05:44] sort out there now and it’s very quickly going to become formal as they like you know bring it on
[01:05:48] par with uh with typescript and go and some of the other languages you know i i really like that
[01:05:54] there’s this community aspect to it where you can just jump in and ask a question that’s that’s
[01:06:00] always really useful especially if you’re like if if you are a let’s say you’re it doesn’t matter
[01:06:05] which um uh language or framework you use right but if you’re a developer and you’re like i want
[01:06:11] to check out this thing but it means i need to fundamental
[01:06:14] fundamentally rewrite the way i’ve written my apps i’m going to want to reach out to some folks
[01:06:20] to get help help first to make sure i understand how i’m doing it right so i fully appreciate that
[01:06:26] that’s there that’s pretty cool um so then just as we wrap up then what about getting into contact
[01:06:31] with you right if someone’s listening to this and gone um i need i’ve got this burning question to
[01:06:36] ask john and maybe you can like you said maybe you can put me in the right direction of of of
[01:06:40] the person to talk to or whatever um how does someone get in touch with you and ask you questions
[01:06:44] about getting in contact with you is it twitter slash x is it linkedin is it yeah what’s that
[01:06:49] process look like so i i have a really unusual surname which is cat and horn so uh i’m dead easy
[01:06:55] to find so but yeah you if you look for me uh like john underscore cat and horn uh on x slash twitter
[01:07:03] um uh you can find me there um you can also find me on linkedin um same name and uh yeah really
[01:07:14] um love listening to people’s challenges and uh and you know what if they’re doing cool things
[01:07:20] with with temporal or want some help with some questions and i’m then i’m always uh i’m always
[01:07:26] into that nice okay cool well um like i said earlier i’m going to make all of the uh all of
[01:07:33] the links and things available in the show notes so if you do want to click through and find out
[01:07:38] more about temporal or get in touch with john then that will all be there um and uh and i
[01:07:44] guess i guess that really all that’s left to say is thank you very much john for being on the show
[01:07:48] i know that i’ve learned a whole bunch of stuff i always say this right but i genuinely genuinely
[01:07:53] mean it right i came into this into this uh episode with like i know that temporal.io is
[01:07:59] the url and i know that temporal is a thing um teach me right but i genuinely i’ve walked away
[01:08:04] from this with like right okay i gotta go build something that i can maybe put in temporal and
[01:08:09] get my head around a durable workflow design because i’m
[01:08:14] pretty sure that there’s a project i’m working on that should be using um a a workflow like design
[01:08:20] yeah yeah it’s um well thanks a lot for uh having me jamie it’s been uh it’s been great to talk
[01:08:26] about uh temporal yeah i think um i think probably if we all looked at like various different things
[01:08:31] we’ve built especially if you knew temporal um you just could put it into pretty much any
[01:08:38] um you know sort of even small small apps and you get a big benefit from it
[01:08:44] um you know it isn’t it isn’t just like a full big full-blown enterprise thing you know
[01:08:48] um it’s a little bit of a learning curve to it but once you get your head around the learning
[01:08:52] curve just like with anything then you you’d be like oh yeah okay we need to send an email out
[01:08:56] and make sure that it does really go out okay let’s let’s do this you know um uh yeah it’s it’s
[01:09:02] it’s pretty cool and you’re going to see you’re going to see the temporal guys um bringing out
[01:09:08] some some even more uh interesting stuff over the next sort of six to nine months or so um and i’m
[01:09:14] um which and they’ll they treat the the sort of dot net sdk now it’s like what you know like what
[01:09:19] they call first class citizens so it’s kind of always going to be um parallel with you know all
[01:09:25] of the other stuff so like although it came late it won’t it won’t lag behind it will now be you
[01:09:31] know kind of on par with with everything else right awesome well uh like i said like i said
[01:09:38] john thank you very much um and uh i’m looking forward to playing around with temporal to see
[01:09:44] so yeah i really appreciate it thank you no problem you’re welcome thanks a lot everybody
[01:09:48] thank you for listening to this episode of the modern.net show with me jamie taylor i’d like to
[01:09:54] thank this episode’s guest john canthorn for graciously sharing his time expertise and knowledge
[01:09:59] be sure to check out the show notes for a bunch of links to some of the stuff that we covered
[01:10:04] and a full transcription of the interview the show notes as always can be found at the show’s website
[01:10:08] and there will be a link directly to them in your podcatcher and don’t forget to spread the word
[01:10:14] leave a rating or review on your podcatcher of choice head over to.netcore.show slash review for
[01:10:18] ways to do that reach out via our contact page at.netcore.show slash contact or join our discord
[01:10:25] server at.netcore.show slash discord all of which are linked in the show notes but above all i hope
[01:10:32] you have a fantastic rest of your day and i hope that i’ll see you again next time for more.net
[01:10:37] goodness i’ll see you again real soon see you later folks
[01:10:44] you