Use your database to power state machines
blog.lawrencejones.dev
blog.lawrencejones.dev
Additionally error handling is significantly more difficult in temporal than in normal go code in my experience, and I ended up needing to toss a lot of patterns around returning errors to avoid making handling on the caller side incredibly verbose. And I mean verbose by go error handling standards.
I will say that the overall product is really good, and I would definitely recommend it for use cases where you have long running workflows. We have workflows running for several months and being able to do things like call ‘time.sleep(10 days)’ in normal code, without having to think about the internals of scheduling resumption ourselves, is huge. I’ve just heard other teams in my org wanting to use temporal when there isn’t the same time (or “temporal”) component to the problem they’re trying to solve, usually just because they heard about auto retries, and I’m not convinced it’s worth it in those cases
The advantages to me are the the ability to easily have long-lived “workflows” that are written in the language of your choice (5 SDKs the moment), remove the need for storing state in your application database (even remove the need for a database all together for some services), handle the rough edges around distributed concurrency, and provide out of the box visibility into workflow states.
It does seem like it would be overkill for simple use cases, but with the SaaS offering being so compelling IMHO, I think it can make sense to put smaller use cases there if there is a chance of more use cases in the future.
It does sound like you have more production experience with temporal than me though, so please push back if my glasses are a bit rosey
I’d still definitely recommend temporal if your use-case involves long running workflows. I’ve just seen a decent number of developers viewing temporal as some sort of silver bullet but, as always, there are trade offs.
Recently opened up access to a backend as a service [0] for running arbitrary state machines as reliable workflows or real-time backends. After building a bunch of systems on top of this, I'm definitely convinced that this is a better way to structure a lot of systems.
Been using these types of abstractions for years and seen how much the benefits compound over time.
Happy to answer any questions if you have them.
Go's the language I use but I can't bring myself to love it!