Dangling Trips: Trips without a visible trip_end #642
Labels
Agency
Specific to the Agency API
discussion
Feedback is requested on an ongoing basis
Provider
Specific to the Provider API
Is your feature request related to a problem? Please describe.
In MDS Agency (and from what I've heard from @quicklywilliam this is an issue for MDS Provider too), it is possible to receive Event & Telemetry information for a
trip_id
, but never receive an event which includes thetrip_end
event_type for that trip. I like to call these dangling trips.Example from an MDS Agency perspective with some partial payloads:
{ event_types: ['trip_start'], vehicle_state: 'on_trip', trip_id: '7d7ee01f-db96-4041-808b-a4c5ccd39aa8', ...}
received.{ event_types: ['trip_leave_jurisdiction'], vehicle_state: 'elsewhere', trip_id: '7d7ee01f-db96-4041-808b-a4c5ccd39aa8', ... }
received.At this point, it is incredibly hard to know for certain that the trip has actually ended, until you see subsequent activity for the vehicle that is un-associated with the previous
trip_id
, which is liable to never happen. This makes it impossible to derive almost anything that's reliant on knowing that a trip has actually completed (e.g. metrics, fees, etc...) without making assumptions, such as timing out the trip after x hours of not receiving any events/telemetry for it and calling it complete.Describe the solution you'd like
A POST to Agency to definitively indicate that a trip has ended if it ever intersected the jurisdictional boundaries. Specifically, a payload which does not include sensitive data (e.g. where the trip ended), as this is liable to be outside of jurisdictional boundaries, and many (dare I say most if not all) agencies do not want to collect this data.
A solution which I personally like a lot is adding a
/trips
endpoint to Agency, as suggested in a separate (but related) issue #550. There is an inbound PR to accompany #550 which I'll link to once it's been opened against this repo.Is this a breaking change
A breaking change would require consumers or implementors of the API to modify their code for it to continue to function (ex: renaming of a required field or the change in data type of an existing field). A non-breaking change would allow existing code to continue to function (ex: addition of an optional field or the creation of a new optional endpoint).
Impacted Spec
For which spec is this feature being requested?
agency
provider
Describe alternatives you've considered
Another solution which was proposed on today's WG call by @quicklywilliam would be to modify the state machine somehow to represent this, @quicklywilliam. That being said, I do have some concerns about the feasibility of this, because currently in Agency Telemetry is a required property of Events, and this would violate the desire for there to not be any sensitive outside-of-jurisdiction data.
The text was updated successfully, but these errors were encountered: