Sign In Register

How can we help you today?

Start a new topic

Are events queued?

Are event requests queued, or can they get processed simultaneously?


I have CloudCode that conditionally operates on player data. If two logEvent requests fire and operate at the same time on the same data I could have a race condition.


Hi Daniel,


Yes the requests sent by the SDKs are queued and sent in order. Let us know if you have any further questions.


Regards,

Liam

In our case we aren't using the SDK to send requests, we are using the REST API. To be more specific, the send order is irrelevant as the requests can be sent by multiple sources. Are the requests upon being received by GameSparks servers queued and then processed in order of reception?


Thanks,

 - Daniel

Hi Daniel,


No I don't believe they are. The SDK will handle the queuing and sending of events but as you are using the REST API and not an SDK there is no control over this.


Regards,

Liam

Thanks for getting back to me on this! How do developers avoid race conditions in cloud code then?

To be more specific, do you support (or plan to support) conditional puts in your NoSql API? I suppose we can implement optimistic locking/versioning[1] on our end, but it would be better to have a server-side guarantee.

[1] https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.OptimisticLocking.html

 


1 person likes this
Login to post a comment