Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
140
仕様と実装で学ぶOpenTelemetry
drumato
2
3k
Activities about Kubernetes operation improvements as an SRE
drumato
3
750
Writing an experimental eBPF disassembler
drumato
0
410
An incremental approach to implement an admission controller
drumato
0
290
Components of Kubernetes Cluster
drumato
0
420
cybozu-labs-youth-10th
drumato
1
1.2k
Other Decks in Programming
See All in Programming
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
370
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
16k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
260
すこし踏み込む CancellationToken
htkym
2
1.7k
APNsからLive Activityを開始する話
yumnumm
0
160
The Rails Doctrine Decade
koic
2
550
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
450
JRuby: Past, Present, and Future
headius
0
230
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
760
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
130
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
350
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
600
Featured
See All Featured
Crafting Experiences
bethany
1
380
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
GitHub's CSS Performance
jonrohan
1033
470k
Are puppies a ranking factor?
jonoalderson
2
4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
920
What's in a price? How to price your products and services
michaelherold
247
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
How to build a perfect <img>
jonoalderson
1
6.1k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Automating Front-end Workflow
addyosmani
1369
210k
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
ありがとうございました