Add communication_period and impact_period#546
Conversation
|
Perhaps the impact period should be allowed even if there is no communication period so the producer doesn't have to support a communications period. Maybe also indicate the active period is being deprecated. |
gcamp
left a comment
There was a problem hiding this comment.
Some comments, I agree with @doconnoronca that we should also deprecate active_period
| |------------------|------------|----------------|-------------------|-------------------| | ||
| | **active_period** | [TimeRange](#message-timerange) | Optional | Many | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. | | ||
| | **active_period** | [TimeRange](#message-timerange) | Conditionally Forbidden | Many | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. <br><br> - **Forbidden** if communication_period and impact_period exist | | ||
| | **communication_period** | [TimeRange](#message-timerange) | Conditionally Required | Many | Time when the alert should be shown to the user strictly for informative reasons. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. <br><br> - **Required** If impact_period is specified.<br> - **Forbidden** otherwise.| |
There was a problem hiding this comment.
| | **communication_period** | [TimeRange](#message-timerange) | Conditionally Required | Many | Time when the alert should be shown to the user strictly for informative reasons. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. <br><br> - **Required** If impact_period is specified.<br> - **Forbidden** otherwise.| | |
| | **communication_period** | [TimeRange](#message-timerange) | Conditionally Forbidden | Many | Time when the alert should be shown to the user strictly for informative reasons. If missing, the consuming application can decide when it's appropriate to be shown. If multiple ranges are given, the alert will be shown during all of them. <br><br> - **Optional** If impact_period is specified.<br> - **Forbidden** otherwise.| |
|
What is the use case of |
| | **active_period** | [TimeRange](#message-timerange) | Optional | Many | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. | | ||
| | **active_period** | [TimeRange](#message-timerange) | Conditionally Forbidden | Many | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. <br><br> - **Forbidden** if communication_period and impact_period exist | | ||
| | **communication_period** | [TimeRange](#message-timerange) | Conditionally Required | Many | Time when the alert should be shown to the user strictly for informative reasons. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. <br><br> - **Required** If impact_period is specified.<br> - **Forbidden** otherwise.| | ||
| | **impact_period** | [TimeRange](#message-timerange) | Conditionally Required | Many | Time when the services are affected by the disruption mentioned in the alert. <br><br> - **Required** If communication_period is specified.<br> - **Forbidden** otherwise.| |
There was a problem hiding this comment.
I'd remove the word "disruption" since alerts come in a lot of different flavors...
Time when the services are affected by this alert.
Agencies often want to alert riders to upcoming situations, and create alerts with a very broad I'm in favor of this generally, with a few notes:
|
I still don't know why there is a need for Also, is it required that the impact period is totally within the communication period. Is it allowed to have impact period outside communication period? Also, should the alert be shown in the following situations, assuming that the impact period is within the communication period?
|
I wouldn't be opposed to a spec update that says the dates of the active period are the dates it has an impact, and that an alert appearing in the feed should be considered an affirmative intent from the producer that it is currently within the desired communication timeframe. That would essentially achieve the same thing, but it's not quite how it's interpreted now. As for your four specific questions/situations... I think those are things that are pretty dependent on the specific consumer and the specific place in their app where the user is at the time. Different consumers may handle it differently, because their UX is different. If you are on a screen, for example, where you are looking at a route without planning a trip. I would suggest that the alert should be shown during the communication period. But if you're on a screen in the app that is specific to a future-planned trip that is outside of the impact period, then I probably wouldn't show the alert on that screen. In general, I do believe that the details of the user experience should still be the responsibility of the consuming app developer, and not something that's completely explicit in the spec. The spec should allow for communication of the agency's intent. |
|
Some people want to change the journey planner results based on the alerts. This alone is a reason to know about communication versus actual period. |
+1 to this. In the event that only Impact Period is defined, the alert should still be displayed, but only impact routing during the Impact Period. But I think agencies will also want the option to have an alert with a Communication Period without the need to define the hard boundaries of an Impact Period, especially if that alert is for something more nebulous, like an expected severe weather event (pun likely intended). For other alerts, there may not really be an "impact." So I would actually be in support of:
I don't think it would work, strictly speaking. Unless deprecated means we all just don't talk about it. 😅 I think it would have to be here to stay until the versioning question is resolved, yes?
Something else to consider regarding the usefulness of Communication Period is that an agency might not have staff available 24/7 to add an alert at any given moment. Such agencies may want the ability to "queue" up an alert by adding it to their feed ahead of time with a Communication Period for when they actually want it to be displayed in apps.
I think there are too many possible scenarios to establish explicit rules around how Communication and Impact Periods' respective time ranges must relate to one another. I'd rather allow agencies more flexibility on how they communicate with riders and keep the responsibility of conveying information in a logical way on them (anyway, you could still publish some very whacky alerts even with limitations on how impact/communication have to relate to one another).
I think that if the user is using the screen to select the date/time, then if there is a Communication Period defined and the selected date/time falls within the Communication Period, the tool should show it. If the selected date/time falls outside the Communication Period, do not show the alert. If there is no Communication Period defined but the alert is in the feed, show it. |
We are talking about GTFS-RT feeds here. Isn't GTFS-RT supposed to be generated real-time? |
It is, exactly at the moment that someone enters an notification, which is known from now on, but in effect at a later time. |
|
A couple points to make... Let's remember that GTFS is the standard for communicating information between two systems. It is not the feature specification for the features those systems can provide. With that in mind...
Sorry I've been slow to respond, but I agree with what @westontrillium said here about your use case. This is how I would design it, but again, if this is your product, you get to decide. There are other reasonable design patterns that could be used to accommodate the same intent.
People don't edit their GTFS-RT feeds directly. They use software to do so. It's totally reasonable for that software to have the "communication period" feature and use it to determine when to include the alert in the feed it produces, without us needing to have this as a field in the data spec. So I don't think that staff wanting to set up alerts ahead of when they want them communicated is necessarily a reason we have to have communication period in the spec -- it could just be a good feature of the producing application, if the spec was clear about what presence in the feed means. In general, my support for this is around clarifying for everyone what the intent of the people publishing alerts is. In practice, these people who use software to publish alerts have shown that they intend to inform their riders about things at times that are in advance of those things having an actual impact, if they know about them in advance. They do this already by publishing alerts with I'm in support of @westontrillium's suggestion here:
|
|
Since this PR and #504, it may be worth checking the meaning of "deprecate" in the context of GTFS Realtime. Here are some of my findings: In 2014, In 2018, during discussions on experimental field process, the practice of adding the In 2019, the previously "deprecated" TripDescriptor.ScheduleRelationship = REPLACEMENT was added back in .proto with the Since this approach allows any existing consumers or producers that have implemented support to leave their code as-is, this type of "deprecate" does not seem to be considered a breaking change but rather a strong recommendation? We can also observe this tendency in the discussion of #504 (e.g., this comment). If there is a consensus on this, we can follow the approach in #504 and include "deprecate guidance" in both the reference and .proto. @stevenmwhite @westontrillium @doconnoronca @gcamp |
|
Thank you all for your interest in this change and for your valuable feedback. @gcamp , @doconnoronca , @stevenmwhite and @westontrillium – on deprecating active_period, please check @tzujenchanmbd 's comment above. @stevenmwhite , @doconnoronca , and @westontrillium – your points regarding impact_period and communication_period are valid. I will make both fields optional while keeping restrictions on active_period to ensure it doesn’t interact with any new fields. @miklcct - Restricting impact_period within communication_period (if present) seems like a good approach, so we can add it to the spec change. Regarding the four cases you outlined, below is how they might play out. I say “might” because, as discussed, consumers determine where to display alerts in their app and how to handle them. The intent of this PR is to clarify when an alert is purely informative vs when it indicates an active impact. Case 1: If the current time is outside the communication_period, but the trips fall within the impact_period, then they are effectively inside the communication_period as well. Consumers may choose to adjust routing suggestions accordingly and display the alert in results or details pages since it is in effect. However, if the consumer has a “current service alerts” page, the alert might not be shown there. Case 2: If the current time is outside the communication_period, consumers may choose not to show the alert for informational purposes. Since the journeys are also outside the impact_period, they may not display an alert at all, as those journeys remain unaffected. Case 3: If the current time is within the communication_period, but the trips are outside the impact_period, the alert can be displayed for informational purposes, though it won’t impact current trips. Case 4: If the current time is within the communication_period, but the user searches for trips outside of it, the alert may appear on a general “current service alerts” page, but not necessarily in the journey results, this is up to the consumer’s implementation. |
|
Sorry to be late to the conversation, which I hope I'm sufficiently caught up on to comment. As a long-time publisher of alerts within a transit agency (Santa Clara VTA) and now with a tool (SimplifyTransit Alerts) used by agencies of all sizes to publish GTFS-realtime Alerts:
That said, SimplifyTransit also has a product that consumes GTFS-realtime Service Alerts, our Subscriptions module that sends highly personalized SMS/email alerts to riders.
I hope that's helpful. Happy to clarify anything or fill in gaps I missed. |
|
Since the old field is already set to |
|
I’m excited to test and adopt this change in SimplifyTransit Alerts. We need to focus on some important backlog tasks right now, and I can’t commit to a timeline till I know those are complete. |
|
Switzerland would also produce/consume it, if it shows up. |
When SIRI-SX is available we can, until then it is not part of the current travel information. |
|
In Switzerland, this may enable us to resolve the challenges associated with the SIRI-SX perspectives. Of the current three and future four perspectives in SIRI-SX, we only want to publish the two perspectives general (timetable information) and stopPoint (monitor at the stop). In the general perspective, an event should only be published for journeys within the In the stopPoint perspective, an event should only be published for journeys within the The alternative solution we are discussing is two separate streams for the two perspectives. |
|
As @knr2000 said, is SBB working on the implementation. We think that this might be ready for August 2026 (product increment 2026-07) |
|
Swiftly is working on an implementation for this and can provide a timeline in the coming months once we have adequately scoped the work. |
|
As long as VPE (Verkehrsverbund Pforzheim-Enzkreis) in Southern Germany exists, we'd also be able to adapt our implementation for testing. Actually, we're also converting SIRI-SX to GTFS-RT ServiceAlerts. As the effect modifies the results in Google Maps (e.g. with As I am working on a complete opensource re-implementation for using it in future (even without VPE), I'd add the new proposed fields and let active_period in there for backwards compatibility. |
|
@sebastianknopf glad to hear this proposal can support you! When do you think you'll have support for those two fields? |
|
I'd carefully say in around two weeks. Maybe a little earlier in my staging system with fictive alerts. |
|
My staging system has the first draft installed now and exposes currently one test alert. The matching GTFS static feed is here: https://gtfs.skc-hub.app/data/internal/static/gtfs.zip The GTFS RT feed is here: https://echogtfs.skc-hub.app/api/realtime/service-alerts.pbf Simply add |
|
MOTIS supports it now (part of next release). |
|
Hi everyone, any implementation updates to share? @phil-swiftly do you have a clearer timeline for when the fields will be implemented? @sebastianknopf, a couple of questions about your implementation:
|
|
@skalexch I'm working currently as external employee / consultant for Verkehrsverbund Pforzheim-Enzkreis. The agency is producing the GTFS data themselves, but I am responsible for the data pipeline. The agency is going to be dissolved with the end of this year, but as for now, we're still able to produce data. What I just shared was my staging system for tests, you also can access the official OpenData offers from VPE at https://opendata.vpe.de - Here you'll see all service alerts which are also published to Google Maps. |
It's available in MOTIS v2.10. There is no mention of it in the release notes because MOTIS always distinguished between communication period and impact period, so the only change is now that those fields are filled properly when working with GTFS and not just set to the same value. v2.10 is live on Transitous. |
|
@sebastianknopf @felixguendling Thank you both for clarifying! I set up a MOTIS instance and tried VPE's feed. The result looks great! |
|
This proposal has been implemented by:
We have enough to proceed. We are starting a vote to add these two fields The voting period will span 2 weeks and will end at 2026-06-25 at 23:59:59 UTC. |
|
I am against making them experimental. Because at the same time you kept this for the old field:
So now we have
That's not a good state. Protobuf is in this case
So the right way to proceed would be to recommend
|
|
@felixguendling I removed the experimental tags. We will try to adopt this directly formally and see what the community thinks in the vote. In all cases, the migration guide makes it possible to continue producing the deprecated field. We are also extending the vote by another week. So the voting now ends on 2026-06-25 at 23:59:59 UTC. |
|
+1 MOTIS |
|
+1 Transit |
|
+1 |
|
+1 Optibus |



BACKGROUND
In the GTFS Realtime Alert spec, active_period is defined as: Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them.
However, there still is an ambiguity of interpretation of the active_period field; whether it is intended for the period of showing the alert or for the period of the related service disruption itself.
PROPOSAL
We propose the addition of two fields, communication_period and impact_period, to disambiguate active_period.
communication_period: Time when the alert should be shown to the user strictly for informative reasons.
impact_period: Time when the services are affected by the disruption mentioned in the alert.
We also define rules of interaction with active_period to ensure that the new fields are mutually exclusive with active_period.
More details and potential combinations can be found in Issue#521 and the proposal doc.