openservicebrokerapi / servicebroker

Open Service Broker API Specification
https://openservicebrokerapi.org/
Apache License 2.0
1.19k stars 434 forks source link

Enable a more efficient polling of catalog #529

Open duglin opened 6 years ago

duglin commented 6 years ago

What do people think about supporting an ETag type of mechanism for /v2/catalog so that a broker can return "304 Not Modified" if nothing has changed since the last time the Platform queried the catalog? It would save the broker the time of regenerating the result, and it will save the platform the time of diff'ing it.

dotchev commented 6 years ago

Most of our brokers use a static catalog, so it is not an issue on the broker side.

It would be nice if a broker could specify the period when the platform should refresh the catalog, e.g. via Cache-Control: max-age=... response header. Then different brokers might use different intervals.

duglin commented 6 years ago

@mattmcneeney was this discussed during the call this week? Any feedback?

pmorie commented 6 years ago

I'm not sure what an etag is exactly, but I agree with the goal described here

On Tue, Jun 19, 2018 at 3:49 PM, Doug Davis notifications@github.com wrote:

@mattmcneeney https://github.com/mattmcneeney was this discussed during the call this week? Any feedback?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openservicebrokerapi/servicebroker/issues/529#issuecomment-398523117, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWXmDdKSeEYnprp7BrTOg5pIEa8ib_Iks5t-VXjgaJpZM4UnTXu .

duglin commented 6 years ago

@pmorie https://en.wikipedia.org/wiki/HTTP_ETag

mattmcneeney commented 6 years ago

@duglin This was discussed briefly though we had low attendance on yesterday's call. @fmui mentioned that since ETags are just part of the HTTP spec, why do we have to add something to the spec? (I think - correct me if I'm wrong Florian!)

duglin commented 6 years ago

While true its part of the HTTP spec, given not everyone knows about it (as shown by Paul's comment), I suspect that unless we call it out people will not consider supporting this optional feature. So, a PR on this wouldn't require people to use it, but rather make people aware of it and explain any implications of its use. I know that some uses of OSBAPI will ping the catalog quite often, so I think highlighting this to help performance would be nice.

mattmcneeney commented 5 years ago

@jberkhahn is this still something that may be of use to the svc-cat community?

jberkhahn commented 5 years ago

sure

mattmcneeney commented 5 years ago

@jberkhahn Cool - do you want to own opening the PR for this one? :)

jberkhahn commented 5 years ago

i'll try to get around to it this week