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 max · Aug 09, 2016 at 03:31 PM · Player DataMatchmakinggame managerShared Group Data

Where to save single match data?

In my game the players compete in 1v1 matches and I'm currently wondering where I would save the results of all matches ever played and the full match replay data.

1) Would it be possible to create a Shared Group for every match ever played and save the match data there?

2) When using Shared Groups, I've read that all players added to the group can write data to it, hence I think I could not add the players the normal way, but save them to a key/value. Then I would save the shared group IDs to the players' data to remember which matches the players participated in. Is that correct?

3) Is there a limit how many Shared Groups I can create? I only found limits about how much data can be saved in the groups.

4) If I upgrade the Shared Groups Data, I could not only save the outcome of matches, but also the complete match replay in a group. I would like to analyze that data on my local machine to adjust the game's balancing. The question here is: Is there a way to download all Shared Groups Data?

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

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Aug 09, 2016 at 10:25 PM

Shared Group Data was provided as a result of specific requests for a generic data space that wasn't player-specific, where a small number of players could share some info. As with anything else, it is not unlimited, since there would be no way for us to afford offering a free tier if that were the case. Specific to your questions:

1 and 3 are really the same question, effectively. The answer is that if you need more than 10 Shared Group Data IDs per player (so, since each game has two players in your model, that would mean you could have info stored on 20 games per player), please email your requirements to us at devrel@playfab.com so that we can work with you on pricing for your data needs.

For 2, that's one way to approach this, yes. And since you're talking about saving an indeterminate number of them per player, it would be best to have a record in each player account for the Shared Group Data IDs that store their games, yes.

For 4, no, not in our shared service. In addition to it not being cost-effective, as it would be scraping data from the table for potentially millions of records at a time, we cannot allow any one title to perform an operation which could cause database access issues for other titles. That's why we don't provide open database query against our core service databases. Developers with a private PlayFab instance can have more direct database access, but we would still advise against doing this, as it could impact response times to users. For local analysis of your title, whether for game match data or anything else, you should use events to track on that data, and either use an integrated analytics partner or your own S3 bucket linked to PlayStream for storage, so that you can evaluate that information.

Comment

People who like this

0 Show 0 · 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

Answer by max · Aug 10, 2016 at 03:10 PM

Thanks for your answer!

Okay, so for the first time I got an idea about how I could save my match data on PlayFab, so players can still access it. My current estimation is that saving a full match takes a maximum of 5000 bytes. Hence, I'd probably need the Shared Group upgrade (though 100k bytes is also a bit too much ;) ).

1) Is there any better way to do this in PlayFab than Shared Groups?

2) About saving and accessing the data: As far as I understood I would create a new player event once a match is over (https://api.playfab.com/Documentation/Client/method/WritePlayerEvent). Then this event would get piped into my own S3 bucket. Is that correct?

3) I've seen that events have a maximum size of 1024 bytes, though the events that I'd pipe into my own S3 bucket would have a maximum size of 5000 bytes. Do I miss something here? What's the solution for this?

4) I have also checked the analytics partners but they seem to be rather expensive, I guess my own S3 bucket would be way cheaper here. Which S3 region would I have to use ideally?

5) When sending the events to my own S3 bucket, will the single events sent one by one or as a big chunk from time to time? Also will the single events be saved as single json files on my S3 bucket or will it be a single file per day?

Comment

People who like this

0 Show 0 · 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

Answer by Brendan · Aug 10, 2016 at 07:18 PM

Shared Group Data is indeed one way to do this, though again (to be clear), it's intended to be used the same way player data is - you can update it frequently, and multiple players can access it, but it is not designed to be used like Title Data (read by all users), as it's not a sharded/cached resource.

For your new questions:

1. That depends entirely upon the requirements. If Shared Group Data doesn't meet your requirements, you could use your own database, integrated via Cloud Script, or we could discuss a custom development contract for something more suited to your needs.

2. Yes, All PlayStream events will be piped to your S3 bucket, if you have configured that in PlayStream.

3. In order for PlayStream to operate efficiently, we do have to restrict the maximum event size. If your design requires larger events, please email the specifics to us at devrel@playfab.com so that we can discuss whether we can support your specific scenario and what the upgrade cost would be to do so.

4. You can use any region you like for your own S3 bucket, as long as it can be reached from the main PlayFab service (so, if you're using the core, shared service, from AWS USWest - which would mean that we cannot write from there to AWS Beijing). A private instance of PlayFab can operate in any region you need, however.

5. We batch update the events to your S3 bucket for performance reasons, with each batch being a distinct JSON stream file. These batches are very short (currently around 10 seconds, but please be aware that this could change over time).

Comment

People who like this

0 Show 0 · 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

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

    1 Person is following this question.

    avatar image

    Related Questions

    Referral system by code in the game. 1 Answer

    Matchmaking with parties/multiple local players 1 Answer

    Matchmaking MatchTotalRule error with Expansion 1 Answer

    Account created despite 503 on RegisterPlayFabUser? 0 Answers

    Turn based multiplayer card game 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