educative.io

What is difference between ActiveReservationa and WaitingReservation, can we use RabbitMQ

Does ActiveResService mean that it loads the already booked tickets ?

Does WaitingReservation mean people who are currently blocked the seats.

Can we use RabbitMQ or some message queues for the above services instead of HashMap ?

In one of the interviews I was asked a question about Designing Flight Runway where In a minute a certain flights could be landed, if limit exceeds we should not allow other flights ?

I asnwered about using HashMap and the interviewer was not convinced.

I agree, a message queue is a great option, I was asked about designing a bank account with a number of users deposit / withdraw, he suggest use message queue.

Does ActiveResService mean that it loads the already booked tickets ?

No, it maintain reservation session which is not complete (exipire, cancel or complete)

Does WaitingReservation mean people who are currently blocked the seats.

This use queue to contains user who waiting for demand seats.

Can we use RabbitMQ or some message queues for the above services instead of HashMap ?

Yes, i think can.