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
86
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
590
Writing an experimental eBPF disassembler
drumato
0
330
An incremental approach to implement an admission controller
drumato
0
220
Components of Kubernetes Cluster
drumato
0
300
cybozu-labs-youth-10th
drumato
1
1.1k
Other Decks in Programming
See All in Programming
音声プラットフォームのアーキテクチャ変遷から学ぶ、クラウドネイティブなバッチ処理 (20250422_CNDS2025_Batch_Architecture)
thousanda
0
380
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
140
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.5k
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
140
Browser and UI #2 HTML/ARIA
ken7253
2
170
The Implementations of Advanced LR Parser Algorithm
junk0612
1
1.3k
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
RubyKaigi Dev Meeting 2025
tenderlove
1
1.3k
七輪ライブラリー: Claude AI で作る Next.js アプリ
suneo3476
1
170
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
1
4.8k
SwiftDataのカスタムデータストアを試してみた
1mash0
0
140
Bedrock × Confluenceで簡単(?)社内RAG
iharuoru
1
110
Featured
See All Featured
Designing for Performance
lara
608
69k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
690
Why Our Code Smells
bkeepers
PRO
336
57k
Code Reviewing Like a Champion
maltzj
523
40k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
What's in a price? How to price your products and services
michaelherold
245
12k
Designing Experiences People Love
moore
142
24k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
410
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
The Cost Of JavaScript in 2023
addyosmani
49
7.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
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
ありがとうございました