question

szcuipeng avatar image
szcuipeng asked

Cloud Script Legacy performance?

hi, all

in my game project, every client will change player data and call a cloud script to update some other data(and do some check) when the client finish some actions. I don't know if this will lead to a poor performance. i am wondering if it's a good idea to update/check these data on a server side timer and just do a batch call in a single cloud script?

any advice will be appreciated ..

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

szcuipeng avatar image szcuipeng commented ·

Add some information:

inside the cloud script, i just read/write some player private date and title data. i guess it's very fast like access NoSQL.

is it a rpc...http/socket/websocket call from one cloud script to another cloud script?

0 Likes 0 ·

1 Answer

·
Neils Shi avatar image
Neils Shi answered

in my game project, every client will change player data and call a cloud script to update some other data(and do some check) when the client finish some actions. I don't know if this will lead to a poor performance.

inside the cloud script, i just read/write some player private date and title data. i guess it's very fast like access NoSQL.

In fact, you don't need to worry about it. Using CloudScript to update player data and doing some logic checks are common scenarios, it won't lead to a poor performance. But please note that Title Data is best suited for Global Constant/Static Data and is not suitable or reliable as Global Variables. And it is only supported for occasional changes are driven by the developer/publisher directly and cannot be updated due to a player action.

i am wondering if it's a good idea to update/check these data on a server side timer and just do a batch call in a single cloud script?

Since the CloudScript is a serverless service, If you own a server, then you don't need to use it.

is it a rpc...http/socket/websocket call from one cloud script to another cloud script?

Accessing and modifying player data in CloudScript are HTTP requests, and we don't recommend calling one CloudScript inside another CloudScript. For more information about CloudScript , you can refer to Intermediate: Calling the server APIs.

10 |1200

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

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.