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

GBFS update delta service #415

Open
testower opened this issue Apr 10, 2024 · 1 comment · May be fixed by #543
Open

GBFS update delta service #415

testower opened this issue Apr 10, 2024 · 1 comment · May be fixed by #543
Labels
enhancement New feature or request

Comments

@testower
Copy link
Collaborator

testower commented Apr 10, 2024

Is your feature request related to a problem? Please describe.

The entity updaters are very complex and contain a lot of logic to figure out what has changed from one update to the next. The code is not easy to read and is not very well tested. In addition, we could foresee the need for a general solution to computing the delta of gbfs updates.

Goal / high level use-case

Create a new service within lamassu to compute the delta of gbfs updates. The delta can be used to create, update and delete entities from cache. This probably requires denormalize the entity cache, but makes updating more efficient. Cache lookup is very efficient, and GraphQL can resolve entities when needed.

The delta can also be used to create a proof-of-concept of a subscriptio-model for GBFS data.

Describe the solution you'd like

Perhaps by using a library for deep-comparison of objects: https://github.com/SQiShER/java-object-diff.

Describe alternatives you've considered

Additional context

@testower testower added the enhancement New feature or request label Apr 10, 2024
@testower testower added this to the 1.1 (next release) milestone Apr 10, 2024
@testower
Copy link
Collaborator Author

Design idea:

VehicleDelta {
  vehicleId: string
  type: [CREATE, UPDATE, DELETE]
  entity: {...}
}

VehicleStatusDelta {
  base: Timestamp
  compare: Timestamp
  vehicle: VehicleDelta
}

@testower testower linked a pull request Sep 26, 2024 that will close this issue
@testower testower modified the milestones: 1.1, 1.2 (next version) Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant