- mfateevThat sounds like an excellent use for narrow boring company tunnels.
- I don't believe in visual programming ever replacing code for general programming. However, many examples exist when visual programs work for narrow domain-specific applications. This works because such applications allow exposing only high-level domain-specific abstractions. This reduces complexity enough to be a good fit for visual representation.
- Do you know about the Temporal startup program? It gives enough credits to offset support fees for 2 years. https://temporal.io/startup
- Every step of the workflow is durably recorded. So you have the full information about the exact state of each workflow. To troubleshoot, you can even download the event history and replay workflow in a debugger as many times as needed.
The ease of troubleshooting is one of the frequently cited benefits of the approach.
Check the UI screenshot at https://www.temporal.io/how-it-works.
- temporal.io just released .NET SDK. The observability and scalability of the platform is really good.
Disclaimer: I'm one of the founders of the project.
- Check out temporal.io. It has support for schedules as well.
- Check out temporal.io that fully abstract this. Disclaimer, I'm one of the founders.
- State machines are useful when the same input/event requires different handling based on the current state. There are not that many applications when this is true. Most of the time only two handlers in each state are needed, success and failure, which are much better modeled through a normal code than an explicit state machine.
At the framework level they might be pretty useful, but they rarely appear at the first version, but as a result of refactoring.
- 45 points
- Yes, Temporal workflows are as dynamic as needed.
The other useful pattern is always running workflows that can be used to model lifecycle of various entities. For example you can have an always running workflow per customer which would manage its service subscription and other customer related features.
- The main difference is that workflows are written as code in a general purpose programming language. Java, Go, Javascript/Typescript and PHP are already supported. Python and .NET are under development. AWS Step Functions are using JSON to specify workflow logic. JSON is OK for very simple scenarios, but is not adequate for the majority real business use cases. The fun fact is that Step Functions are a thin layer on top of AWS SWF which is based on the same idea as Temporal.
Here is a more detailed answer from Temporal forum: https://community.temporal.io/t/why-use-temporal-over-a-comb...
- Look at the temporal.io. It is essentially a BPM system that uses Go (as well as Java/PHP/Typescript) to specify business process. And a queue + DB is never simpler for such scenarios.
Disclaimer: I'm one of the founders of the project.
- I think we are in agreement here. Temporal does exactly what you described. It uses queues to transporting tasks to processes. But it completely hides them from the business process code.
The issue is that 99.9% of developers use queues directly in their business applications.
- I think queues are the wrong abstraction to model business processes. That's why a trivial issue like a non recoverable failure during processing a message becomes such a headache. The same goes for ordering. An orchestrator like temporal.io allows modeling your business use case using higher level abstractions that hide all this low level complexity.
Disclaimer: I'm the tech lead of the temporal.io open source project and the CEO of the affiliated company.
- temporal.io provides much higher level abstraction for building asynchronous microservices. It allows one to model async invocations as synchronous blocking calls of any duration (months for example). And the state updates and queueing are transactional out of the box.
Here is an example using Typescript SDK:
Disclaimer: I'm one of the creators of the project.async function main(userId, intervals){ // Send reminder emails, e.g. after 1, 7, and 30 days for (const interval of intervals) { await sleep(interval * DAYS); // can take hours if the downstream service is down await activities.sendEmail(interval, userId); } // Easily cancelled when user unsubscribes } - A lot of startups these days support early exercise or extend the post termination exercise period from 90 days to much longer period like 10 years. So there is no need to stay with the company for 5-10 years after your options vested. The 4 year vesting schedule is standard.
- Temporal takes much simpler approach to updating code while a program is running. For any code update, it keeps both old and the new version of the code. Then it uses the old code to replay already recorded events which allows to reconstruct the program state and takes the new code path when it is executed for the first time. Eventually the old code is removed once all the executions that used it are completed.
- Google is mimicking perforce command line. The backend is 100% proprietary.
Microsoft is based on Git, but with a lot of engineering on top of it: https://devblogs.microsoft.com/bharry/scaling-git-and-some-b...
- AWS DynamoDB is multi-AZ and is strongly consistent (at least for a single key update).
I believe you confused it with a Dynamo DB described in a paper Amazon published long ago. AWS DynamoDB has nothing to do with a eventually consistent design the paper describes. It was purely marketing gimmick to call the new AWS Service that.
- > I also used to use Microsoft's Windows Workflow Foundation to do similar things. Essentially you're sketching a workflow process skeleton and then managing the state atomically by compartmentalizing it, so to speak.
temporal.io and Windows Workflow Foundation are completely different. WF uses code to generate an intermediate representation of the workflow AST. And that intermediate representation is executed. It is similar to the most existing workflow engines from Airflow to BMPN ones.
Temporal doesn't use any intermediate representation. It directly executes the code keeping all its state durable.
> I don't entirely agree with your comment about state management and argument passing in Petri nets.
When I say about the state I mean the overall state of the business project which is much more than a token in a certain dish. For example such state can include a list of line items to order with all associated attributes and counters of processed events.
> I'd argue that, the tool you describe could be modeled as a Petri net, but that perhaps you may not wish to have a user do it that way.
All software at the lowest level can be modeled as a state machine. And Petri net is one of the possible representation of FSN. I'm interested in simplifying the way the workflow logic is specified by an engineer. At this point I believe the temporal.io approach of giving your the full power of a high level programming language and taking care of durability and scalability is the best option.