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 /
  • API and SDK Questions /
avatar image
Question by Qinzhu Xu · Jun 19, 2019 at 01:48 AM · dataTitle DataShared Group Data

How to store frequently read/written shared data?

Hi,

I am working on a game with Playfab. In the game, I need to store/moodify some shared data for all players. I check out title data and shared data but they are not suitable for my game according to the documents.(title data doesn't allow frequent write operations and shared data is only for a dozen of players). Does anyone know the solution?

Thanks in advance!

Comment
Qinzhu Xu

People who like this

1 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 SethDu · Jun 19, 2019 at 08:14 AM

May I ask what is the scenario?

If what you want to do is aggregate information across all users into a single row of data - that's not supported by the existing data systems. I'd have to recommend using a Redis Int per item (or similar) for this, so that you can do the aggregation there, and query it directly.

If you are looking for a public data that can be exposed to all players and you don't need to update it simultaneously, my suggestion is to use Player Data. Player Data can be a shared resources (actually it is by default) and it is feasible to query other players data. First you need to know the usage of Player Data: https://docs.microsoft.com/en-us/gaming/playfab/features/data/playerdata/. As the player data, including player read-only data and player internal data, has permission configurations, you can choose any of them as public so that those data can be seen by other users via GetUserData Client API call:

Just want you to know that title data is not designed for frequent changes because first it is a sharded resource as you know, which means the synchronous process of each shard is different after you update it, second, each time you query title data via GetTitleData, you cannot defined a specific shard so that you may get previous version of title data (you get response from a shard that hasn’t synced yet). However, it will only take few minutes until all shards are up-to-date.


snipaste-2019-06-03-14-50-17.png (21.1 kB)
Comment
Qinzhu Xu

People who like this

1 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 Qinzhu Xu · Jun 19, 2019 at 09:48 AM 0
Share

@SethDu Thanks for answering.

My scenario is like aggregating information across all users.

In my game, there are events players can join and they can also see the info of events(like number of participators). So every time a new player join the event, the info of event will be modified. I plan to use .json file to store events, so in this case, number of participators will be changed and the array of participators will be expanded. Simultaneous update will happen in my case. Will Redis work in my case?

avatar image SethDu ♦ Qinzhu Xu · Jun 27, 2019 at 08:54 AM 0
Share

A redis cache could work, or maybe a persistent service that can keep the shared values in memory.

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

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Writable Shared Title Data 1 Answer

    Using playfab for a calendar in Unity 1 Answer

    Data Access of Other Players 1 Answer

    Fast/Instant Title Data Update 1 Answer

    Use Shared Group Data for a live event system? 4 Answers

    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