openservicebrokerapi / servicebroker

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

Add support for sharing an instance #487

Closed duglin closed 6 years ago

duglin commented 6 years ago

There are some platforms that try to share an instance across multiple contexts. Today some of them will do this w/o telling the Broker about it at all. For example, they might intercept the 2nd instance.Create() operation and return the previously created instance metadata.

However, by doing this the Broker doesn't get a chance to perform any action it might need to take based on knowing that the instance is being shared. Today, some platforms will actually take the incoming instance.Create() and rather than totally intercept it, they will call the Broker with an instance.Update() operation with the new context. The Broker is then supposed to recognize this as a "sharing" operation and choose to do something if it needs to. However, this is a bit awkward/dangerous since we don't actually know if its a "share" request or an update() that just happens to not change the parameters of the instance. Additionally, there's no way to "unshare" in this model - at least not without some magic.

I'd like for us to consider adding well-defined APIs for share() and unshare() to OSB API so that we can let the Brokers know about these concepts as first class operations so we can have an interoperable solution. I'll add this to the F2F agenda.

n3wscott commented 6 years ago

I would recommend these be implemented as Generic Broker Actions and have an adheres_to pointing to the share spec.

The full details of Generic Broker Actions will be discussed at the f2f and have a follow-up PR after.

mattmcneeney commented 6 years ago

Excited to talk about this next week @duglin. My main concern is that, until now, brokers haven't had to care about what a "Platform" is or does; many brokers simply ignore the context object and a provision/update/bind/unbind looks the same wherever it comes from.

Having brokers understanding the "sharing" of service instances opens up a number of questions, including:

Many of these questions are being discussed by the Service Manager group, which we'll talk about too. I'd be worried about pushing the complexity of what we're discussing onto the brokers.