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
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DEMO Apps recently implemented
あるcommunityで発表した雑LT.
Drumato
August 08, 2021
More Decks by Drumato
See All by Drumato
Composable Platform Shift ~AWS全面移設におけるプラットフォームエンジニアリングの実践~
drumato
0
130
仕様と実装で学ぶOpenTelemetry
drumato
2
3k
Activities about Kubernetes operation improvements as an SRE
drumato
3
730
Writing an experimental eBPF disassembler
drumato
0
400
An incremental approach to implement an admission controller
drumato
0
290
Components of Kubernetes Cluster
drumato
0
410
cybozu-labs-youth-10th
drumato
1
1.2k
Other Decks in Programming
See All in Programming
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
React本体のコードリーディング
high_g_engineer
1
150
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
360
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
290
リアルな遅延を測る仕様
kota_yata
1
120
Hono + Inertia + React で LP を構築した話
oukayuka
2
150
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
今さら聞けない .NET CLI
htkym
0
210
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
190
ソフトウェアラスタライザ
fadis
1
500
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
420
Featured
See All Featured
Leo the Paperboy
mayatellez
8
2.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
For a Future-Friendly Web
brad_frost
183
10k
New Earth Scene 8
popppiees
3
2.5k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
520
Utilizing Notion as your number one productivity tool
mfonobong
4
550
We Have a Design System, Now What?
morganepeng
55
8.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
500
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
KATA
mclloyd
PRO
35
15k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
380
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
ありがとうございました