0

We are currently working on performance issues with our provided OData interface, since the UI5 issues a read request with multiple expand paths attached. Due to the generic handling of the request by the framework this leads to an additional processing per expand option, which we need to prevent.

Reading the blog about this topic there seems to be a way to overwrite the generic handling somehow:

https://blogs.sap.com/2018/03/19/sap-cloud-platform-sdk-for-service-development-create-odata-service-7-more-navigation-read-create-expand-sqo/

In this case it is us who need to decide if we can afford to rely on the FWK-functionality. Of course, such generic support cannot be performant. But for small amount of data it is just nice to get it for free. Stay tuned to learn how to overwrite such generic FWK-functionality with own specific implementation.

However, there is no further blog post on this and looking through the framework, my only idea to overwrite this would be to configure and use an own com.sap.gateway.core.api.provider.data.IDataProvider implementation which handles the request in a custom way, although this would be an immense workaround.

So the questions is if there is some leaner or easier approach to overwriting this functionality which I missed?

UPDATE: I was update to create a custom data provider and register it with the RuntimeDelegate after servlet initialization. This custom data provider would then check for a custom annotation on the mapped method handler to see if expand should be handled or not. If not it will just read the entity, but not perform he generic expanded read. This works more or less fine, but what is of course missing is a way to pass the properties to be expanded in the ReadRequest. So far only a static implementation is possible solving our performance problem, but I would gladly have a hint if there is another, better solution for this...

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Tim L.
  • 224
  • 2
  • 11
  • Thanks for your question. It addresses the OData exposure capabilities of the Cloud Application Programming Model (CAP), not the SAP Cloud SDK itself. I could not find any tag related to CAP. I have referred the CAP experts to your question. – Emdee Oct 15 '19 at 10:34
  • Thanks for the forward of the problem. However, I am a bit confused. Until now the SAP Cloud Provisioning SDK has always been presented as being part of the SAP Cloud SDK and previous questsions regarding this framework under this tag have also been answered. Has something changed in the SDK, I am not aware of? – Tim L. Oct 16 '19 at 05:34
  • Nothing changed in the SDK(s). Technically, the OData exposure belongs to CAP and the SAP Cloud Platform SDK for Service Development. The SAP Cloud SDK is technically independent, though both SDKs are often used in conjunction. – Emdee Oct 16 '19 at 09:05
  • 1
    Hi Tim, the experts told me that currently no better option exists for this. – Emdee Oct 16 '19 at 09:44

1 Answers1

1

At the time of this writing, no better approach exists at the moment.

Emdee
  • 1,689
  • 5
  • 22
  • 35