Hi
I’m trying to develop a booking system but I couldn’t find a way to make my records unique. I mean if there is reservation for a specific date and a specific room, no other reservations would be accepted. I couldn’t find a way from Docs or from past Community posts. Can anyone help ?
Hi, Darren_Murphy!
Have you also think it is possible to prevent overbooking with client side calculation(as for now in Glide)? I have read this manual several times and i don’t understand how it possible. Off course possibility of overbooking is very small, but in atcually it possible(overbooking) .
Yes, you’re right. Because the operations are not atomic, there is always a small chance that collisions can happen and you wind up with duplicates.
A while back, David suggested using something like Upstash with Redis to handle this. I’ve not had a need to try it yet, but I’ve been keeping it in the back of my mind should that need arise.
Yes, i already use Upstash Redis solution instead Make, because with make it will require 2 paid update, but with Redis is only one.
I’m just curious that fact of above tutorial many times suggested as solution, it is excellent for study, but not for production. Thanks to confirm, because in a before another Glide expert said: it is solution and i need to study carrefully.
Another thing, i don’t understand how another’s have build so many production apps which requires overbooking control.
Also Redis solution also have fails(some times, in reason of internet connection) to return response and we need to create dummy flow to correct it. It will be great to have native solution for server side calculation in Glide, but as Glide CEO said, he haven’t see many requests from customers for it.
Thanks for your answer!
P.s.:
May be it is not right topic for this question, but:
Does add row action is atomic?
Does it firstly add row to server, then receiving answer and then ready to run “On submit action”?
If like this, it can solve some needs.
I believe that rows are added locally, and then subsequently synced with the Glide back end.
So, it mean we exactly need external service just simple, for unique Order’s serial number. Native row id is unique, but not a serial and not human’s friendly readable.
Thanks again!
But in which order they have been added to server?
As they actually arrived to server or as they actually created(user’s side quantized to global Unix milliseconds?)
Why does that matter?
Rows are rows, ordering is unimportant. If your App functionality depends on the ordering of rows in the underlying tables, then you are doing something wrong (and violating the first rule of database normalisation).
For now I’m sending Row ID to Redis and they respond me serial number which i saving in Glide table in the row which Row ID has send to Redis, but it requires one paid update.
For all computation i using Row ID, Serial just for showing to users and during user’s searching from app interface.
p.s. I just trying to explore the way, to obtain global serial number without paid update.