Skip to content
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

New Capability: VIA and REALTIME #95

Open
grote opened this issue May 27, 2016 · 14 comments · May be fixed by #333
Open

New Capability: VIA and REALTIME #95

grote opened this issue May 27, 2016 · 14 comments · May be fixed by #333

Comments

@grote
Copy link
Contributor

grote commented May 27, 2016

Hi @schildbach,

Navitia does not support Via for trip planning and they don't intent to do so (hove-io/navitia#1589). Maybe we should introduce a VIA capability and set it to false for all Navitia based providers. What do you think?

While we are at it, how about a capability for providers that provide real-time data for delays? When they don't, options such as reloading a connection can be disabled/removed.

Kind Regards,
Torsten

@schildbach
Copy link
Owner

A "via" capability sounds like a good idea to me.

What's the difference between being able to tell delays and realtime?

@grote
Copy link
Contributor Author

grote commented May 31, 2016

A "via" capability sounds like a good idea to me.

Do you want to add this, or should I prepare an MR?

What's the difference between being able to tell delays and realtime?

Transportr for example lets you reload a trip to get current delays. I would hide this option for providers that do not provide delays anyway. The name for that capability could be REALTIME or PROVIDES_DELAYS.

@schildbach
Copy link
Owner

Sure, please go ahead (-:

What does reloading a trip mean? Pte doesn't have an API for this, no? Don't get me wrong, I just want to understand the semantics exactly.

@grote
Copy link
Contributor Author

grote commented Jun 3, 2016

What does reloading a trip mean? Pte doesn't have an API for this, no?

PTE does have no API for it, but I just do another trip query for exactly the trip to be reloaded and then pick it from the result set and refresh the display.

@grote
Copy link
Contributor Author

grote commented Jul 25, 2018

@ialokim in case you are bored, this ticket is a low hanging fruit and would help with Navitia-based providers that don't respect VIA locations.

@ialokim
Copy link
Contributor

ialokim commented Jul 25, 2018

Haha, okay I'll look into it.

@ialokim
Copy link
Contributor

ialokim commented Jul 25, 2018

There could be cases where delays are provided e.g. on the departures endpoint, but not while querying trips. Currently this seems to be the case for AbstractHafasLegacyProvider using the XML endpoint (?),

Perhaps we should add two new capabilities DEPARTURES_REALTIME and TRIPS_REALTIME. Any opinions on this?

@grote
Copy link
Contributor Author

grote commented Jul 25, 2018

I only have a use-case for trip realtime and I guess the legacy provider will go away at some point, but would refer to @schildbach for a decision.

@schildbach
Copy link
Owner

schildbach commented Jul 26, 2018

The realtime capability is more complicated, it usually depends on the line (or even the specific car/train). Also, sometimes the realtime info is missing entirely for a given provider.

So for now, from this issue I'd only consider the VIA cap.

@ialokim
Copy link
Contributor

ialokim commented Jul 26, 2018

it usually depends on the line (or even the specific car/train).

Sure, the capability would not express that there is real-time data for every single line or even train, but that there could be some (because it is provided by the endpoint and handled by pte), so that it makes sense to offer a reload functionality.

Also, sometimes the realtime info is missing entirely for a given provider.

That would be the exact use case we would cover with this (or these) realtime flag(s). I've already checked and it seems realtime is not handled by navitia nor by one or two custom providers, but it is handled by default in the efaProvider and hafasProviders. Not sure if there are some endpoints using hafas or efa which do not provide real-time data, in these cases the method hasCapability should be overridden.

I've already implemented both of the flags but if you want I could reduce the PR to the VIA capability.

@schildbach
Copy link
Owner

Yes, please at least separate commits.

@grote
Copy link
Contributor Author

grote commented Jul 26, 2018

For the record: Identifying providers that will definitely not report real-time information would be sufficient for me.

@schildbach
Copy link
Owner

@grote For that, we'd need "negative capabilities", so e.g. NO_REALTIME.

@ialokim
Copy link
Contributor

ialokim commented Jul 26, 2018

Honestly I don't quite see the point of such a "negative capability" which seems a bit counter-intuitive. Why not adding the REALTIME capability and returning true for hasCapability(REALTIME) in all providers as a default, and ensure it will return false for the ones that do not provide realtime information?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants