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
Go_College_最終発表資料__外部公開用_.pdf
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
xe-pc23
March 23, 2026
Programming
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go_College_最終発表資料__外部公開用_.pdf
xe-pc23
March 23, 2026
Other Decks in Programming
See All in Programming
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
970
FreeBSDでZabbixを動かす.pdf
kenkino
0
120
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
310
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
Deep dive into the select statement (GopherCon UK)
jespino
0
180
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
130
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
170
Java 27新機能 / Java 27 new features
kishida
2
120
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
150
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
240
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
6.7k
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
Crafting Experiences
bethany
1
330
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Why Our Code Smells
bkeepers
PRO
340
58k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
RailsConf 2023
tenderlove
30
1.5k
Transcript
Go college 最終発表資料(外部公開用) 発表者:xe-pc23
Go collegeに参加した背景 今年は スピード重視 ハッカソン 去年まで コードをしっかり 読まない 継続的な開発 ユーザーがいる環境での運用
興味のある実務インターン 自分の作成したコードに 責任が生じる とりあえず動けばいい
発表構成 最終課題での挑戦 基礎要件は全て実装できました! 本インターンでの成長ポイント 今後に向けた意気込み
最終課題での挑戦 Redis 補足 ゲームのAPI実装 ガチャを回すともらえる アイテムのコレクション 一覧を取得するAPI 実装した内容 コレクション
認証トークン 1
model/collection.go 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 func SelectCollectionItemsByUserID(ctx context.Context, userID string) ([]*CollectionItem, error) { var items []*CollectionItem key := collectionListKey(userID) err := db.Cache.Get(ctx, key, &items) if err == nil { log.Printf("collection items found in Redis for user ID: %s", userID) return items, nil } log.Printf("collection items not found in Redis for user ID: %s, fetching from MySQL: %v", userID, err) //======// [MySQLの処理] //======// // Redisにコレクションアイテムのリストを保存する if err := db.Cache.Set(&cache.Item{ Ctx: ctx, Key: key, Value: items, TTL: 7 * 24 * time.Hour, }); err != nil { log.Printf("failed to set collection items to Redis for user ID: %s, error: %v", userID, err) } else { log.Printf("collection items cached in Redis for user ID: %s", userID) } return items, nil } コレクションのRedis実装 Flowchart next:なぜTTL1週間 1
削除の処理を実装しているから コレクションのRedis実装 Flowchart model/gacha.go 1 2 3 4 5 6
7 8 9 10 11 12 13 14 15 16 17 func SaveGachaResult(ctx context.Context, userID string, collectionIDs []int) error { // === 【DB更新処理】 ==================== // トランザクション開始 // 1. ガチャ結果をバルクインサート // 2. コインを消費 // トランザクション終了 (Commit) // ===================================== // DBの更新が成功したら、古いキャッシュを「削除」する key := collectionListKey(userID) if err := db.Cache.Delete(ctx, key); err != nil { log.Printf("failed to delete cache: %v", err) } return nil } 削除処理を実装しているが、TTLを設定しているのはユーザーがゲームをしなく なった時、キャッシュが溜まり続けるのを防ぐため1週間のTTLを設定している 補足 1
最終課題での挑戦 Redis Redisを実装した時としてない時の パフォーマンスの比較を実際に行いました 補足 -n :総リクエスト数 -c 同時並列数 1
2 3 4 5 #インストール方法 brew install hey #テストで使用するコマンド hey -n 50000 -c 100 -H "x-token: $TOKEN" "$BASE_URL/collection/ list" HTTPリクエストの負荷テストツール 引用:https://github.com/rakyll/hey 1
実行結果 注目するところ Average Latency Requests/sec 99%Latency 1
実行結果 試行回数5回 NEXT:これらをグラフにすると→ 1
実行結果 グラフを Nanobanana 2で生成してみました 1
本インターンでの成長ポイント Go Collegeでの目標 自分のコードに責任 を持てるようになる Goに関する知識 をつける 2
本インターンでの成長ポイント Goに関する知識をつける Goの構文 Redis Echo Gin アーキテクチャ MySQL 2
本インターンでの成長ポイント 自分のコードに責任を持てるようになる ログ表示を沢山実装 パフォーマンスを意識した実装 この処理はこの層で行う 2
今後に向けた意気込み Goのイベントの参加 記事などでのアウトプットなど 補足 ・Goに関しての知識をさらに深める ・継続的な開発経験を積む(実務&個人開発) 3