amosproj / amos2021ss07-bike-nest

MIT License
1 stars 0 forks source link

Reserve a concrete bikespot when booking #145

Closed rmandlx closed 3 years ago

rmandlx commented 3 years ago

Currently upon receiving a booking, the backend just decrements the counter for free bikespots. It should save the spot number, that the user actually gets. We have to adjust the database model for this and it might not be that easy...

rmandlx commented 3 years ago

First work is done. Seems to be pretty easy but there are a few concerns. For example: Are race conditions possible? (Two people book a spot and they both get the same? How is such stuff handled by Spring?)

Also should we continue storing the number of open spots in the bikenest table or just always calculate it from the bikespot table?

See 109a7bf