Small proof of concept project to try temporal.io with Dispatch Incident Management from Netflix.

Overview

temporal-dispatch-poc

Small POC project to try out the Temporal workflow engine together with Netflix's Dispatch Incident Management System.

Supported workflows

Pure for fun there are two workflows implemented:

  1. Showing a random dog picture from dog.ceo
  2. A similar workflow to get a random photo from Unsplash.

Both workflows have a bit of delay in them to suggest hard work and state changes.

Project Goals

For this project I had two goals:

  1. Get experience with the Temporal Workflow engine.
  2. Adding a workflow system to Dispatch through a generic workflow plugin that I contributed to Dispatch.
  3. Providing an example to others that want to start using Dispatch and that need an easy way to start with workflows.

Running POC server

You can either download this project and build it from source or you could download the binaries.

./td -api=:8888 -temporal=localhost:7233 -queue=dispatch 

Setting up Dispatch with Generic Workflow

Assuming you already have Dispatch and Temporal running. The quickest way to test this is to run both from Docker compose.

Add the plugin

To enable the Generic Workflow Plugin in Dispatch:

  1. Login to Dispatch
  2. Navigate to: Settings > Projects > default.
  3. Click Plugins
  4. Click NEW
  5. Select Generic Workflow Plugin
  6. Save

Configure plugin

Now you need to configure the plugin to point to the API from this project. If you run Dispatch in Docker and run this API on the Docker host, you can use the Docker gateway IP to connect. In that case the URL would be something like: http://172.17.0.1:8888/workflow/

Currently, there is no authentication on the API.

Enable the plugin and save.

Add workflows

  1. Under Settings go to Workflows
  2. Add new workflow:
    1. Name: Random dog
    2. Resource ID: random_dog
    3. Description: Gets a random dog picture
    4. Plugin: Generic Workflow Plugin
    5. Enabled: true
    6. SAVE
  3. Add new workflow:
    1. Name: Random Unsplash
    2. Resource ID: random_unsplash
    3. Description: Gets a random photo from Unsplash
    4. Plugin: Generic Workflow Plugin
    5. Enabled: true
    6. Workflow Configuration: + add key: term
    7. SAVE

Now run one of the workflows.

Screenshots

Start the workflow

image info

Workflow completed

image info

TODO

  1. Add authentication on the API
  2. Maybe break apart Dispatch structs and helper functions so that they are useful for other API's that don't use Temporal
  3. Support TLS
  4. Docker image

Dependencies

This project uses schema-generate to generate the go structs from the Dispatch JSON schema. This is already done and the structs are in the project so there is no use to generate it again unless it changes.

License

MIT

You might also like...
Golang-module-references - A reference for how to setup a Golang project with modules - Task Management + Math Examples

Golang Module Project The purpose of this project is to act as a reference for setting up future Golang projects using modules. This project has a mat

This Go based project of Aadhyarupam Innovators demonstrate the code examples for building microservices, integration with cloud services (Google Cloud Firestore), application configuration management (Viper) etc.

This Go based project of Aadhyarupam Innovators demonstrate the code examples for building microservices, integration with cloud services (Google Cloud Firestore), application configuration management (Viper) etc.

Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

The Moby Project Moby is an open-source project created by Docker to enable and accelerate software containerization. It provides a "Lego set" of tool

Placeholder for the future project (lets-go-chat)Placeholder for the future project (lets-go-chat)

Placeholder for the future project (lets-go-chat)Placeholder for the future project (lets-go-chat)

PKSUID is a small extension for KSUID (K-Sortable Globally Unique IDs) which allows prefixing it with arbitrary up to 16 bytes strings

PKSUID is a small extension for KSUID (K-Sortable Globally Unique IDs) which allows prefixing it with arbitrary up to 16 bytes strings

A small web dashboard with stats for all pipelines of Buildkite organization.
A small web dashboard with stats for all pipelines of Buildkite organization.

Buildkite Stats A small Buildkite dashboard useful to prioritize which pipelines a Buildkite organization is waiting the most on. Noteworthy details:

A small API to be used in Traefik Forward Auth to block attacks on services behind your favorite web router

Dynamic IPs Blacklist for Traefik This small software implements the possibility to block access to all the services behind your Traefik service. The

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.
Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent of Code 2021 Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved

Comments
  • Rewrite code again to share one client

    Rewrite code again to share one client

    It should be possible to use one client and not to create new clients all the time. Rewrite the code to make use of one client and check again if requests start blocking.

    opened by jtorvald 0
Owner
Jørgen
Jørgen
This is a simple project for demonstrating Temporal with the Go SDK.

This is a simple project for demonstrating Temporal with the Go SDK.

null 0 Oct 11, 2021
Example project for Temporal microservice orchestarion.

Temporal Microservice Introduction This project is created to understand Temporal's Microservice approachment. The repo contains: Example Temporal Mic

Engin Sefa Güngör 1 Oct 4, 2022
A little tool to create small QR code cards for vaccination/test proof.

Icedream's fancy vaccination/test certificate card tool This is just a tool I wrote to transform my vaccine certificate QR codes into something I can

Carl Kittelberger 0 Dec 16, 2021
An experimental distribution of Temporal that runs as a single process

Temporalite ⚠️ This project is experimental and not suitable for production use. ⚠️ Temporalite is a distribution of Temporal that runs as a single pr

Datadog, Inc. 396 Nov 25, 2022
Temporal Server docker-compose files

Temporal Server docker-compose files This repository provides docker-compose fil

Adeyemi Ademola 0 Dec 24, 2021
The temporal cloud cli.

tcld (Beta) A cli tool for managing Temporal Cloud namespaces. This cli tool is currently in beta and access to Temporal Cloud via the cli is restrict

temporal.io 18 Nov 1, 2022
Barry is a silly little thing I wanted to try, feel free to screenshot.

Barry What is Barry? Barry is a silly little thing I wanted to try, feel free to screenshot. If you manage to get panics after being told not to do th

Nat 1 Nov 6, 2021
Zero-knowledge-proof verification bridge

Submit Bug Rosefintech-Rosl2-Bridge Zero knowledge proof verification bridge Table of Contents Security Background Install Community Contact License S

Rosefintech 16 Jun 4, 2022
A repository of random code snippets used to develop proof of concepts

Oddments Oddments is a repository of random code snippets used to develop proof of concepts for techniques used with the Windows operating system. POC

Russel Van Tuyl 7 Oct 13, 2022
A small project for a simple chatroom using golang.

chatroom_go A small project for a simple chatroom using golang. 项目编码流程的设计分析 通讯逻辑示意图 客户端部分 客户端登录功能 1.接收的输入id和密码 2.接收服务端的返回结果 3.判断是成功还是失败,并显示对应的页面 客户端发送

Ripple 0 Jul 3, 2022