Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DEMO Apps recently implemented
Search
Drumato
August 08, 2021
Programming
0
95
DEMO Apps recently implemented
あるcommunityで発表した雑LT.
Drumato
August 08, 2021
Tweet
Share
More Decks by Drumato
See All by Drumato
仕様と実装で学ぶOpenTelemetry
drumato
2
2.5k
Activities about Kubernetes operation improvements as an SRE
drumato
3
620
Writing an experimental eBPF disassembler
drumato
0
340
An incremental approach to implement an admission controller
drumato
0
240
Components of Kubernetes Cluster
drumato
0
310
cybozu-labs-youth-10th
drumato
1
1.1k
Other Decks in Programming
See All in Programming
Benchmark
sysong
0
220
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
2
560
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
320
Bytecode Manipulation 으로 생산성 높이기
bigstark
2
360
ASP.NETアプリケーションのモダナイズ インフラ編
tomokusaba
1
390
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
220
2度もゼロから書き直して、やっとブラウザでぬるぬる動くAIに辿り着いた話
tomoino
0
160
生成AIで日々のエラー調査を進めたい
yuyaabo
0
610
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
130
Java on Azure で LangGraph!
kohei3110
0
160
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
2
580
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
310
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1031
460k
It's Worth the Effort
3n
184
28k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Adopting Sorbet at Scale
ufuk
77
9.4k
Navigating Team Friction
lara
187
15k
Site-Speed That Sticks
csswizardry
10
650
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Transcript
最近作ったもの紹介 Drumato
雑談 最近やっていること
Scrapboxになんでもない技術メモ
scrapboxは脳のL1 cacheに良さそう
Controller-runtime Code reading & understanding
本題
最近趣味codingしてない
なまっているか心配
LTのためになんか作る
即席で作ったもの2つ紹介
おもちゃ1
tinetdみたいなのを作る 所要時間: 2~3時間ぐらい
tinet,使わせてもらっています • よくわかっていなくても使える ◦ 適当にREADME読んだら使えました(便利! ◦ Examplesに要件を満たすものが落ちてれば新たに設定書くこともない • Scrap and
Buildがサクサクできる -> 検証に最適! ◦ いちいちVM image落としてきて, confして, FRR installして...とやるのは大変 ◦ Localで動いてすぐ消せる
以下のようなものを作ってみたくなった • なんとなく以下ができたら"楽しそう" ◦ 実行するとup - confを実行 ◦ Signal投げたら勝手にdownする ◦
設定追加したら自動で反映してくれる...? ▪ fileを監視するcodeを書いたことがないので,やってみたい ◦ testが断続的に動いてくれる • 結果的に本家tinetのほうが全然便利,だけど楽しかったのでよし
実装イメージ
Original behavior
tinetd behavior
作る
作り方 • tinet資源は利用せず,1から作る ◦ 理由1: コードが小さくわかりやすかったので十分理解できた ◦ 理由2: 一方でtinetの多機能に全部追従するのは大変そう ◦
結論: コードを読んで最低限の機能を移植すれば良さそう • fsnotifyとかsignalの使い方は勉強 • あとは頑張って作る
結果 • Goで400行くらいで出来た ◦ fsnotify/signal/tickerは使い方はかんたん • 設定とstateの差分でcommand execは意外と大変 ◦ 同じnode
nameはあるが中身は異なるかも -> reflect.DeepEqual() ◦ Nodeが減ってるかも -> map - mapにして差分はdownを実行すればできそう ▪ とりあえず無視
DEMO
None
tinetdから学んだこと • fsnotifyの仕組みはちゃんと知りたいな ◦ まずはinotifyとかから勉強することになるのかな • fsnotifyの用途はなんだろう ◦ "時々fileを開いて読む"で十分なことも多そうなイメージ ◦
Controller-runtimeはtls certificateの監視に使っている • tinetは便利 • それよりnetworkの勉強自体をしなきゃ
おもちゃ2
eBPF disassembler
ありがとうございました