question

Choi Yan Lok avatar image
Choi Yan Lok asked

Disable Playstream events for cloudscript execution?

Is it possible to disable playstream for all or some events?

In our game, the player calls a cloudscript function downloadChart() to download the levels. We have around 30+ levels, and each level is around 70kB. As executing cloud script creates a playstream event with the function result, downloadChart() alone creates 70*30 = 2100 playstream events, which costs around 0.0126 USD.

Along with our other events, we estimate that playstream events alone will be responsible for over 70% of our monthly playfab cost, at around 4000USD/month (0.04/MAU, much higher than before the pricing update). Our publisher is not happy with it.

Therefore, we would like to see if it's possible for us to disable playstream events for certain or all events, such that the monthly cost won't be so insane.

Thank you.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Choi Yan Lok avatar image
Choi Yan Lok answered

I just realized that there's a GeneratePlayStreamEvent in ExecuteCloudScriptRequest. By setting it to false should solved the problem

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

Yes, that's right, you can set GeneratePlayStreamEvent as true to bypass the Playstream events.

BTW, have you considered storing level files in Title Entity Files or CDN?

0 Likes 0 ·
Choi Yan Lok avatar image Choi Yan Lok Citrus Yan commented ·

We were using CDN originally, but have switched to title data + cloud script as it allows us to encrypt the level data using player specific ids, and is cheaper then CDN.

As for title entity files (and other entity data type), the limit of 10 files per title is too small for our case. Has the limits changed since the upgrade to consumption-based pricing?

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Choi Yan Lok commented ·

Its default limit hasn't changed, but it's possible that we can set up a custom limit for you if you like.

0 Likes 0 ·
Citrus Yan avatar image
Citrus Yan answered

Currently PlayFab does not support disabling certain/all PlayFabstream events. May I know more details about the flow of the function downloadChart()? Why it alone creates 2100 events?

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Choi Yan Lok avatar image Choi Yan Lok commented ·

by 2100 events, I mean 2100 weighted (pricing) meters of playstream event.

Each of the cloudscript function downloadChart() returns around 70kB data, as the function result is recorded in each playstream event by default, it counts as 70 playstream events. Each player will execute downloadChart() at least 30 times in order to download all levels, and hence, it will create 2100 weighted playstream event.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.