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
Ruby製社内ツールのGo移行
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Atsushi Tanaka
March 25, 2024
Programming
880
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby製社内ツールのGo移行
golang.tokyo #34 で発表
https://golangtokyo.connpass.com/event/310844/
Atsushi Tanaka
March 25, 2024
More Decks by Atsushi Tanaka
See All by Atsushi Tanaka
プロダクト専任SREを置かずに 信頼性を追求する
bgpat
1
110
OpenCensusと歩んだ7年間
bgpat
0
750
SREだけど社内営業組織の業務改善をしてみた
bgpat
0
950
ウォンテッドリーにおける Platform Engineering
bgpat
0
850
Wantedly での Datadog 活用事例
bgpat
2
6.4k
KubernetesでDatadogを飼うならオートディスカバリーを使わないと損
bgpat
2
1.1k
マイクロサービス基盤にフルマネージドサービスではなくKubernetesを選択する理由
bgpat
12
4.7k
400万ユーザーに価値を届けるエンジニアを を支えるインフラ基盤
bgpat
3
560
導入から5年が経って見えた Datadog APM 運用の課題
bgpat
4
1.5k
Other Decks in Programming
See All in Programming
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
300
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
490
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
130
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
130
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
Foundry Localでエージェント開発
seosoft
0
160
スマート反転とウェブアクセシビリティ
camiha
0
180
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
230
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
110
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
140
Hono + Inertia + React で LP を構築した話
oukayuka
2
220
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Statistics for Hackers
jakevdp
799
230k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
270
Code Reviewing Like a Champion
maltzj
528
40k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
420
Done Done
chrislema
186
16k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Prompt Engineering for Job Search
mfonobong
0
450
Transcript
© 2024 Wantedly, Inc. Ruby製社内ツールのGo移⾏ golang.tokyo #34 Mar. 25 2024
- Atsushi Tanaka @bgpat
© 2024 Wantedly, Inc. $ whoami @bgpat / Atsushi Tanaka
ウォンテッドリー株式会社 Infrastructure Engineer Kubernetes / Terraform SRE / Platform Engineering 好きなパッケージ golang.org/x/sync/singleflight
© 2024 Wantedly, Inc. 究極の適材適所により、 シゴトでココロオドルひとを ふやすために Wantedlyはパーパス‧共感を軸にした、⼈と会社との出会いを2012 年から創出。 はたらくすべての⼈が共感を通じて「であい」「つながり」「つなが
りを深める」ためのビジネスSNS「Wantedly」を提供しています。 1⼈でも多くの⼈がワクワクしたり、熱中してシゴトと向き合えるよ うな世界を実現するために、国境を超えて「はたらくすべての⼈のイ ンフラ」を創っていきます。 ウォンテッドリーについて
© 2024 Wantedly, Inc. ウォンテッドリーについて
© 2024 Wantedly, Inc. ウォンテッドリーについて ウォンテッドリーのバックエンド領域を⽀える⾔語の歴史を読み解く https://www.wantedly.com/companies/wantedly/post_articles/886087
© 2024 Wantedly, Inc. ウォンテッドリーについて • (Goも使われているが) Rubyの利⽤が多い • マイクロサービス構成
• Kubernetes上で運⽤
© 2024 Wantedly, Inc. Infrastructure Squad (インフラチーム) の取り組み インフラや開発運⽤に関わる機能とプラクティスをプラットフォームとして提供していく
© 2024 Wantedly, Inc. Infrastructure Squad (インフラチーム) の取り組み インフラや開発運⽤に関わる機能とプラクティスをプラットフォームとして提供していく 今⽇話す部分
© 2024 Wantedly, Inc. 内製ツール “kube” kube | Wantedly Engineering
Handbook https://docs.wantedly.dev/fields/dev-tools/kube
© 2024 Wantedly, Inc. 内製ツール “kube” • エンジニアがデプロイ等の操作をするためのツール • kubectlのラッパーコマンド
• はじめはRubyで書かれていた ◦ Rubyを扱えるエンジニアが多かった ◦ 参考にしたCapistranoがRubyで書かれていた
© 2024 Wantedly, Inc. Ruby製kubeのつらみ • 環境によって動作しない ◦ ランタイムのバージョン ◦
パッケージや共有ライブラリへの依存 ◦ OSによる環境差異 • Kubernetesとの相性が良くない ◦ パッケージが少ない • 実⾏速度が遅い ◦ Rubyで並列処理を書くのは⼤変
© 2024 Wantedly, Inc. Goへのリプレース • 環境によって動作しない ◦ ランタイムのバージョン →
コンパイラ⾔語なのでランタイム依存しない ◦ パッケージや共有ライブラリへの依存 → static linkで考慮不要 ◦ OSによる環境差異 → クロスコンパイルが容易 • Kubernetesとの相性が良くない ◦ パッケージが少ない → 既存の資産を利⽤可能に • 実⾏速度が遅い ◦ Rubyで並列処理を書くのは⼤変 → goroutine で簡単に並列処理が書ける
© 2024 Wantedly, Inc. 移⾏後しばらく経って - 良かった点 • CIOpsでも利⽤ ◦
エンジニアのPCから⼿動デプロイ→CIで⾃動デプロイに変更 ◦ エンジニアのPCはmacOSだったがCIのLinux環境でも問題なく動作 • Goや依存パッケージのアップデートで壊れにくい ◦ 型があるおかげで go build が成功すればだいたい動く ◦ 他の⾔語に⽐べて破壊的変更が少ない (発表者の印象)
© 2024 Wantedly, Inc. 移⾏後しばらく経って - 困った点 • テストが書きづらい ◦
処理を後から書き換えることができない ◦ mockしやすい構成にする必要がある ▪ かなりの量のコードを書き直した • ツールチェインが充実していなかった→時間経過で改善 ◦ パッケージマネージャー: 当時は go mod がなかった ◦ ファイル埋め込み: go:embed がなかったので jessevdk/go-assets や rakyll/statik を使っていた
© 2024 Wantedly, Inc. まとめ Goに移⾏したことで • 環境依存を限りなくなり多様なニーズに応えやすく • 安全にバージョンアップでき容易にメンテナンス可能に
• テストの考慮をせず書いてほとんどを書き直すことに
© 2024 Wantedly, Inc. We are hiring! https://www.wantedly.com/projects/522096