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
100
DEMO Apps recently implemented
あるcommunityで発表した雑LT.
Drumato
August 08, 2021
Tweet
Share
More Decks by Drumato
See All by Drumato
仕様と実装で学ぶOpenTelemetry
drumato
2
2.8k
Activities about Kubernetes operation improvements as an SRE
drumato
3
670
Writing an experimental eBPF disassembler
drumato
0
370
An incremental approach to implement an admission controller
drumato
0
260
Components of Kubernetes Cluster
drumato
0
350
cybozu-labs-youth-10th
drumato
1
1.2k
Other Decks in Programming
See All in Programming
CSC307 Lecture 04
javiergs
PRO
0
640
AgentCoreとHuman in the Loop
har1101
5
170
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2k
Grafana:建立系統全知視角的捷徑
blueswen
0
290
ThorVG Viewer In VS Code
nors
0
700
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
190
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
320
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
7
4.4k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.7k
CSC307 Lecture 05
javiergs
PRO
0
470
AIエージェントの設計で注意するべきポイント6選
har1101
6
3.1k
Architectural Extensions
denyspoltorak
0
130
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
36k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
730
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
87
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
430
The Curious Case for Waylosing
cassininazir
0
210
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
42
Mobile First: as difficult as doing things right
swwweet
225
10k
Music & Morning Musume
bryan
46
7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Invisible Side of Design
smashingmag
302
51k
Become a Pro
speakerdeck
PRO
31
5.8k
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
ありがとうございました