Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Workflow engine with go #2
Search
Tsuji Daishiro
February 07, 2020
Technology
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Workflow engine with go #2
Tsuji Daishiro
February 07, 2020
More Decks by Tsuji Daishiro
See All by Tsuji Daishiro
Starting static analysis with Go
tutuz
0
2.2k
実務で役立つTCPクライアントの作り方
tutuz
6
5.4k
What's new Context in Go1.14
tutuz
2
1.7k
Workflow engine with go
tutuz
0
2k
Nginx cache pitfalls
tutuz
0
300
Check inline expansion with Go
tutuz
0
3.2k
Parallel-Simulated-Annealing
tutuz
3
5.3k
Other Decks in Technology
See All in Technology
アカウント統制の健康診断
kenichinakamura
1
200
AI時代、つくる力を自分たちの手に。 ──電通×KAG、アジャイルとAI駆動開発で挑む開発の変革
yuukiyo
3
390
200人の配信コメント、 全部Jevが仕分けます 〜 マサカリガードを作ってみた 〜
katayamatg
0
180
Teaching Python with three kinds of AI
reuven
0
120
Metadata - Section 2: Simple Metadata & Meta Tags
mohab1
0
140
「Learning Outcome」を書きたくない私が、Learning Outcomeと折り合いをつけるまで
mhlyc
0
240
DevelopersIO2026 -バックアップは“消されないこと”が9割-
yoshida0129
0
410
Let's Change Our World—Again
snoozer05
PRO
6
680
AIエージェント時代、Kaggleにどう取り組むか
takanao
1
200
CTO Night|NotionのAIエージェントとFDE
kzkhykw1991
0
320
Filter What the LLM Reads: RAG Governance with AgentCore Gateway
yakumo
0
110
freeeにおける AI を用いた ブラウザ動作確認の自動化の取り組み
freee
PRO
0
220
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
410
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Utilizing Notion as your number one productivity tool
mfonobong
4
630
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
The Curse of the Amulet
leimatthew05
3
16k
Side Projects
sachag
456
43k
The Cult of Friendly URLs
andyhume
79
7k
Google's AI Overviews - The New Search
badams
0
1.6k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
620
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Transcript
Goでワークフローエンジンを作る 2020/2/7(Fri) golang.tokyo #29 Future Architect Tsuji Daishiro
Who are you? 辻 大志郎(つじ だいしろう) @d_tutuz 渋谷区役所(~2014/9) Future Architect(2014/10~)
✓ 所属 Technology Innovation Group 競技プログラミング部 2
None
Goの標準コードリーディング会やってます ✓ 社内で標準コードリーディング会やってます ✓ 全12回で、3回まで開催済 ✓ 以下のパッケージ ✓ io ✓
errors ✓ hash/maphash ✓ context ✓ flag ✓ path ✓ testing ✓ iotest ✓ sort ✓ net/http 1 (client) ✓ net/http 2 (server) ✓ database/sql 4
ワークフローエンジンとは? ✓ 以下のようなことを実施するソフトウェア • 定期的なタスクの実行 • タスク間の依存関係を定義でき、順序関係を制御してタスクを実行 • タスクの実行状況/結果を管理 ✓
定型業務の自動化 5
タスクとフロー ✓ タスク:処理の単位 ✓ フロー:タスクの集合 6 タスク フロー タスク タスク
既存のワークフローエンジン 7 ✓ OSSにいろんなワークフローエンジンはある ✓ Apache Airflow ✓ Argo ✓
Rundeck … ✓ 高機能かつ自由度が高いので便利 ✓ 業務のニーズに合わないことも… ✓ タスクをGoで実装できなかったり…
None
Flowerを作った 9 ✓ フロー(Flow)を扱うソフトウェア(er)ということでFlower ✓ 以下を目指して作った ✓ タスクの管理が容易 ✓ タスクをGoで実装可能
✓ https://github.com/d-tsuji/flower
アーキテクチャ 10 ✓ Register(タスクの実行登録) ✓ Watcher(タスクの実行監視/制御) ✓ Worker(タスクの実行)
Flowerの特徴 11 ✓ タスク管理 ✓ タスクの順序をマスタで一括管理 ✓ パラメータなどの埋め込みが可能 ✓ タスクを構成する処理はComponentとしてGoで実装
✓ Exactly Once ✓ リカバリ/リラン ✓ エラー時にどのタスクでエラーになったかわかる仕組みを提供 ✓ テーブルのレコード更新でリランが可能 ✓ 並列実行 ✓ 流量制御
タスクの定義方法 12 ✓ タスクはGoのソースで、実行順序はマスタで管理できるようにしたかった ✓ ただRDSの常時起動はお高く、エコではないので、要検討。組み込みのデータベースを使うなどはある
タスク実行管理/制御 13 ✓ タスクは管理テーブルで永続化 ✓ タスクのロスト、重複実行の制御は最重要な要素の一つ ✓ RDBMSが一番扱いやすい タスク管理テーブル exec_status
0:実行待ち 1:実行中 3:完了
落ち葉拾い 14 ✓ タスク監視のポーリング ✓ キュー(SQSとか)をはさめばイベント通知にできる ✓ イベント or ポーリングをモードとして選択できると良さそう
✓ 内蔵スケジューラ ✓ 管理コンソール ✓ ほしいけどかつ必要だけど、未作成 ✓ GUIによるワークフロー開発 ✓ 任意のDAGのサポート
楽しいワークフローエンジンライフを!