Upload
others
View
17
Download
0
Embed Size (px)
Citation preview
DATA WAREHOUSE
Microsoft Azure
Game Developer/Publisher
SERVICES TIER
Notifications
(e.g. “Feed the tig
ers”)
REST over HTTPS
(JSON messages)
Security
Tokens
DATA TIER
Game state &
Transactio
ns Results
Player and Game DataSecurity
Tokens
TABLE STORAGE
Active Transactions Transactions Archive
Notifications Archive
BLOB STORAGE
Scalable Worker Roles
VALIDATION
BACKGROUND TASKS
SCHEDULED JOBS
Large Web RolesSession Cache
(Worker Role)
GAME SERVICE
(MVC/Web API)
PROCESSING QUEUE
ADMIN TOOL
Medium Web Roles
NOTIFICATION
HUBS
COMMERCE
Purchases
(e.g. zoo cash
for concessions)
MOBILE DEVICES
(Windows 8 Phone, Windows 8 Tablet and Desktop)
AUTHENTICATION
Xbox Live
© 2014 Microsoft Corporation. All rights reserved. Created by the Azure poster team Email: [email protected]
The game Zoo Tycoon Friends lets players adopt virtual animals and build habitats and exhibits, make in-game purchases of items, and invite friends to visit their zoo. The Game service validates every action taken by the player since many involve purchases with “zoo cash.” To do this, the Game service replays the players’ actions to test the actions and the results.
Player authenticates to Xbox Live using a
Microsoft account and receives a token.
The client app contacts the Zoo Tycoon Friends
Game service with the token. All messages are
sent via REST APIs over HTTPS.
The service validates the token with Xbox and
generates a Session ID that is returned to the
client, and is also stored in the session cache.
The Game service sends the current game state
(from blob storage) to the client app so the
player can begin playing.
The player’s actions (via REST APIs) are sent to
the Game service. Each action is now a
transaction that must be validated by the
service.
Transactions are stored in the active
transactions table.
A request is placed in the processing queue.
A worker role pulls the request from the queue.
The worker role retrieves all transactions for
the same user from the active transactions
table.
The worker role validates all batched
transactions by “replaying” the action and
testing the result.
After validation, the processed transactions are
stored in the transactions archive then deleted
from the active transactions table.
A success/failure notification is stored in the
notifications storage table. The Game service
checks the table when pinged by the client.
The worker role deletes the message from the
processing queue. A new game state is
generated. Any actions that require
notifications are handled by a background
task.
The new game state for the player is stored in
the blob storage.
The Game service sends the validated results to
the player. If an action fails, the player is
notified, and the failed transaction is rolled
back on the client app.
A background task triggers notifications sent
to the user.
The Admin service performs actions as
required on the system using data stored in
blobs and table storage.
When a player buys virtual currency from the
Windows Store, the Game service web role
validates the receipt through the Commerce
service and credits the player with virtual
currency.
Zoo Tycoon Friends Architecture
1
6 3
7
8
9
10
11
2
13
12
15
14
16
17
18
5
4
INTERNET
1
2
3
5
6
4
7
8
9
10
11
12
13
14
15
16
18
17