Hello

I am a web developer and after some years of working professionally, I finally have an idea of how the web and restful APIs work and I would like to explore other areas, just for the sake of knowing.

So yesterday a visited a very well known furniture store with my car and I parked my car on the underground parking.

When you enter and leave, you have to press a button to talk to security in order for them to open the bars from the operating room.

Then process is like that: You press a button, you talk to the security, the security decides whether to open the bars or not, if the security agrees he has to press the button.

Now what in wondering about is how the bar works. Is the mechanism connected to the network and has a server running waiting for requests?

Is there any big logic circuit with XOR, NOR, AND, OR, etc. gates to make the button work?

Does the mechanism needs some kind of cable which will be directly connected with the button?

What programming language would it need for programming it?

What if the bars were fully automatic, scan a QR code, check the receipt to see if the customer paid in order for him to leave ? Is the mechanism a server?

I believe all the above are possible and each scenario depends on the needs. But still I would like to ask to understand more