Did you find this helpful?
Parse Migration Guide
Migrating from Parse to PlayFab
How does PlayFab compare to Parse?
Both PlayFab and Parse provide back-end tools and services for building and operating your game, but there are several differences. Understanding these differences is important for planning a migration from Parse to PlayFab.
The most important difference is that Parse is a general purpose mobile backend, with very few game-specific features. With Parse, you need to write and test game-specific systems yourself using the basic building blocks that Parse provides.
PlayFab, however, is specifically designed for games, and includes a large number of game-specific systems that you can immediately start using without writing any custom code. Most developers tell us that building their game on PlayFab is much faster than building their game on Parse, but it is less flexible. There may be tasks that you could do in Parse that you cannot easily do in PlayFab -- at least, not without writing some custom code yourself.
This migration document assumes that you have already familiarized yourself with PlayFab’s features. If you haven’t, we recommend you start by reading this white paper, then come back to this document to learn more about the migration process.
Storing Files and data
Both PlayFab and Parse provide systems for storing files and data for your game and players, but they do it differently.
Parse uses MongoDB and loosely-typed objects to allow clients to store whatever information they would like in whatever format is convenient. Games can write arbitrary SQL queries to retrieve data for the game. This is very flexible, but it’s also easy to make mistakes that impact your game’s performance. It’s also hard to scale -- if your game suddenly takes off, you may need to shard your database to keep up with growth.
PlayFab takes a different approach. PlayFab also stores data in an underlying database, but the raw database is hidden from the developer. Instead, all data is accessed via a set of game-and-player-specific APIs. This is slightly less flexible, but much more scalable --- in fact, using the PlayFab APIs, you don’t need to worry about growth. Whether you have 100 players each day or 10,000,000, PlayFab will handle it.
With PlayFab, custom data is stored in these places:
- Game title data. Game-wide data which can be accessed by all players and game clients. This data is typically used for game content or configuration, such as level maps, upcoming events, or current promotions. See more here.
- Files. PlayFab provides support for uploading files, and then delivering them via an integrated CDN. See more here.
- Catalog data. Every item in the catalog can have custom properties associated with it, such as rate-of-fire for a weapon, or mana points for a collectible card. See more here.
- Inventory data. Every item in a player’s inventory can have custom properties associated with it, such as item hit-points, or config data for procedurally generated items.
- Group data. Data shared among a specific group of players, such as a guild or lobby. Examples include a guild name or message of the day. Players can be added and removed from a shared group; all members in the group can read or write shared group data.
- Player data. Data stored per player account, like Parse “Keyed User Data”; more info here. Data can be:
- Private (accessed only by the players public (accessed by other players)
- Scoped at either the publisher-level (shared across games by the same publisher), game-level, or character-level(tied to one of several characters the player controls in the game).
- Read/write from the client, read-only from the client, or invisible to the client. Player data is always read/write from the server.
- Player Stats. Stats are a special type of player data. They must be integers, and they have special properties:
- Leaderboards Any stat can be used to define a leaderboard (see social features).
- Segmentation Stats can be used to define player segmentation rules.
- Match-making Stats can be used as part of the match-making logic (e.g., find a match based on player’s level or weapon rating)
One limitation of the PlayFab approach is that it is not possible to write your own SQL queries directly against data stored in PlayFab. With PlayFab you can, however, segment players into different groups based on player stats and other properties. You can then trigger actions automatically as players enter and exit these segments, and soon you will be able to execute batch actions across an entire segment (e.g., give a gift, or send a message). Also on our short-term roadmap is searching for specific players based on their properties for match-making or challenges.
User Management and Authentication
Like Parse, PlayFab provides rich support for creating and managing player profiles. Player accounts can be linked to multiple different authentication mechanisms, such as Facebook, Steam, an email/password, an iOS or Android device ID, or your own custom identifiers, in order to make it easy to share a single player profile across multiple devices or platforms.
PlayFab’s Game Manager tool also provides a powerful set of tools for viewing and managing player profiles, ideal for debugging a game in production or providing customer support for a game post-launch. Using the Game Manager you can:
- View a player’s login history
- View and modify all player data and stats
- View and modify a player’s inventory, virtual currency balances, and purchase history
- See a history of the player’s multiplayer matches
- Reset a player’s password, or unlink an authentication type
- Temporarily or permanently ban a player
PlayFab has native support for sending push notifications to players, but this feature is primarily aimed at sending personalized messages directly to specific players. For sending bulk messages to many or all of your players, we have partnered with OneSignal, and have a OneSignal Add-on coming soon in our marketplace. For now, you can integrate the OneSignal SDK directly in your game; once the Add-on is complete, OneSignal will be integrated directly with PlayFab player segmentation.
Analytics & reporting
PlayFab has basic support for analytics and reporting built into the Game Manager. More advanced analytics providers are available through the PlayFab Add-on Marketplace, including Segment, Appuri, and Omniata (coming soon).
Many analytics events are generated for your game automatically (e.g., player logged in, player stat changed). Games can also log custom events from either the client or server. All events are automatically forwarded to any analytics providers installed via the Marketplace.
Like Parse, PlayFab can validate in-app purchase receipts from Apple and Google. Learn more here.
Importing Parse Users to PlayFab
PlayFab’s user import tool imports Parse user objects directly into PlayFab player profiles. If your title was primarily just using the Parse User object to store player properties, then your migration may be simple -- just export your users from Parse, import them into PlayFab, swap SDKs in your game, and modify your authentication and player profile storage calls.
There is no risk to experimenting with our Parse player import, since the process does not affect your live game or data. Also, you can re-run the import process as often as necessary during the migration process for your game, in order to ensure that no users are left behind.
User import how-to
Generate a Parse migration URL from within the Parse UI by clicking on the Export Data option in your Parse Application Settings->General tab (see below).
Alternatively, if you would like to export only handful of users for testing, go to Browse ->User, filter/choose users as needed, and Export Data (see below).
- Sign up for PlayFab developer account and create your game
In the Game Manager, browse to your title, and then to the AddOns tab.
Select the Parse Migration addon.
- Click the “Install Parse” button.
- Paste in the exported data URL from the email sent by Parse.
- Click "Import User Data".
- Migration will proceed in the background; there is no need to leave Game Manager open.
- Existing users will be updated with fresh information from the import.
- If no user already exists, one will be created.
- You may check back periodically to get the most recent status of the migration and see any errors that might have been encountered.
- Once migration is completed, review the provided log for any errors and to confirm migrated users count.
- Potential errors include: invalid URL, invalid data JSON format, or conflicting username or email addresses.
- Each error message will describe which user experienced the error so you can take appropriate action.
- Select the "Players" tab in the Game Manager.
- Review some of your imported players for general correctness.
- Download the PlayFab SDK and update your game client to point to PlayFab for your user functions. In particular, the following APIs will prove useful:
Migrating other Parse functionality
If your game is storing more custom data than just User objects, we can still help! Please contact us on our fsupport forum for customized instructions based upon your specific Parse utilization, and we will help you migrate as painlessly as possible.