Best practices for resending a failed Request (using Unity SDK)
B
Baris Tumerkan
started a topic
about 8 years ago
What is the recommended way to resend a request after it has failed (e.g. due to connection problems)?
I want to make sure that the same request is not mistakenly processed multiple times by the server, even if it is sent more than once (e.g. because the client sent it, lost connectivity before receiving an answer, but the server received it. So the client thinks the message failed, so re-sends the same request at a later time - the server should not process the request again).
It would also be good to unite several failed requests and later resend them as one request.
I can do this using custom transaction ids and such, but I want to know if there is a more straightforward and efficient way
Best Answer
C
Customer Support
said
over 7 years ago
Hi Baris,
The Unity SDK includes a function called setDurable which when set to true will store your requests in a queue to be sent to Gamesparks later in the event of a sudden connection drop. This will protect your game from random disconnects and allow highscores, challenges and other requests to be sent once the connection has been restored. Using this will save you having to come up with a custom solution. You can read more about it here.
Thanks,
Liam
1 Comment
Customer Support
said
over 7 years ago
Answer
Hi Baris,
The Unity SDK includes a function called setDurable which when set to true will store your requests in a queue to be sent to Gamesparks later in the event of a sudden connection drop. This will protect your game from random disconnects and allow highscores, challenges and other requests to be sent once the connection has been restored. Using this will save you having to come up with a custom solution. You can read more about it here.
Baris Tumerkan
What is the recommended way to resend a request after it has failed (e.g. due to connection problems)?
I want to make sure that the same request is not mistakenly processed multiple times by the server, even if it is sent more than once (e.g. because the client sent it, lost connectivity before receiving an answer, but the server received it. So the client thinks the message failed, so re-sends the same request at a later time - the server should not process the request again).
It would also be good to unite several failed requests and later resend them as one request.
I can do this using custom transaction ids and such, but I want to know if there is a more straightforward and efficient way
Hi Baris,
The Unity SDK includes a function called setDurable which when set to true will store your requests in a queue to be sent to Gamesparks later in the event of a sudden connection drop. This will protect your game from random disconnects and allow highscores, challenges and other requests to be sent once the connection has been restored. Using this will save you having to come up with a custom solution. You can read more about it here.
Thanks,
Liam
Customer Support
Hi Baris,
The Unity SDK includes a function called setDurable which when set to true will store your requests in a queue to be sent to Gamesparks later in the event of a sudden connection drop. This will protect your game from random disconnects and allow highscores, challenges and other requests to be sent once the connection has been restored. Using this will save you having to come up with a custom solution. You can read more about it here.
Thanks,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics