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 /
  • PlayStream /
avatar image
Question by harsh · Aug 21, 2020 at 11:52 AM · webhooks

How to queue up failed cloudscript executions triggered from PlayStream events?

I trigger a CloudScript from user_vc_item_purchased that calls a Webhook to my external server for purposes that aren't relevant here.

Naturally, the webhook provided may go offline (for a few minutes or longer). It's very important that this event is relayed to my server sooner or later.

What would be the suggested method to queue up such failed "event side-effects"?

One solution in my mind was to have a scheduled task that checks a queue every 5-10 minutes. If it finds any entries made by an exiting triggered CloudScript, it can take relevant action. In this case, however, I'm stumped as to what I could use as storage for the queue.

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

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by harsh · Aug 22, 2020 at 04:14 PM

Additional note: I am not referring to the Webhook menu in Game Manager, but api POSTs in cloud script.

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 harsh · Aug 23, 2020 at 08:35 AM

Currently, it seems my only avenue is to waste some of the entity data.

Failed webhook call -> Registered in relevant Player -> Next time server submits same request -> First checks entity data if that request has been applied already -> If yes, resends the failed webhook call

Comment

People who like this

0 Show 5 · 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 SethDu ♦ · Aug 24, 2020 at 02:16 AM 0
Share

I believe this workaround should be feasible. If configured properly, there should be very few failed Cloud Script executions, and creating Scheduled Tasks for it is not cost-effective. The main idea is to aimed at those players who have failed calls, instead of iteratively checking all players.

avatar image harsh SethDu ♦ · Aug 24, 2020 at 12:30 PM 0
Share

In a perfect solution, I wouldn't have iterated over all players. If I had some persistent storage where I could keep a queue of failed calls, the scheduled task could've used it. Depending on the usage pattern, the cost could be fairly low.

Please take a look at this:

https://community.playfab.com/idea/44070/creating-non-player-entities.html

avatar image SethDu ♦ harsh · Aug 25, 2020 at 08:57 AM 0
Share

If the scenario is multiple writes at a short time, PlayFab will hardly support it because there is no queued resources supported. Entity Objects support data version and every entity (title, group, players) should be able to use objects via SetObjects/GetObejcts, but it cannot guarantee to meet your requirement. An external Database might be a better workaround solution.

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

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Programmatically update Webhook Endpoint 1 Answer

    Webhook sends data multiple times to a google apps script web app endpoint 1 Answer

    PlayStream WebHook not sending title events 1 Answer

    Dynamic tokens in webhooks 1 Answer

    Photon PathEvent Webhook getting triggered multiple times? 2 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