1

In my project, multiple race condition scenarios are taken care by writing critical section inside the code as there is no locking mechanism available for Blazegraph database. Application is deployed in AWS Fargate(docker).

Disadvantage is that we are not able to scale the application in multiple containers due to synchronized block in the code.

Example:

  1. I have a project with multiple revisions. Only one user should be able to commit at a time. Commit is done by reading latest revision number in the project. Hence code to fetch latest revision number and commit new revision is in a synchronized block.
  2. An object counter is maintained in project in order to generate sequential id for every save request. Hence code to fetch latest object counter and increment is in a synchronized block

Possible options:

  1. maintain queue - too costly as all the requests need to be routed via queue
  2. keep "uuid" as id - business reasons. cannot be changed

Any suggestions are welcome. Thank you so much in advance.

Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
Linz
  • 354
  • 2
  • 14

0 Answers0