I want to update some title-wide data from an external server. I'm trying to do this as a PlayStream event (using WriteTitleEvent) and with an associated Rule, but the Rule isn't firing. Is this supported?
(I could use SetTitleInternalData instead, but I'm concerned with data races and I'd prefer to notify PlayFab and do the actual title data write in CloudScript)
Answer by pfnathan · Mar 02, 2018 at 06:46 PM
Can you let us know your TitleId, please? we would like to view and replicate your issue.
Our TitleId is EC18. The event I'm adding is called "live_event_updated".
Can you run your script on Postman to see if you can replicate there and share your result please, it seems that CloudScript triggers on our end if the issue persists you would need to fix your CloudScript, meantime, we will run few more tests as well.
The script is just a stub (for now). My problem is that I can't tell if it's running or not when the PlayStream event happens.
Are TitleEvents allowed to trigger Rules?
Can we take a step back to discuss what it is you're trying to do, exactly? The statement that you're concerned abut data races makes it look like you're attempting to update Title Data frequently, which is not supported.
Data race was the wrong term to use.
We plan to have a small group of people using a tool which can modify the title data, and I want to rule out conflicts due to simultaneous updates as much as possible.
If it's a small number of people, the odds against that should be pretty high, since they would literally have to be updating the exact same key/value pair at the exact same time. But one thing to be aware of is that we're finalizing a new data system that we'll be releasing around GDC time, which is designed for multiple users updating it. To be clear, it'll return a "busy" error if you try to update the KVP while someone else's update is in progress, but that would then let you use that specific response to do a backoff-and-retry.