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
Atsushi Tanaka
March 25, 2024
Programming
900
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
継続的なAIコスト最適化
bgpat
1
280
プロダクト専任SREを置かずに 信頼性を追求する
bgpat
1
150
OpenCensusと歩んだ7年間
bgpat
0
780
SREだけど社内営業組織の業務改善をしてみた
bgpat
0
1k
ウォンテッドリーにおける Platform Engineering
bgpat
0
910
Wantedly での Datadog 活用事例
bgpat
2
6.5k
KubernetesでDatadogを飼うならオートディスカバリーを使わないと損
bgpat
2
1.1k
マイクロサービス基盤にフルマネージドサービスではなくKubernetesを選択する理由
bgpat
12
4.8k
400万ユーザーに価値を届けるエンジニアを を支えるインフラ基盤
bgpat
3
580
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
200
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
140
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.1k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
700
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
160
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
350
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
580
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.2k
Domain-Driven Transformation
hschwentner
2
2.3k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
22
22k
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Prompt Engineering for Job Search
mfonobong
0
500
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
720
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
BBQ
matthewcrist
90
10k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
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