TimMcCool / scratchattach

Scratch API wrapper with support for almost all site features, cloud requests framework and more
MIT License
177 stars 48 forks source link

Ghost requests are back. #200

Closed TheCommCraft closed 1 month ago

TheCommCraft commented 6 months ago

130 is back I think

phrzip commented 6 months ago

When does this bug occur?

TheCommCraft commented 6 months ago

Whenever the program starts anew I'd say

phrzip commented 6 months ago

hmm, weird I'm gonna take a look at the code

crzylemon commented 6 months ago

i had this too

blazgocompany commented 2 months ago

I believe this has nothing to do with scratchattach but is something with the scratch servers itself:

See https://en.scratch-wiki.info/wiki/Cloud_Data

In October of 2016, the cloud infrastructure started to fail occasionally. As a result, many multiplayer-focused projects did not work correctly. This has been attributed to the ever-increasing number of active users who are using cloud variables, with some projects sending up to 30 requests per cloud variable per second. This effectively "spammed" the cloud server with a load that couldn't be handled by the current infrastructure and shut it down.

As a temporary fix, cloud variables have switched to using a different polling method, which is more reliable but significantly slower. Furthermore, the polling interval time was increased, to prevent spam. This new method works but may cause cloud variables to "rubber band" and reset to a previous value after it has been changed, as well as making many multiplayer projects less "real-time" or completely breaking them in general.

I believe this "rubber-band" effect is causing these "ghost requests"

TheCommCraft commented 2 months ago

Yes, but this can be mitigated by ignoring initial cloud variable values

blazgocompany @.***> schrieb am Mi., 4. Sept. 2024, 16:15:

I believe this has nothing to do with scratchattach but is something with the scratch servers itself:

See https://en.scratch-wiki.info/wiki/Cloud_Data

In October of 2016, the cloud infrastructure started to fail occasionally. As a result, many multiplayer-focused projects did not work correctly. This has been attributed to the ever-increasing number of active users who are using cloud variables, with some projects sending up to 30 requests per cloud variable per second. This effectively "spammed" the cloud server with a load that couldn't be handled by the current infrastructure and shut it down.

As a temporary fix, cloud variables have switched to using a different polling method, which is more reliable but significantly slower. Furthermore, the polling interval time was increased, to prevent spam. This new method works but may cause cloud variables to "rubber band" and reset to a previous value after it has been changed, as well as making many multiplayer projects less "real-time" or completely breaking them in general.

I believe this "rubber-band" effect is causing these "ghost requests"

— Reply to this email directly, view it on GitHub https://github.com/TimMcCool/scratchattach/issues/200#issuecomment-2329189032, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATCKMZQTZXSWAXOAL3T2ITLZU4IYLAVCNFSM6AAAAABGYJPCJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGE4DSMBTGI . You are receiving this because you authored the thread.Message ID: @.***>