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 emaalouly1 · Jul 22, 2016 at 04:56 PM · CloudScriptFriendsShared Group Data

SharedGroupData Notification on Desktop

Hello,

I have made a notification system (friend request, invite to game...) on a desktop game using unity as follows:

- Client sends a friend request using a cloud script function

- The function then fills in the SharedGroupData of the friend with the name of the player who sent it

The player receives the notification, but the way I am refreshing the notification list is by using the "Heartbeat" method, which is to request the data from the SharedGroupData every like 5 seconds or so.

But isn't this too costly to keep requesting data every few seconds? because I have other methods that does the same like the friends list that keeps refreshing in the same way.

This is working perfectly, and I know there is no push notifications for desktops, but is there a better solution than this?

Thank you

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 · Jul 22, 2016 at 05:25 PM

Yes, we'll be adding a publish/subscribe system in an upcoming release, at which point you'll want to move to that. For now, if you use a heartbeat model for this sort of thing, please don't query more often than about every 30 seconds (which is similar to the heartbeat period in PSN and XBL).

Comment

People who like this

0 Show 4 · 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 emaalouly1 · Jul 23, 2016 at 09:33 AM 0
Share

Alright I will stick to the 30 seconds heartbeat for now, but that means if someone invites his friend it will take up to 30 seconds before he receives the invite..

Can you please explain more of what the publish/subscribe system is? and how long is approximately the upcoming release for it? a month, a year?

avatar image Brendan ♦♦ emaalouly1 · Jul 23, 2016 at 06:11 PM 0
Share

Honestly, I can't see that being an issue for your players. The heartbeat time on Xbox Live is such that it can be up to 40 seconds before you get a presence update for friends, and I've never heard of that being an issue.

The pub/sub model is that an entity (client/server) will be able to subscribe to specific events from another entity. So you'll be able to specify PlayStream events that, when they occur, you'll receive a notification if you've subscribed with a listener. We'll have all the details at release, which is targeted for later this year.

avatar image emaalouly1 Brendan ♦♦ · Jul 24, 2016 at 09:38 AM 0
Share

Well I never noticed that a game invite would take up to 40 seconds to be sent to my friend, it always seemed instant, that's why I was asking. But if it like that then I am no better than Xbox live or PSN, 30 seconds it is!

And thank you for the info Brendan, I'm always bothering you :)

Show more comments

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

    Can We call Cloud Scripts in Unity - void Update() for receiving a friend request ? 2 Answers

    How to access the variables in the cloud script ? 1 Answer

    How to access the variables of cloud scripts in Unity's C# script ? 0 Answers

    ExecuteCloudScript Errors - 'ExecuteCloudScriptResult' does not contain a definition 0 Answers

    Cloud Script Return Value Problem - Null Reference Error 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