Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up some text around parallel requests #193

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

duglin
Copy link
Contributor

@duglin duglin commented May 10, 2017

Really this section shouldn't be just about asyc stuff, but instead
dealing with more than one request at a time.

Signed-off-by: Doug Davis [email protected]

@cfdreddbot
Copy link

Hey duglin!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

spec.md Outdated
other activity being done then the broker MUST reject the request with
an HTTP `400 Bad Request` response. The HTTP body of the response MUST
include a `description` property explaining the reason for the failure.
The platform SHOULD then retry the request again later.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel uncomfortable telling platforms what they SHOULD do. Moreover, a later retry is sort of implicit. Is this sentence overkill?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind dropping it. I only added it because I didn't want people to think that an error means "stop" - in this case it means "try again later". You never know what's in people's heads. :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong feelings, let's see what other people think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may not be obvious to everyone when a request will be rejected (ie. trying to bind whilst an instance is still being provisioned). A broker could always accept an async binding (if supported) whilst a provision is taking place if it wanted to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had trouble with the language in that first sentence. Was trying to find a way to say "be smart about it", but technically you're correct that when a broker will accept a request vs claim its busy is hard to determine. Perhaps instead we should just talk about how some brokers will only be able to process/accept serialized commands for a resource so platforms will need to be prepared, if they send things in parallel, for some brokers to reject secondary requests.

What about:

This specification places no requirement on brokers with respect to their
support for processing concurrent requests that act upon the same set of
resources. If a broker receives a request that it is not able to process due to
other activity being done then the broker MUST reject the request with
an HTTP `400 Bad Request` response. The HTTP body of the response MUST
include a `description` property explaining the reason for the failure.
The platform SHOULD then retry the request again later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's good, but maybe the last sentence is redundant?

The platform may decide later on that whatever it wanted to do is no longer useful, so I don't think we need to specify any platform behaviour here. It's more of a "The platform can..." IMO. I like this much more apart from that though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok updated - PTAL

@duglin
Copy link
Contributor Author

duglin commented May 23, 2017

rebased

@avade avade modified the milestone: 2.12 May 24, 2017
@angarg12
Copy link
Contributor

angarg12 commented May 29, 2017

LGTM

Approved with PullApprove

@vaikas
Copy link
Contributor

vaikas commented May 31, 2017

LGTM

Approved with PullApprove

Copy link
Contributor

@pmorie pmorie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should massage some of the language here a little.

spec.md Outdated
@@ -270,7 +270,19 @@ An asynchronous response triggers the platform marketplace to poll the endpoint

#### Blocking Operations

The marketplace MUST ensure that service brokers do not receive requests for an instance while an asynchronous operation is in progress. For example, if a broker is in the process of provisioning an instance asynchronously, the marketplace can not allow any update, bind, unbind, or deprovision requests to be made through the platform. A user who attempts to perform one of these actions while an operation is already in progress MUST receive a `400 Bad Request` response with the error message: `Another operation for this service instance is in progress`.
This specification places no requirement on brokers with respect to their
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the first sentence of this paragraph agrees with the second sentence, but I get the idea of the first. Is the first sentence better put as: "brokers are not required to support parallel requests on the same set of resources". The requirement is actually the opposite of supporting parallel requests - broker's are required to reject parallel requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right I was trying to say they're not required to support parallel requests and if they don't THIS is what they're supposed to return. I'll use your wording...

spec.md Outdated
support for processing concurrent requests that act upon the same set of
resources. If a broker receives a request that it is not able to process
due to other activity being done then the broker MUST reject the request
with an HTTP `400 Bad Request` response. The HTTP body of the response MUST
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convention elsewhere in the spec is to return a 422 if a broker can't perform something that some brokers can. Unless we say that broker MUST not support parallel operations, then a 400 doesn't seem appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I'll use 422.

@duglin
Copy link
Contributor Author

duglin commented Jun 9, 2017

ok ready for more reviews

@angarg12
Copy link
Contributor

angarg12 commented Jun 9, 2017

LGTM

Approved with PullApprove

1 similar comment
@shalako
Copy link
Contributor

shalako commented Jun 9, 2017

LGTM

Approved with PullApprove

Really this section shouldn't be just about asyc stuff, but instead
dealing with more than one request at a time.

Signed-off-by: Doug Davis <[email protected]>
@duglin
Copy link
Contributor Author

duglin commented Jun 9, 2017

rebased - more L T G Ms needed

@angarg12
Copy link
Contributor

angarg12 commented Jun 9, 2017

LGTM go go go

Approved with PullApprove

@shalako
Copy link
Contributor

shalako commented Jun 9, 2017

LGTM

Approved with PullApprove

1 similar comment
@avade
Copy link
Contributor

avade commented Jun 13, 2017

LGTM

Approved with PullApprove

@mattmcneeney
Copy link
Contributor

One more @pmorie / @vaikas-google if happy

@pmorie
Copy link
Contributor

pmorie commented Jun 13, 2017

LGTM

Approved with PullApprove

@pmorie pmorie merged commit febe679 into openservicebrokerapi:master Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants