Google L5 | design transport networks

Consider a metropolitan transport system.Users can pay in and out with a contactless bank card or Apple Pay.
A journey is defined as entry and exit points and it's the stations that tell usabout these events ("customer Joe123 has entered station "Central" at time 10pm"). Consider that each journey costs 1$, irrespective of duration and line change. A journey is a tuple (entry, exit). We want an architecture that supports multiple requirements, including:

  • the current live estimated number of users in the system in a browser dashboard
  • take a single daily payment from the payment card after the network closes (11:30 pm) (group multiple journeys)
    • for example, if made 2 journeys today, the customer should be charged a single payment of 2$ overnight
  • monthly trends reports of pre-payment card vs bank cards
  • reconcile exits with entries. AKA make sure we only get exits from previous entries. This should almost immediately raise alerts for Fraud investigation but not block users from exiting.

Can you design a system for this?

Comments (7)