GS2-Lock SDK for Game Engine API Reference
Specifications of models and API references for GS2-Lock SDK for Game Engine
This service is designed to achieve exclusivity.
GS2-Lock acquires locks on a “mutex” resource identified by a combination of “namespace”, “user ID”, and “property ID”.
For the property ID, you specify an arbitrary string that uniquely identifies the resource you want to mutually exclude. For example, a usage pattern is to assign a different property ID per process you want to avoid double-executing, such as “gacha drawing process”, “item count update”, or “external integration notification”.
A transaction ID is specified when acquiring a lock. If the same transaction ID acquires a lock on the same mutex recursively, the reference count is incremented and it behaves as a reentrant lock. The lock is fully released only when Unlock is executed the same number of times.
A TTL (Time To Live) can be set on a lock, and the lock is automatically released after the TTL elapses.
Because GS2-Lock is provided as a GS2 microservice, you can implement common mutual exclusion across multiple titles, multiple backend servers, and multiple regions.
You can also call it from GS2-Script to perform mutual exclusion between the internals of server-side scripts and other script executions or external processes.
Specifications of models and API references for GS2-Lock SDK for Game Engine
Specification of models and API references for GS2-Lock 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