Readit News logoReadit News
lorendsr commented on Why isn't everyone using code workflow platforms when creating new applications?    · Posted by u/panqueca
prosunpraiser · 2 years ago
(This is from when I last evaluated Cadence - which is now temporal.io. The state must have changed since then.)

Workflows are not zero-cost, they have their own tradeoffs compared to microservices. State management / bootstrapping logic becomes non-trivial, execution order though easier to visualize is also slightly not deterministic, workflows are not as well suited for request-response style replies due to the latency involved in total execution etc (but I think they are great alternatives to async / background workfllows) - and shared underlying infrastructure means increased chances of SPOFs.

The state must have improved much since then. Also, adoption of anything new to require remodelling your application into a different paradigm must be worth the value delivered. For example, modular monoliths became popular because they reduced operational complexity by reducing # of pieces involved. At the time, that value prop vs effort involved was unclear to our teams IMO

lorendsr · 2 years ago
Temporal is designed to handle lower latency use cases than data pipeline systems like Airflow. It also has added a feature recently called Update designed for request-response style interactions that allows for communication with Workflows on the order of tens of ms.
lorendsr commented on Executing Cron Scripts Reliably at Scale   slack.engineering/executi... · Posted by u/kiyanwang
nicksaroha · 2 years ago
Wouldn’t it be a huge overkill to run your own temporal or airflow instances just to run your cron jobs? Just curious.
lorendsr · 2 years ago
There are certainly use cases for which it's more than is required. Like the most simple would be adding a cron string to a GitHub Action or Vercel function, but in most cases, and certainly Slack's case, you want more reliability, scalability, flexibility, and/or observability. And Temporal has extreme levels of those things, including pausing & editing schedules and seeing the current status of all triggered scripts/functions and all the steps a function has taken so far, and guaranteeing the triggered function completes, including ensuring that if the process or container dies, the function continues running on another one. Even if you don't care about all those things, you might care about some of them in the future, and it doesn't hurt to run a system that has capabilities you don't use.
lorendsr commented on Executing Cron Scripts Reliably at Scale   slack.engineering/executi... · Posted by u/kiyanwang
nerdponx · 2 years ago
Coming from the "data world", how does a tool like Airflow/Dagster/Prefect differ from these?
lorendsr commented on Problems with homemade billing systems   getlago.com/blog/the-4-bi... · Posted by u/thibo_skabgia
Rafsark · 2 years ago
Could you explain how? I know temporal has not built the billing engine themselves, so wondering how the tool can help with this..
lorendsr · 2 years ago
Using Temporal is in the category of building it yourselves, not a billing service. But it makes it take much less time to build, because it makes the changes, scaling, and grandfathering quick to do. Especially with the new Scheduled workflows feature: https://github.com/temporalio/samples-typescript/tree/main/s...
lorendsr commented on Show HN: Keep – GitHub Actions for your monitoring tools   github.com/keephq/keep... · Posted by u/talboren
SOLAR_FIELDS · 2 years ago
It’s more generally a workflow manager and orchestration tool. It is kind of a more general version of the tools I mentioned, Dagster and Prefect. It can be used to spawn and manage CICD tasks asynchronously.

Though I will say that Temporal's use case is probably not really well mapped to CI/CD - though it could be used for it (which is why I didn't mention it). It's primary strength is robust, long lived workflows with intelligent retries and the like - you typically want your CI/CD to be as fast as possible and while you want retries and resilience etc it's not as important as some other things (like being hermetic, reproducible, and cached).

lorendsr · 2 years ago
Here's a Temporal v Prefect comparison I wrote: https://community.temporal.io/t/what-are-the-pros-and-cons-o...

tldr is Temporal is more general-purpose: for reliable programming in general, vs data pipelines. It supports many languages, and combining languages, has features like querying & signaling, and can do very high scale.

CI/CD is a common use case for Temporal—used by HashiCorp, Flightcontrol, Netflix: https://www.youtube.com/watch?v=LliBP7YMGyA

lorendsr commented on Time-Travel Debugging Production Code   temporal.io/blog/time-tra... · Posted by u/lorendsr
underrun · 2 years ago
from the article: "Being able to debug any past production code is a huge step up..."

this is pretty epic. but it also means you need to keep track of what version of your code ran every past workflow because you need to run it the exact same way when you replay it, right? Is there an easy way to track in workflow metadata or something which version of a worker (commit sha or something) ran a workflow?

also i love the beginning section about history. It would be awesome if every article I read about some new technology started with a reference to how whatever-it-is really grew out of PARC or bell labs or some research paper written pre-1980.

lorendsr · 2 years ago
Thanks!

You do need to run it on the same code version. There are different ways deploy code changes. If you use one of our in-built versioning systems, the version is recorded in the workflow history (and you can either keep track of version-sha mapping or use a sha as the version). Otherwise, you can add code that adds the current code version as workflow metadata.

lorendsr commented on Time-Travel Debugging Production Code   temporal.io/blog/time-tra... · Posted by u/lorendsr
lorendsr · 2 years ago
Author here, curious if there are any major TTD debuggers I missed? Also let me know if anything in the post didn't make sense, and I'll edit to clarify!
lorendsr commented on Saga Pattern Made Easy   temporal.io/blog/saga-pat... · Posted by u/mmegger
mkleczek · 3 years ago
A long, long time ago we used to have two-phase commit protocols and XA. I am afraid most of sagas are 2PC in disguise - just requiring a programmer to explicitly implement rollbacks.

The situation is similar to the whole "database inside out" hype that drives application programmers to re-implement proper DBMS.

I am pretty sure the IT hype wheel will turn around and someone will sell 2PC as a new shiny thing.

lorendsr · 3 years ago
2PC tends to have limited throughput due to the participants needing to hold a lock between the voting and commit phase, and all the participants need to support the protocol. Sagas work across different services and data stores and can have high throughput.

However, if all of the data you need to update is in a single database that supports atomic commits, I'd go with that over sagas.

lorendsr commented on Saga Pattern Made Easy   temporal.io/blog/saga-pat... · Posted by u/mmegger
mrkeen · 3 years ago
I've never found myself coding undo actions, because it seems that if a forward step can fail, so can a backward step. And now you've got two things to debug.
lorendsr · 3 years ago
At some point, if you can't automatically fix something, you have to stop and report to a human for manual intervention/repair. While a saga doesn't guarantee that you avoid manual repair, it significantly reduces the need for it. If each of these has a 1% chance of non-retryable failure:

Step1

Step2

Step1Undo

then this has a 1% chance of needing manual repair (it's okay if step1 fails, but if step1 succeeds and step2 fails, we need to repair):

do Step1

do Step2

and this has a .01% chance (we only repair if Step2 and Step1Undo fails, 1% * 1%):

do Step1

try {

  do Step2
} catch {

  do Step1Undo

}

u/lorendsr

KarmaCake day555February 13, 2011View Original