An experiment in bringing Statemaps to Nomad in an abstracted way.
Since Nomad is in the business of running software, why not run traces too?
This uses the following approach:
- User goes to Client > Traces page
- User clicks "Start Trace"
- User chooses a Trace program
- ClientID and Trace program are POSTed to the Nomad server (mocked here)
- Nomad server generates a batch job constrained to the client requested that runs the trace requested.
- UI counts up how long the trace has been running and presents a stop button.
- User clicks "Stop Trace"
- A POST request is made to the trace resource to stop it
- Nomad server sends a SIGUSR1 to the task the generated trace task running on the client
- Upon receiving the signal, the trace stops but the job is kept alive
- Nomad responds with the trace object in the completed state
- UI creates an iframe with the source
/trace/:id/svg
- SVG GET request is handled by Nomad
- Nomad server fetches logs from the trace task
- Nomad server posts the logs from the trace task along with configuration options to the Statemap Server
- Statemap Server handles the POST request and generates a Statemap SVG from the request body
- Nomad server receives the SVG from the Statemap server
- Nomad server responds to the SVG GET request with the SVG
- UI renders the SVG in an iframe where it can still have the Statemap JS controls and no style conflicts
- User can explore the Statemap SVG