Skip to content

Basic Design

Scott Askew edited this page May 6, 2011 · 2 revisions

Given the AutoPatch design requirements, a very simple design has been created. There is a patch launcher, which serves as the controller for all patch activity.

Startup

Applications wishing to use AutoPatch must instantiate a MigrationLauncher by implementing an adapter that starts the launcher on application startup, or using an existing adapter.

Patch Level

The launcher is able to determine the current patch level of the system in a durable way, so that it knows the patch level across multiple runs.

Patch Loading

The launcher searches the classpath for any available objects that implement a common patch type, or any files that are in a directory known to hold patches.

Patch Ordering

The launcher loads all of the patches into a single list and orders them.

Patch Execution

Each patch is executed, one after another. Any errors are considered fatal, as the application logic will not be able to trust the state of external systems, and is thus cause for total shutdown.

Post-Patch Tasks

These have loading, ordering and execution steps similar to regular patches, the only difference is that these run every time AutoPatch runs. This allows you to do maintenance tasks (like recompiling PL/SQL or similar) after patch runs, but means that the tasks in here must be re-runnable. They will run a lot.