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
730
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
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
410
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
200
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
200
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
220
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.7k
React本体のコードリーディング
high_g_engineer
1
130
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
440
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
140
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
120
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
310
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
190
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
300
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
360
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
160
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Spectacular Lies of Maps
axbom
PRO
1
890
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