by ThePadawan · 5y ago · 0 comments
As in, "the duration of a ping to the US and back" slow.
Yep, every badge in and out in the whole office had to go cross-continental (before the door unlocked).
while (!bright) { increaseBrightnessBy10%(); sleep(100ms); }
and
while (!dark) { decreaseBrightnessBy10%(); sleep(100ms); }
Then someone had to log into a server and reboot a process before the blinking stopped.
Of course it isn't a no-brainer:
- It is still a non-trivial amount of data for an embedded device.
- You want to be able to revoke quickly.
- You still want to log the access if offline (and how big should that buffer be?).
You could maintain strong consistency while having fast local reads, once you have entered a building in a country it pulls you into the local range. So you're only slow when switching.
You could set the system up to push data out to all of the badge readers whenever there is a change, but that's a big messy operation. A more complex but probably workable solution is to have them readers cache the data but also have the server maintain a list of those caches, and when someone is changed you invalidate all of the readers that the person used within the last cache timeout period. Even then it is still messy, if a reader has temporarily lost network connectivity their cache could be out of sync. It's one of those problems that gets really hairy once you're down in the weeds working out the details.
Any office that uses physical keys will fail to meet this requirement, and we've had that system for quite a long time and it seems to have worked alright.
Luckily this isn't a pure IT system, but bound to physical bodies moving around. Some delay is acceptable. Most likely the person is already in anyways.
Why is it a requirement to be able to instantly revoke a person's badge access eeverywhere in real time anyway?
And I can't imagine why would anyone think otherwise.
Did Nest smoke detectors have to go to the cloud?