Hey gaurav, I have a query.i have a cron job in which I have a scenario of same row getting inserted by multiple thread through concurrency which I want to avoid.how can we achieve this? Technologies used: jpa springboot webflux
43:00 why is queue required here for concurrent bookings? can't this be implemented using optimistic locking? whichever intent comes first, we update their status = locked so other two booking intents are going to fail because they needed to update on open status row only cause if I open two tabs simulatenously and try to book overlapping seats then one of them fails
will the booking be synchronous? how long does the server keep the connection of the client? let's say user has to wait for 5 mins in the queue, will the user see a buffering in the device?
Hey gaurav, I have a query.i have a cron job in which I have a scenario of same row getting inserted by multiple thread through concurrency which I want to avoid.how can we achieve this?
Technologies used: jpa springboot webflux
Must needed video after Coldplay's concert tickets demand.... 💀
Bhaiya, aapko mili kya ticket? 🥲
43:00
why is queue required here for concurrent bookings?
can't this be implemented using optimistic locking?
whichever intent comes first, we update their status = locked
so other two booking intents are going to fail because they needed to update on open status row only
cause if I open two tabs simulatenously and try to book overlapping seats then one of them fails
I guess they were assuming lockless or local lock design there.
will the booking be synchronous? how long does the server keep the connection of the client? let's say user has to wait for 5 mins in the queue, will the user see a buffering in the device?
how we can scale the event queue service
event queue is not a service we need to scale we just need to handle the single point of failure as multiple request comes it just goes into queue
40:30 isn't this wrong? not updating status from locked to open even though technically its open.
Yeah, it got missed... the bookingStatus will be 'Booked'.
Cant we use versioning to prevent double booking?
same doubt
At the end you have make it like, i will provide you seat number, customer dont have that liberty, this is not going to wrk
koi nahi bacha payga , sabka ticket katega 🎟😆
sabka katega ticket ,sabko is duniya se jana hai
💀💀