There are two primary modules, examples
and migration
.
Spring has been used to declutter the code and illustrate some more advanced autoconfigure features of Temporal Java SDK.
migration
module contains an Temporal Interceptor that can be dropped into your worker to push execution state from one Namespace to another.interceptor
submodule has related interceptor code and should not need alot of recoding by yousupport
submodule has two utility Activities that can be used to Push and Pull execution state for a signal-lossyless migration
examples
module has- a
backend
submodule that pretends to be a long-running workflow that needs to be migrated - a
frontend
submodule that has Starters and Simulator
- a
- Start temporal local dev server
- Start
LegacyApplication
(cfg: application-legacy.yml)- This represents the application already running in your self-hosted environment
- Start
TargetApplication
(cfg: application-target.yml)- This represents the application running in your Temporal Cloud environment
- Start
SimulatorApplication
(cfg: application-simulation.yml)- This is the Simulator you are running to cross-check signals against what you see in your target Namespace.
- Run
SeedStarterApplication
(cfg: application-starter.yml)- Cleans both the target and legacy environments (BE CAREFUL)
- Fails occasionally due to race with batch jobs in local dev. Just re-run it
- Starts
${spring.simulation.execution-count}
executions in your legacy application - Starts simulator to send signals with timestamp every
${spring.simulation.signal-frequency-millis}
milliseconds to legacy application, failing over to the target when migrated- Sends only
${spring.simulation.signal-target-threshold-count}
signals to the target after migration to allow exit of simulator
- Sends only
- Cleans both the target and legacy environments (BE CAREFUL)
- Run
MigrateStarterApplication
(cfg: application-starter.yml)- Sends the
migrateIt
batch signal into your Legacy Application to- Cancel the current execution
- Start an execution in the Target Namespace with the current
getMigrationState
query result - Exit the execution with
Completed
status
- Sends the
The support package has reusable facilities for pushing and pulling
getMigrationState
query results between your Legacy and Target Namespaces.
The pullLegacyExecutionInfo
Activity polls the corresponding legacy execution to pull Completed
workflow execution state over to the Target execution.