amosproj / amos2021ss07-bike-nest

MIT License
1 stars 0 forks source link

handle concurrency #177

Open rmandlx opened 3 years ago

rmandlx commented 3 years ago

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...