4 ms·
Try temporal.io. It is just a Java library without any code generation and AspectJ. It also allows to write synchronous code while Flow was only asynchronous.
by mfateev 6y ago
Try temporal.io. It is just a Java library without any code generation and AspectJ. It also allows to write synchronous code while Flow was only asynchronous.
- guitarbill 6y agoNo thanks mate, the endless `Impl` of interfaces is giving me bad flashbacks. At least it's open source I guess. Not to mention the deployment hassle that the different workflow and activity workers represent, or how you roll back such a beast. Or even what the testing strategy looks like.
- mfateev 6y agoI 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.