awslabs / amazon-dynamodb-lock-client

The AmazonDynamoDBLockClient is a general purpose distributed locking library built on top of DynamoDB. It supports both coarse-grained and fine-grained locking.
Other
472 stars 85 forks source link

amazon-dynamodb-lock-client as singleton #85

Open gianluigiruggeri opened 1 year ago

gianluigiruggeri commented 1 year ago

Hi guys,

I would like to use this library in a SpringBoot service. Is it a good idea to use the client as a singleton? I mean, I'll instantiate the client in order to have only one background thread (HeartbeatBackgroundThread) that will check locks. Is this a good way?