Open APIs

 View Only
  • 1.  How to deal with (possibly outdated) references that contain a version?

    TM Forum Member
    Posted May 12, 2021 04:26

    Hi,

    not sure whether this topic was already raised, can't find it at the moment:

    If an API references other resources and these references are persisted it may happen that the persisted referenced version is no longer valid in the target API.

    Example (just one among many) where this general problem occurs: A product in the product inventory refers to realizingService:

               "realizingService": [
                  {
                    "id""12345",
                    "name""MyService",
                   "href": ".../service-inventory/<Version>/service/12345"
                  }
                  ]
    • but the referenced service inventory API has meanwhile (e.g. over years) had some version upgrades -> the referenced version is now outdated -> any attempt to resolve the href will fail

    The question is how to deal with such scenarios when the reference might become outdated over the time because of version updates:

    • keep all versions alive, never deprecate one (practically not viable)
    • rely not on href, only on id and resolve the reference "automatically" according to the most actual version (dangerous!)
    • data migration in all referencing resources as soon as a version becomes outdated (practically not viable, would lead to strong coupling)
    • ...?

    Kind regards

    Thomas



    ------------------------------
    Thomas Dupré
    Deutsche Telekom AG
    ------------------------------


  • 2.  RE: How to deal with (possibly outdated) references that contain a version?

    TM Forum Member
    Posted May 12, 2021 07:38
    Hi Thomas

    It more widespread than just missing versions. At any place where an entity has a ref to another entity, that reference may not be able to be satisfied, for any number of reasons:
    • Referred entity was deleted from its master storage
    • Software component responsible for referred entity is down (presumably temporarily)
    • Security principal in current context does not have read permissions on the referred entity
    • ...
    So it is the responsibility of the software that is managing the referring entity (Product in your example) to write code resiliently to manage the situation when the reference is unresolvable.

    This would seem to me to fall into the area of sound software architecture and design, not specific to TMF Open APIs. So not sure if it is relevant to document e.g. in our design guidelines. But others might feel differently.

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 3.  RE: How to deal with (possibly outdated) references that contain a version?

    TM Forum Member
    Posted May 12, 2021 09:55
    Hi,

            In my view it is a bit more complex, since the realizingService is only holding a reference to the entity of Myservice, so I see two scenarios here 

                1. The realizingService is dependent on capability provided by a specific version of MyService - If so it needs to keep track of the version of the interface.
                2. The realizingService is not dependent on specific version and has capabilities to handle whatever the service serves.

        In the first case the version of interface and URI to it are mandatory and if the providing service "MyService" no longer supports this version of the API then it is a problem. The reason the version was saved is because there is some dependency on the version and hence we cannot handle scenario when the version of the provider service is not available.

         In the second case we have no such restriction and can use service discovery mechanism to find the available service and have capability to consume the available interface.

         So based on the need appropriate mechanism should be leveraged.

    thanks,

    Nitin Patil
    Amdocs Development Center 
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.





    ------------------------------
    Nitin Patil
    Amdocs Management Limited
    ------------------------------