Skip to content

TransitLayer realtime updates are slow and can be out of sync with Graph #2918

Closed

Description

@gmellemstrand

As an intermediate step, we are currently mapping the Raptor TransitLayer from the old Graph representation of transit data. To get realtime updates for the TransitLayer, we implemented a GraphUpdater that periodically remaps the TransitLayer from the Graph.

When testing this with Norway data, there are two problems. First, it takes between 1-2 minutes to map the entire TransitLayer. This has to happen often, and consumes a lot of resources on the server.

The other problem is that this delays the effect of realtime updates and will for a time cause the data from the GraphIndex to become out of sync with the data in the TransitLayer. Both are used in the TransmodelAPI, so it is possible for a user to see data that is out of sync.

A better way is to only update the relevant parts of the TransitLayer, instead of mapping the entire data periodically.

Activity

  1. t2gran commented on Jan 6, 2020

    @t2gran
    Member

    Just to have everyone on the same page, the goal is to skip the mapping - there should be one model serving both the API needs and the Raptor routing. So this issue, is about solving making a short term solution to the RT performance issue described above.

  2. gmellemstrand commented on Feb 6, 2020

    @gmellemstrand
    ContributorAuthor

    This is solved in #2919

  3. added this to the 2.0 milestone on Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    !OptimizationThe feature is to improve performance.EnturOn Entur Roadmap

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions