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
Go_College_最終発表資料__外部公開用_.pdf
Search
xe-pc23
March 23, 2026
Programming
660
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
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.9k
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
150
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
230
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
120
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.7k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
620
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
810
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
280
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.6k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.6k
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
180
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
230
Chasing Engaging Ingredients in Design
codingconduct
0
230
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
990
Balancing Empowerment & Direction
lara
6
1.2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
210
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