Skip to content

Instantly share code, notes, and snippets.

@dazraf
Last active September 28, 2015 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dazraf/a11c1ba3d8e937ee4424 to your computer and use it in GitHub Desktop.
Save dazraf/a11c1ba3d8e937ee4424 to your computer and use it in GitHub Desktop.
Requirements for hot-deploy

Requirements Proposal: Vert.x Hot Deploy

Contents

Purpose

The purpose here is to shorten and simplify the code-build-run-test-debug cycle through automation.

Example Frameworks

Setup

A programmer will create a project in any of the recommended build tools: e.g.

  • Maven
  • Gradle
  • NPM

Behaviour

Startup

The project is executed as hot-deploy using a technique appropriate for the build tool.

e.g. for Maven, the execution may invoke: mvn vertx:hot.

On execution, the primary verticle is deployed; this in turn may:

  • Deploy other verticles
  • Access third-party libraries using the build tool binding (TODO: provide a reproducer for an issue with this)
  • Use the Vert.x APIs
  • Implement custom logic

Watch

Any change to files that affect the logical behaviour of the program will cause recompile and redeploy. Files that may cause this:

  • Source code
  • Configuration
  • Templates (that statically compiled)
  • and others

Presumably, the convention of the build tool can be followed. So for example, in Maven, ${project.build.sourceDirectory} can be used for the source of the watch.

Recompile

The recompile step will invoke the respective build tool's goal.

Redeploy

Logically, the vert.x verticles will be undeployed and the newly compiled primary verticle will be re-deployed. No effort will be made to maintain state.

Debug

In the case of build tools that closely aligned to the JVM (Maven, Gradle) the hot-deploy phase can be run in debug mode enabling the programmer to break-point and step through the programme whilst the above cycle of steps carry on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment