Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by darren zou · Apr 08 at 03:00 PM · Player DataCustom Game ServersPlayer InventoryTrading

Azure SQL server with PlayFab. How and what to store?

:[ really didn’t want to go this path but with msft having huge cloud infrastructure obviously they would want users to go there.


question: since playfab stores most vital information for us, what should I store on sql? Should I duplicate as much playfab info on the player on sql as well?


goal: my goal for making an sql is to do things like store trade history for players, query all players trade history by anyone. Implement a tax for guilds, a tax for lands etc... all of which I can’t work around with existing playfab resources unless I am missing something. Thanks.

I also don’t want to add too many external APIs, because 200ms adds up...

side question: do you think I should use firebase cloud functions instead? I’m debating whether to use a nosql because multiplayer games are relational heavy.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Apr 08 at 06:26 PM

Double-pumping API calls to different endpoints isn't recommended, since a) you're inevitably going to have sync issues between the data sources, and b) it's not the most cost-effective route.

What would be better would be to use the event export service to get all your data into Azure Blob storage, and then use it from there using PowerBI (or similar). That way, you could do things like run a script that queries for player trades for the last 24 hours and so generate your daily tax.

But then, this might be even simpler for some of what you have in mind, depending on your requirements. If what you really want for the tax concept, for example, is to apply a tax to any trade transaction, you could just set up a Rule that fires an Azure Functions Cloud Script Action which does the calculation and applies the tax where you need it.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image darren zou · Apr 08 at 06:46 PM 0
Share

Event exporter is not what I’m looking for. The data I need to track is constantly changing dependent on playfab. Like I need to read tax Rate data field constantly and playfab says I the shared data shouldn’t be read too much. Same thing for storing and reading trading history for all users.

avatar image Brendan ♦♦ darren zou · Apr 08 at 07:17 PM 0
Share

If you mean shared group data, that's correct - that data type is really just user data with no user owner, so it shouldn't be used for cases where you have a lot of players trying to use it (for read or write). But Group data (Entity Objects and Files) is designed for guild/team/clan use, so you could use those if the number of players using the specific data is only 1K or so. Also, if the tax rates are global, you might consider using Title Data, since that can be used to serve data to all players in the game (though if the tax rate is dynamically changing, obviously this wouldn't be useful).

But it sounds like what you're saying is that you want to aggregate data in real-time across all players and make dynamic changes to global parameters. If so, the frequency of data changes really means you will need an in-memory data system, rather than disk-based. If you want to use SQL, you should check out In-Memory OLTP. Otherwise, I'd recommend Redis or similar.

I'd still recommend looking at the export route, since that should be a lower cost solution overall. The trade-off is that you'd be limited to aggregating and updating your globals once an hour (the max frequency for export).

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    4 People are following this question.

    avatar image avatar image avatar image avatar image

    Related Questions

    Connection Problems 1 Answer

    Randomly Generated items - best practices 1 Answer

    Get Player and Character Inventory 1 Answer

    Data heavy games and rate limits 1 Answer

    Best practice for getting user data and account info on login 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges