question

officetest avatar image
officetest asked

Often updated content lists. Job for the Title Data?

Hello! In my app I will need to support lists of data, that will be updated often (element deleted, element added) and it will be shown to all the clients.

I tested this with the Title Data and it works great for parsing the data and then reading it in Unity. After reading the documentation however I am left with the impression that I cannot just add another line or two to a Value of a certain Key-Value pair. Is that true?

Because creating a new title data pair every time the list needs to be modified its not going to be the best solution.

I would be very thankful if you can give me a direction on this topic. Thank you!

unity3ddataTitle Data
10 |1200

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

1 Answer

·
brendan avatar image
brendan answered

First, what do you mean by "updated often"? Please bear in mind that Title Data is a sharded and cached resource, so when you update it there's going to be a delay before all endpoints are updated with the latest information. That's why we highlight that Title Data should not be updated frequently, and definitely cannot be used in any case where the update originates from a client action.

But if you only mean that the data will be updated a few times a day, there's nothing preventing you from updating a single key/value pair to add or remove some data from it. What documentation are you referring to?

11 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.

officetest avatar image officetest commented ·

@Brendan , I need to have lists of "upcoming lectures" in my app. After a client submits a draft to a "moderator", and the draft gets aproved, the list will then be updated with his upcoming lecture included.

If a lecture is not upcoming anymore, it will be removed from the list as well.

As you can see, I do not need updates every second or something like that. Is then Title Data the best solution? And if it is, can you please hint me at how to add data to key-value pair from script in unity. I read about UpdateTitleData but it overwrites the whole thing, right?

Thank you in advance!

0 Likes 0 ·
brendan avatar image brendan ♦♦ officetest commented ·

No, as I said, Title Data must never be updated as a result of a client action. The problem is that again, Title Data is sharded and cached - that's how were able to serve it to all players in a game at the same time. But because of that, if you have multiple sources updating it, they are going to collide causing data loss.

Can you describe at a high level what the feature is you're trying to develop and how it is used? I think what you're looking for is a way to update a single piece of generic data from all clients in a consistent manner, and have that be available for all players to read. There's no generic data system available that can do that, as it would be extremely expensive to operate. If there are ways this can be scoped to a much more limited set of requirements, that might be the best place to start.

1 Like 1 ·
officetest avatar image officetest brendan ♦♦ commented ·

@Brendan, thank you for responding so quickly again. At a high level the feature will be something like this - all upcoming lectures (a lecture will include simple data like "title", "description", "image url", etc) will be represented as some sort of list in Unity.

What I need is a way to save those "lecture" type of data, so that when the client starts the app, it will get the latest lecture list from Playfab.

0 Likes 0 ·
Show more comments
officetest avatar image officetest commented ·

@Brendan, what if the clients just send a draft to me, and after I review it, I then choose to add it to the list or not. That way only me, the admin will change the data.

I think maybe title data would work in that case. However, is there a way to modify an existing key-value pair (without overwriting the old data, just add new one to it)?

0 Likes 0 ·
brendan avatar image brendan ♦♦ officetest commented ·

Are you talking about a manual process, or automated? If it's an automated process, you're still going to run into the same issue - too frequent requests to update Title Data could cause you issues.

But no, a KVP in DynamoDB is specifically a row of data. The only way to update it is to replace it.

0 Likes 0 ·
officetest avatar image officetest brendan ♦♦ commented ·

@Brendan, thank you for all the information. I guess I will have to find a workaround way for this list. Thank you again!

0 Likes 0 ·
yehor avatar image yehor commented ·

@Brendan, you have mentioned a delay between updates. How long can it take to update title data on all endpoints?

0 Likes 0 ·
brendan avatar image brendan ♦♦ yehor commented ·

It can take several minutes. What are the specifics of your scenario?

0 Likes 0 ·
yehor avatar image yehor brendan ♦♦ commented ·

Events are held during some period and after that period the custom winners sorting is made. During the event winners array is placed inside event data, which is inside title data. I already has task to check if event is finished by the time and if so then remove it from events. So i can do the following: if the event is finished a day ago, then remove it and start winners sorting.

0 Likes 0 ·
Show more comments

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]