Hacker News new | ask | show | jobs
by teknologist 720 days ago
I’ve found NDEF cards that can hold 16KB & 32KB, even as much as 64KB. That may be too much capacity for ticketing but it blows QR codes out of the water
1 comments

When all you need is a unique identifier, what's the advantage?
That is the issue. If it was just a matter of a unique identifier, then a read only token would be fine.

However, for most transit, there is some form of "check in/out" (either through barriers/gates or via validation/inspection). This is combined with rules about "antipassback" (ie one user passing the token back to another to reuse), as well as "total time in system" (ie to avoid people staying in the system all day).

There are also rules that take into account entry/exit times (eg peak/off-peak), entry/exit locations (eg core/non-core zones) etc.

All of these rules require either:

a) An always online set of validators to be able to contact the backend that is maintaining the information, or,

b) a way to record the information on the token so that it is physically transported from one validation location to another.

It also is needed for inspection purposes during a trip.

None in that case. But with these cards there’s less need for centralization of data storage and code logic
>> 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.

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).

“99th percentile”
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.

1000ms is a surprisingly long wait at a ticket barrier, though! Latency is everything in this use case...
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.