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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
xe-pc23
March 23, 2026
Programming
580
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
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
150
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.6k
Swiftのレキシカルスコープ管理
kntkymt
0
220
net-httpのHTTP/2対応について
naruse
0
470
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
520
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
560
AI時代のUIはどこへ行く?その2!
yusukebe
21
7k
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.4k
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Navigating Team Friction
lara
192
16k
Marketing to machines
jonoalderson
1
5.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
400
Skip the Path - Find Your Career Trail
mkilby
1
140
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
The Curious Case for Waylosing
cassininazir
1
380
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