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
VRoidモバイルの裏側
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hare
April 25, 2020
Programming
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VRoidモバイルの裏側
PlayFabを利用したサービス開発
Hare
April 25, 2020
Other Decks in Programming
See All in Programming
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
430
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Performance Optimization With LLMs
xleitix
0
110
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
320
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
760
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Automating Front-end Workflow
addyosmani
1369
210k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Writing Fast Ruby
sferik
630
63k
HDC tutorial
michielstock
2
960
Practical Orchestrator
shlominoach
192
12k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Transcript
モバイルの裏側 PlayFabを利用したサービス開発 pixiv Inc. 2020.4.25
2 • 晴佐久 哲士 • ピクシブ株式会社 (2018/8~) • フルスタックエンジニア ◦
サーバサイド (Rails / PlayFab) ◦ フロントエンド (React/Redux, Typescript) ◦ 環境構築 (AWS, Vagrant, Docker) ◦ Unity (C#, C++) • 趣味 ◦ プログラミング ◦ お絵かき ◦ CG制作 エンジニア
3 • VRoidモバイルとは • なぜPlayFab? • PlayFabをどう使っている? • 開発・運用のハマりどころ •
まとめ
4 モバイルとは アバターフォトア プリ • こだわりの3Dアバターを作成可能 • 服を着せ替えてファッションを楽しむ • AR・バーチャル空間で映えるアバター
フォトを撮影できる • VRoidモバイル
5 PlayFabの採用事例として掲載されました PlayFab and pixiv get creative with new app
6 • 開発期間の短縮 • 実績のあるサービスで信頼性がある • 開発に必要な機能の豊富さ なぜ
7 PlayFabをどう使ってる?
8 と連携したユーザ管理 VRoidHubのアカウントと紐づい たcustom idを発行 custom idは保 存しておく LoginWithCustomIdでログイン custom
id
• Catalog/Inventoryを使用 ◦ トップス・靴など ▪ Items ◦ 全身セット・顔セット ▪ Bundle
◦ VRoidコイン ▪ VirtualCurrency ◦ 購入品 ▪ PlayerのInventory 9 アイテム・ コインの管理
• APNsやFCMからトークンをPlayFabに登 録 • 登録者だけをPlayer Segmentで切り、 Schedule TasksでSegmentに一括送信 • 一括処理は秒間10プレイヤーだけに制限
されるため遅い 10 通知 トークン受 け取り トークン登 録 Token登録者 セグメント Schedule Tasks
11 • 様々なScriptを実行している ◦ キャンペーンの開始・終了を制御 ◦ キャンペーン中にログインした人にアイテムを付与するスクリプト ◦ アイテムの二重購入を検知するスクリプト (後述)
◦ カタログを更新するスクリプト ◦ Slack通知
12 • TypeScriptで記述し、gitでバージョン管 理 • webpackでビルドした最終成果物をデ プロイして運用 • GitHub連携がPlayFabはできるが Organizationには非対応
管理 バージョン管理 Push / Pull ビルド デプロイ
13 データ分析 PIXIVのサービスをBigQueryに集約 s3にイベントストリームの ログ転送 EmbulkでBigQueryに PlayFabのデータを入 れる Lookerで 分析
14 開発・運用のハマりどころ
15 • 資金決済法の要件上、利用者保護の側 面から必要だった • PlayFabにはユーザのコイン使用履歴を 取得するAPIはない • Server APIやAdmin
APIでも取得はでき ないので自前で実装した コイン使用履歴
16 コイン使用履歴 ログ保管 定期的に 収集 APIで取得 アイテム購入
17 • VRoidモバイルは衣装を一度購入したら、その商品は持っているため複数所持すること はない • アイテムを2重に購入することはできなくしたかった • Catalogにはその設定がない ◦ Stackable
/ Tradable / Limited Edition くらい • 2重にアイテムを購入した時に検知する仕組みが必要だった アイテムの 重購入検知
18 アイテムの 重購入検知 Inventory PlayStream Rule 2重購入 チェック Slack通知 Inventoryに
アイテム付与 player_inventor y_item_added イベントを検知 2重購入チェックの スクリプト実行 2重購入検知のカスタム イベント書き込み 通知スクリプト実行 アイテムの剥奪、払い戻しなど 適宜対応 通知を確認
19 • VRoidモバイルでは開発期間の短縮・安定したサービスのローンチのために PlayFabを選 定した • その中の各種機能を活用してサーバとしての機能を運用している ◦ ユーザやアイテムの管理、Push通知など ◦
足りない部分はCloudScriptで補う • 機能的に要件を満たしきれない部分があるので創意工夫をして対応している まとめ