You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ServiceInstanceService and ServiceInstanceBindingService interfaces embody most of the contract between this project and implementing brokers. Most methods of these interfaces return the ServiceInstance and ServiceInstanceBinding objects, respectively.
In many cases, the ServiceInstanceController returns the ServiceInstance object in response to broker API calls from CC.
The over-use of the ServiceInstanceclass, and to a lesser extent the ServiceInstanceBinding class, poses several problems:
Each call to methods of a ServiceInstanceService implementation only needs to populate a subset of fields in ServiceInstance, but it is not clear to implementing classes which fields are used in which response. Populating all fields of ServiceInstance in all ServiceInstanceService methods puts an undue burden on implementations.
The entire ServiceInstance class is deserialized to JSON in response to CC calls that ignore most of the JSON fields.
Some implementing brokers assume that the ServiceInstance class is intended to be used to persist service instance info in their own persistence store. Brokers often need to enhance the data contained in ServiceInstance with additional data, leading to requests to add even more fields to ServiceInfo.
I propose that the use of ServiceInstance and ServiceInstanceBinding be completely deprecated in this project. The classes can remain in the project and be marked deprecated for convenience to implementing brokers, but should not be used internally or in the contract with implementing brokers.
In place of ServiceInstance and ServiceInstanceBinding:
The ServiceInstanceService and ServiceInstanceBindingService interfaces should return special-purpose response types. This allows the response types to contain only the fields that are necessary for the controllers to return the necessary data to CC. It also matches the current pattern of these interface methods taking special-purpose request types as parameters.
The controllers should construct JSON responses to CC that contain only fields documented in the service broker API.
Implementing brokers should construct their own types for persisting service instance info internally. They could continue to use ServiceInstanceService and ServiceInstanceBindingService in the near term.
The text was updated successfully, but these errors were encountered:
The
ServiceInstanceService
andServiceInstanceBindingService
interfaces embody most of the contract between this project and implementing brokers. Most methods of these interfaces return theServiceInstance
andServiceInstanceBinding
objects, respectively.In many cases, the
ServiceInstanceController
returns theServiceInstance
object in response to broker API calls from CC.The over-use of the
ServiceInstance
class, and to a lesser extent theServiceInstanceBinding
class, poses several problems:ServiceInstanceService
implementation only needs to populate a subset of fields inServiceInstance
, but it is not clear to implementing classes which fields are used in which response. Populating all fields ofServiceInstance
in allServiceInstanceService
methods puts an undue burden on implementations.ServiceInstance
class is deserialized to JSON in response to CC calls that ignore most of the JSON fields.ServiceInstance
class is intended to be used to persist service instance info in their own persistence store. Brokers often need to enhance the data contained inServiceInstance
with additional data, leading to requests to add even more fields toServiceInfo
.I propose that the use of
ServiceInstance
andServiceInstanceBinding
be completely deprecated in this project. The classes can remain in the project and be marked deprecated for convenience to implementing brokers, but should not be used internally or in the contract with implementing brokers.In place of
ServiceInstance
andServiceInstanceBinding
:ServiceInstanceService
andServiceInstanceBindingService
interfaces should return special-purpose response types. This allows the response types to contain only the fields that are necessary for the controllers to return the necessary data to CC. It also matches the current pattern of these interface methods taking special-purpose request types as parameters.ServiceInstanceService
andServiceInstanceBindingService
in the near term.The text was updated successfully, but these errors were encountered: