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

Avoid repeatedly retrieving the same objecttype when creating many new objects #550

Open
alextreme opened this issue Mar 11, 2025 · 3 comments

Comments

@alextreme
Copy link
Member

Thema / Theme

Objecten API

Omschrijving / Description

Taiga Utrecht 333

When creating many objects, each POST leads to a GET on the objecttypes API.

"De error is afkomstig uit de controle of het objecttype/versie van het object bestaat, bij ieder nieuw (of update van bestaand) object zal de objecttype API worden aangeroepen."

"de situatie doet zich sporadisch voor, maar als het zich voordoet dan krijgen we zeer veel van dit soort foutmeldingen"

Caching for a short term of the objecttype would seem logical to me, but to be refined

Toegevoegde waarde / Added value

No response

Aanvullende opmerkingen / Additional context

No response

@sdegroot
Copy link

Could one not use the notifications-api for this? You could theoretically cache the object-type until a notification about a new objecttype-version is published?

Even better would potentially be to merge the object-types and objects service into one physical service with a single database. Is there a reason why they're separated at the moment?

@alextreme
Copy link
Member Author

I've suggested a combined OpenObjecten a number of times, however this requires a more significant amount of development time. We can estimate both with Team Bron next week.

ObjectTypes don't send notifications upon changes, so your suggestion is interesting but currently won't work

@alextreme
Copy link
Member Author

Estimations:

  • For adding ObjectType-caching to the Objects API: 2-3 days
  • For OpenObjecten: the migration path from Objects API+ObjectTypes API will be quite complicated, as we don't see a workable path to convert the Objects API to OpenObjecten (this would require calling the OT API during datamigrations which feels hacky). So the best alternative would be to create a new OpenObjecten component and add a management command to migrate the data from an existing ObjectsAPI+ObjectTypes API to the new OpenObjecten component: 2-3 months of work

@sdegroot graag je keuze en goedkeuring. Indien de tweede niet wordt gekozen dan splitsen we dit af in een aparte issue om breder op te pakken dan alleen met Utrecht

@alextreme alextreme moved this from Triage to Waiting for approval in Data en API fundament Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for approval
Development

No branches or pull requests

2 participants