GS2-JobQueue SDK for Game Engine API Reference
Specifications of models and API references for GS2-JobQueue SDK for Game Engine
This service provides a job queue function.
A job queue is a queue with a guaranteed FIFO and can be used for eventual consistency. Eventual consistency is a mechanism in which processing is not guaranteed to be complete when the API responds, but “results in the intended state” after a certain amount of time has elapsed.
GS2 processes many aspects of reward distribution using eventual consistency. This is to avoid the possibility of various services becoming unavailable in the same way as if the server that manages the rewards were down when the rewards are granted. By registering reward granting processes in the job queue, eventual consistency is achieved through job retries, even if the target service is unavailable when the job is executed. The maximum number of retries can be specified, and if the maximum number is reached and the job does not succeed, it is stored in a model that accumulates failed jobs called dead letter jobs. The dead letter jobs can be used to provide individualized handling of jobs that have failed.
Jobs in GS2-JobQueue are not executed automatically; you must explicitly call the execution API. This allows the client to obtain the return values of jobs. For example, after completing a quest in GS2-Quest, a job to grant rewards is registered in the job queue. The client can explicitly execute the reward granting process obtained from the quest by running the job queue to completion. (This makes it possible to wait for the completion of delayed processing based on eventual consistency.) In addition, by referencing the return values of the job, the client can reflect the obtained rewards in the UI.
A job can only be registered and executed up to 3 times per second.
Specifications of models and API references for GS2-JobQueue SDK for Game Engine
Specification of models and API references for GS2-JobQueue SDK for various programming languages
The template format used when creating stacks with GS2-Deploy, and implementation examples of template output in various languages using CDK
Specification of verify/consume/acquire transaction actions