How would you go about designing a system to coordinate trains departing from different stations on multiple lines purely clientside?
Starting inputs are:
- Total number of trains
- Total number of stations and the lines they are on. 3. Assume stations are equally spaced apart.
- Schedule of when train needs to start/end and their 'base' 3. Assume trains start and end at the same location.
Given that, how would your design answer the following:
-
Where is a given train at any given time?
-
How would you coordinate service advisories to all trains from the CC about outages or major delays?
-
How do you deliver messages to only trains on a given line? (For example, if an elevator is out of service on Line 1 say you only want to inform trains on that line).
-
How do you find out how many trains are currently in service? In a given line?
-
How and when do you decide to deploy an additional train? Who would know the limit for number of trains on a line?
-
What modifications would be made if there was a backend/server involved?
For a practical example, think of BART as the train system.