News for hackers. Stuff that matters.
Re:The tiny chip that powers Montreal subway tickets by CraigJPerry on Monday June 24, 2024 @08:57AM (#40775465)
>> there’s less need for centralization of data storage and code logic

You make it sound like less moving parts are a bad thing :-)

I know what you're getting at though - the decentralized tolerance of network partitions and the ability to provide higher availability and faster decision speed at the entry barrier.

The system design constraints are hard but not impossible, my back of napkin maths says 5k/ticket scans per second with 99th percentile latency < 1000ms not only satisfies every use case that exists today but allows for 3x population growth beyond!

There's a few things in your favour when designing this system though. For example, in the case of network partition, you have geographic locality so a pen drive delivered a couple of times per day is likely feasible.

Re:The tiny chip that powers Montreal subway tickets by teknologist on Monday June 24, 2024 @10:10AM (#40776262)
1000ms is a surprisingly long wait at a ticket barrier, though! Latency is everything in this use case...
Re:The tiny chip that powers Montreal subway tickets by rswail on Wednesday June 26, 2024 @01:53AM (#40796824)
Usual requirement is <500ms from tap to passenger through the barrier, which includes not only the validation/fare deduction etc, but also the display and barrier unlock.
Re:The tiny chip that powers Montreal subway tickets by rswail on Wednesday June 26, 2024 @01:53AM (#40796821)
The usual maximum time allowed for tap->barrier open is a maximum of 450ms. That includes all read/write times for the token, display changes, fare calculations and deductions, all business rule validation (eg hotlisting stolen tokens etc).

The system I recently put in allowed for that 450ms, the time broke down to:

1) NFC comms ~100ms

2) Network comms ~50-100ms

3) Physical relays (releasing barriers etc) 100-200ms

During peak periods the usual rate expected is 30-40 passengers through a gate/minute, which includes all of the time above, plus the passengers actually walking through the barriers (usually ~2m).

Re:The tiny chip that powers Montreal subway tickets by CraigJPerry on Thursday June 27, 2024 @02:39AM (#40807958)
“99th percentile”
Re:The tiny chip that powers Montreal subway tickets by rswail on Thursday June 27, 2024 @03:37AM (#40808281)
Not relevant. The maximum specified by contract is usually 450-500ms.

The barriers at rail stations have to have a defined maximum throughput of passengers, because it affects safety during emergencies etc. Most barriers are required to maintain somewhere between 30 and 45 passengers per minute.

Yes they can "default be open" and usually have emergency modes that disable validation entirely, but the speed during peak hour periods has to maintain the passenger flow.