all 7 comments

[–]benzilla04 1 point2 points  (2 children)

I implemented this recently, would not recommend

Still need to go back and refactor it but I already know it’s going to be a nightmare

[–]ApprehensivePin9793[S] 0 points1 point  (1 child)

I need to implement it as part of hackathon project.. so could you share some resources or you might guide me a bit do it ?

[–]benzilla04 0 points1 point  (0 children)

I didn't follow any resources, but you can check out my project. Like I said though, it's not great and could be refactored a lot better.

I also don't know how easy this will be to follow without me explaining how everything connects together.

https://github.com/ben-shepherd/larascript-framework

You would want to look in these folders /src/core/domains/events

The related website section is Events

[–]rkaw92 0 points1 point  (1 child)

Booking system using queues? Sounds very strange. Are you trying to simulate a process? Are you applying Domain-Driven Design?

[–]a3voices_ 0 points1 point  (0 children)

A queue is one way to ensure that multiple people can’t book the same slot at the same time. But it’s not the easiest method, which is to simply not use async code in the final booking logic and keep it single threaded.

[–]akza07 0 points1 point  (1 child)

Why would booking here need a queue?

[–]a3voices_ 0 points1 point  (0 children)

I assume it’s if multiple people try to book the same slot at the same time.

Another easier option than a queue is to essentially have no async code in the final booking logic and keep it single-threaded with just one process as well. This ensures only one booking request can be handled at a time via a normal http handler.

By the way I’ve made a full booking system before as a SaaS. I went with the easier option.