Skip to content

Commit 0e8e585

Browse files
authored
Update readme
1 parent d8b0bcf commit 0e8e585

File tree

4 files changed

+38
-14
lines changed

4 files changed

+38
-14
lines changed

README.md

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ While there are implementations for other lanuages in the context of Azure Durab
116116

117117
The execution model for `go-workflows` follows closely the one created for Uber's [Cadence](https://cadenceworkflow.io) and which was then forked by the original creators for [Temporal.io](https://temporal.io).
118118

119-
TODO: describe in more detail here.
119+
See https://cschleiden.dev/blog/2022-05-02-go-workflows-part2/ for some more details.
120120

121121
### Supported backends
122122

@@ -513,7 +513,38 @@ logger := activity.Logger(ctx)
513513
514514
The returned `logger` implements the `Logger` interface, and already has the id of the activity, and the workflow instance and execution IDs set as default fields.
515515
516-
## Workflow Versioning
516+
517+
## Tools
518+
519+
### Analyzer
520+
521+
`/analyzer` contains a simple [golangci-lint](https://github.com/golangci/golangci-lint) based analyzer to spot common issues in workflow code.
522+
523+
### Diagnostics Web UI
524+
525+
For investigating workflows, the package includes a simple diagnostic web UI. You can serve it via:
526+
527+
```go
528+
m := http.NewServeMux()
529+
m.Handle("/diag/", http.StripPrefix("/diag", diag.NewServeMux(b)))
530+
go http.ListenAndServe(":3000", m)
531+
```
532+
533+
It provides a simple paginated list of workflow instances:
534+
535+
<img src="./docs/diag-list.png" width="700">
536+
537+
And a way to inspect the history of a workflow instance:
538+
539+
<img src="./docs/diag-details.png" width="700">
540+
541+
## FAQ
542+
543+
### How are releases versioned?
544+
545+
For now this library is in a pre-release state. There are no guarantees given regarding breaking changes between (pre)-releases.
546+
547+
### Workflow versioning
517548
518549
For now, I've intentionally left out versioning. Cadence, Temporal, and DTFx all support the concept of versions for workflows as well as activities. This is mostly required when you make changes to workflows and need to keep backwards compatibility with workflows that are being executed at the time of the upgrade.
519550

@@ -574,12 +605,6 @@ and only if a workflow instance was created with a version of `>= 2` will `Activ
574605

575606
This kind of check is understandable for simple changes, but it becomes hard and a source of bugs for more complicated workflows. Therefore for now versioning is not supported and the guidance is to rely on **side-by-side** deployments. See also Azure's [Durable Functions](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-versioning) documentation for the same topic.
576607
577-
## `ContinueAsNew`
608+
### `ContinueAsNew`
578609
579-
Both Temporal/Cadence and DTFx support `ContinueAsNew`. This essentially re-starts a running workflow as a new workflow with a new event history. This is needed for long running workflows where the history can become very large, negatively affecting performance. While `WorkflowInstance` supports an `InstanceID` and an `ExecutionID`, this feature is not yet implemented (and might not be).
580-
581-
## FAQ
582-
583-
### How are releases versioned?
584-
585-
For now this library is in a pre-release state. There are no guarantees given regarding breaking changes between (pre)-releases.
610+
Both Temporal/Cadence and DTFx support `ContinueAsNew`. This essentially re-starts a running workflow as a new workflow with a new event history. This is needed for long running workflows where the history can become very large, negatively affecting performance. While `WorkflowInstance` supports an `InstanceID` and an `ExecutionID`, this feature is not yet implemented (and might not be).

docs/diag-details.png

639 KB
Loading

docs/diag-list.png

554 KB
Loading

samples/web/web.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@ func main() {
3131
// panic(err)
3232
// }
3333

34-
// Start diagnostic server
34+
// Start diagnostic server under /diag
3535
m := http.NewServeMux()
36-
// m.Handle("/diag", http.StripPrefix("/diag", web.NewMux(b)))
37-
m.Handle("/", diag.NewServeMux(b))
38-
go http.ListenAndServe(":8080", m)
36+
m.Handle("/diag/", http.StripPrefix("/diag", diag.NewServeMux(b)))
37+
go http.ListenAndServe(":3000", m)
3938

4039
// Run worker
4140
w := RunWorker(ctx, b)

0 commit comments

Comments
 (0)