3 ms·
I agree that Flow being POC had all the above issues. Temporal listened to the users and solved all of them: 1. No code generation. So, you define one interfac
by mfateev 6y ago
I agree that Flow being POC had all the above issues. Temporal listened to the users and solved all of them:
1. No code generation. So, you define one interface for activities and use it for both calling activities synchronously from the workflow and to implement them. Here is how would you do it in Temporal:
@ActivityInterface
public interface GreetingActivities {
String composeGreeting(String greeting, String name);
}
Workflow code:
GreetingActivities activities = Workflow.newActivityStub(GreetingActivities.class)
// This is a blocking call that returns only after the activity has completed.
String greeting = activities.composeGreeting("Hello", name);
The full source at https://github.com/temporalio/java-samples/blob/master/src/main/java/io/temporal/samples/hello/HelloActivity.java https://github.com/temporalio/java-samples/blob/master/src/m...
2. SWF or Temporal does not drive the deployment strategy. You can run all of the workflows and activities as a monolith in a single process or break them in multiple services. But it is purely your choice.
3. SWF wasn't possible to run locally. Temporal fully supports unit testing of long-running workflows with automatic time skipping and local integration testing using the service running in docker-compose.