-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Predict arrival times #15
Comments
I agree with all of this, but I'll address your two points directly, since my ideas are likely a little different than what you have in mind: ETAs for vehiclesMy original idea was to simply have a Essentially, delay seems like an intrinsic property of vehicles, not their stations, routes, or any combination of the three. It also fits more nicely on the The issue with the Time-independent schedule dataAt one point, either we decided (or I stated) that, for the sake of efficiency and scalability, Shark will never be responsible for RPCs. Because of that, a separate server is likely the best solution. Getting schedule data is pretty simple compared to what Shark has to handle. For simplicity, I think it makes sense to limit schedule data to agencies which provide a GTFS document (since it's basically the official standard of transit scheduling). All that the server would have to do is parse GTFS data into memory (there are ruby and python libraries that do this already). Using GTFS also means that the server can supply other information such as fare rates and transfers. The difficulty with this server will be creating RPCs that map our representation of objects (stations identified by I'd recommend taking a look at CityBus's GTFS data through one of those libraries and getting an idea of how it works for yourself. From there we can collaborate on the new server. Proposal (tl;dr)Create a Shark will then have a Agencies that want to provide realtime schedule-relative information can then include that source in their configuration: Shark::Agency.configure do |agency|
...
agency.use_manager :vehicle_manager do |manager|
...
manager.source_from :schedule
end
end Clients should probably always try to contact the |
I think this should actually be a middleware (No, seriously this time). The reason is that In the case of As a middleware, it makes sense to perform actions based on exising Objects (that's what an event handler is), so |
As always, I'm debating whether
An advantage of the first approach is that users can see all of the normal operations of an agency, even when things are very not-normal. For example, if CityBus for some reason couldn't run Route 7 one day, users would still see that there is a route that goes to those stops, and that vehicles do regularly service them, even though no vehicles are currently traveling the routes. An obstacle to this approach, though, is how to relay this information to users. How do we inform them that vehicles aren't just delayed, they're simply not traveling the route?. This is definitely a client-side issue, but one that I think would be affected by the design of the server. With the second approach, the situation is reversed. Using the same example, users would see that no buses are coming to stops on Route 7, but would have no idea if that's normal or not. The question here is How do we inform them that vehicles do normally travel this route, but currently are not?. One final caveat: I think both methodologies should be implemented, such that an agency can decide which mindset it wants to take simply by writing its configuration accordingly. My inquiry is more of what should we default to, and what should our mindset be when starting work with new agencies? @elliottwilliams what do you think? |
The advent of Timetable and Providence (not yet created) have abstracted all schedule information out of Shark. That is, Shark will only ever be responsible for Realtime information, and Schedule information will be supplied where possible via external services. In the future, we may add a GTFS Source that treats the schedule data as if it were realtime information (with anonymous Vehicles), so that agencies without realtime information still provide heartbeated events. With that, I'm going to close this issue as |
I don't think we've discussed much about how schedule data is going to be sourced. I'm now at a point where I could be incorporating that information into the UI, so let's figure out how Proper will get schedule information.
I see two different schedule-related needs:
Timetable
server that exposes RPCs which provide schedule data about a given entity.The text was updated successfully, but these errors were encountered: