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
98
DEMO Apps recently implemented
あるcommunityで発表した雑LT.
Drumato
August 08, 2021
Tweet
Share
More Decks by Drumato
See All by Drumato
仕様と実装で学ぶOpenTelemetry
drumato
2
2.6k
Activities about Kubernetes operation improvements as an SRE
drumato
3
640
Writing an experimental eBPF disassembler
drumato
0
350
An incremental approach to implement an admission controller
drumato
0
240
Components of Kubernetes Cluster
drumato
0
320
cybozu-labs-youth-10th
drumato
1
1.1k
Other Decks in Programming
See All in Programming
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
330
GitHubとGitLabとAWS CodePipelineでCI/CDを組み比べてみた
satoshi256kbyte
4
240
Android端末で実現するオンデバイスLLM 2025
masayukisuda
1
150
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.6k
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
Testing Trophyは叫ばない
toms74209200
0
880
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
530
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
160
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
860
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
180
Featured
See All Featured
Fireside Chat
paigeccino
39
3.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Producing Creativity
orderedlist
PRO
347
40k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
How STYLIGHT went responsive
nonsquared
100
5.8k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Rails Girls Zürich Keynote
gr2m
95
14k
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
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
ありがとうございました