Inline-relations-depth: deprecation and its consequences


Ponraj E
 

Hi,

I am using cf version 211 and CC API version 2.28.0. I am curious to know why the "inline-relations-depth" is going to be deprecated. It seems to be a useful feature.

For instance, I have a use case where for an APP, I need to display the service bindings details. The details to be displayed are: "Instance name, Plan name, Service name, Dashboard url, Credentials etc".

The calls that had to be fired to achieve this are:
1. GET /v2/apps/0f27ab6c-c132-413d-8d6a-64551dcb73fc/service_bindings
2. GET /v2/service_instances/fbd24d3e-3fe5-4d89-9ef1-5f43b8bc3767
3. GET /v2/service_plans/32bd0e93-e856-4c89-9f97-ba5c09c84ac6
4. GET /v2/services/ffc81a4b-98e0-4aff-9901-399ef98638e0

Without this feature, performance delay is introduced for multiple calls, if the data is quite large. Not only this use case but we have other use cases where the "inline-relational-data" has to be retrieved and displayed.

Is there any other api which replaces this particular feature going to be introduced?. Any other solution also would help.

Thanks.
---------
Ponraj


Ponraj E
 

Hi,

If anyone can provide information on this atleast, it would help.

1. Why the "inline-relations-depth" feature is going to be deprecated.

2. Does cf has planned any other alternative solution in the near future to replace "inline-relations-depth"?

---------
Ponraj


Simon D Moser
 

Hi Ponraj,


#1) Because IRD can quickly become quite expensive DB query wise, since it
would follow all relations given your query. Eg v2/organizations with IRD
2 or 3 would drag along A LOT of things, most in which you probably aren't
interested in

#2) Yes, in v3 API there is a way to specify what resources you exactly
want when you query - e.g. v3/organizations and you pass (spaces, routes)
because thats what you're really interested in

check the v3 style guide for the correct syntax etc:
https://github.com/cloudfoundry/cc-api-v3-style-guide

Mit freundlichen Grüßen / Kind regards

Simon Moser

Senior Technical Staff Member / IBM Master Inventor
Bluemix Application Platform Lead Architect
Dept. C727, IBM Research & Development Boeblingen

-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland
Schoenaicher Str. 220
71032 Boeblingen
Phone: +49-7031-16-4304
Fax: +49-7031-16-4890
E-Mail: smoser(a)de.ibm.com
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH / Vorsitzender des
Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht
Stuttgart, HRB 243294

**
Great minds discuss ideas; average minds discuss events; small minds
discuss people.
Eleanor Roosevelt



From: "Ponraj E" <ponraj.e(a)gmail.com>
To: cf-dev(a)lists.cloudfoundry.org
Date: 19/11/2015 13:02
Subject: [cf-dev] Re: Inline-relations-depth: deprecation and its
consequences



Hi,

If anyone can provide information on this atleast, it would help.

1. Why the "inline-relations-depth" feature is going to be deprecated.

2. Does cf has planned any other alternative solution in the near future
to replace "inline-relations-depth"?

---------
Ponraj


Urvashi Reddy
 

Hello,

To add on to what Simon's said, the CAPI team has a proposed style guide for new features in v3 of the API. You can take a look at the proposed API for [including related resources here.](https://github.com/cloudfoundry/cc-api-v3-style-guide#including-related-resources) We encourage you to take a look and let us know your thoughts, either here, on the style guide github page, or the cloud controller github page [here](https://github.com/cloudfoundry/cloud_controller_ng/issues)

Thanks,
Urvashi Reddy
Software Engineer on CAPI


Urvashi Reddy
 

Ok, apparently this isn't markdown. Here are the correct links:

v3 style guide section on including related resources: https://github.com/cloudfoundry/cc-api-v3-style-guide#including-related-resources

cloud controller issue page: https://github.com/cloudfoundry/cloud_controller_ng/issues


Ponraj E
 

Hi Urvashi,

Thanks for the reply. This really helps. Appreciate it.

And I had a look at the "including-relations" api which replaces the inline-relations-depth. This is very much useful.

Have a couple of questions:

1. When are the CC V3 APIs planned for rolled-out?

2. We use CF version 212 and CC API version - 2.29.0. I see the inline-relations-depth is deprecated there. From which version it will be removed completely?


Thanks,
Ponraj


Dieu Cao <dcao@...>
 

Hi Ponraj,

I'm hopeful that the app related end points of CC's V3 API will be ready
some time in Q1 next year. We'll be working with the CLI team on migrating
app related commands to the new end points in the next few months.

There is not a current plan to remove inline-relations-depth from the v2
end points.
We are simply not implementing support for it on v3 end points.
I would also recommend avoiding using inline-relations-depth when you can
for the reasons mentioned above.

-Dieu
CF CAPI PM

On Sun, Nov 22, 2015 at 10:15 PM, Ponraj E <ponraj.e(a)gmail.com> wrote:

Hi Urvashi,

Thanks for the reply. This really helps. Appreciate it.

And I had a look at the "including-relations" api which replaces the
inline-relations-depth. This is very much useful.

Have a couple of questions:

1. When are the CC V3 APIs planned for rolled-out?

2. We use CF version 212 and CC API version - 2.29.0. I see the
inline-relations-depth is deprecated there. From which version it will be
removed completely?


Thanks,
Ponraj