Skip to content

Reconsider if a centralized catalogue service is needed #30

@larwa99

Description

@larwa99

The proposed centralized catalogue service is a potential single point of failure and is only needed to bootstrap the lookup of the DSO start-URL. Considering how the MPID is structured (https://gs1.se/guider/kom-igang-guider/identifiera-och-marka-elanlaggningar/), it should be possible to even maintain a static file that maps the three relevant digits in the MPID to the actual DSO's start-URL. How to share that information should be doable to handle between the DSOs.

I therefore suggest that we extend the tariff API with an endpoint to lookup the start-URL for any MPID. This ensures a more robust and distributed solution that does not depend on the centralized service which can be removed. As an API user it is enough to find the start-URL for one participating DSO (e.g. from their homepage), then you can lookup and be pointed to the DSO responsible for any given MPID.

Endpoint format:
/{v}/tariffs/catalogue/{country}/{mpid}

Example lookup request:
https://api.somedso.se/public/v0/tariffs/catalogue/se/735999221123456789
(would respond with start-URL https://api.tekniskaverken.net/subscription/public/)

I don't know how the MPID is structured in other countries, but if it is not equally easy to map it to a DSO as in Sweden, a more advanced lookup (even centralized) can of course be used by the API-implementation to provide a response. To keep it simple, it should also be optional to actually handle a request for a country that is not the same as the DSO is in.

FYI: @portcallbuilder @mattiaspalmqvist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions