Sign In Register

How can we help you today?

Start a new topic
Answered

Event ordering

Unity SDK specific - 

setDurable functionality aside, are GameSparks event messages guaranteed to be sent in order?


Assuming I have multithreaded functionality on the client (maybe co-routines or whatever), and I fire off an event to the server and time X - and in another thread, I fire off another event at time X+4 milliseconds - are the messages queued for sending from a single handler in the GameSparks SDK - and sent in the order in which they were requested  - or is itself threaded - managing each request independently?


thanks in advance!!




Best Answer

Hi Jeff,


The Unity SDK will queue the requests, iterate though that queue and send them in correct order. The support team has yet to come across  an issue relating to events being out of order, the chances of this happening are extremely unlikely. If you have any further questions just let me know.


Thanks,

Liam


The java sdk appears to use a queue that sends events in submitted order....but wasn't sure if this was true of the Unity SDK as it's functionality is tucked away in a DLL

Hi Jeff,


I'll look into this and get a definitive answer for you.


Thanks,

Liam

Answer

Hi Jeff,


The Unity SDK will queue the requests, iterate though that queue and send them in correct order. The support team has yet to come across  an issue relating to events being out of order, the chances of this happening are extremely unlikely. If you have any further questions just let me know.


Thanks,

Liam

Thanks for the info!!!

As far as I understand, the requests in the regular queue don't wait for a response for the previous request though, and I assume requests can be executed concurrently on the server (I might be wrong about this). Since the cloud codes can take different amounts of time to execute, relying on the execution order of these doesn't sound right (we had implemented our own queue to deal with this).

@Baris - ya - the more I think about it - the more I agree with you - just because they are guaranteed to be sent from client in order - doesn't mean they will be processed (in totality) in order at the other wise).  We also have implemented our own queue to pipeline requests client-side (to wait for response before sending next)


Login to post a comment