some operations on the backend could introduce race conditions.
one obvious example would be two clientes trying to get the last free bikespot at the same time.
i think for our case we could just use the java synchronized blocks for the controller methods that have possible race conditions.
that however would prevent scaling the booking service... the better solution would be locking on database level?
all of this would introduce a lot of overhead, so we should definitely first focus on the important use cases and assume that no race conditions will happen...
some operations on the backend could introduce race conditions. one obvious example would be two clientes trying to get the last free bikespot at the same time.
i think for our case we could just use the java synchronized blocks for the controller methods that have possible race conditions. that however would prevent scaling the booking service... the better solution would be locking on database level?
all of this would introduce a lot of overhead, so we should definitely first focus on the important use cases and assume that no race conditions will happen...