Skip to content

Add recommendations for asynchronous processing #792

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

Merged
merged 1 commit into from
Aug 28, 2015

Conversation

benoittgt
Copy link
Contributor

Started a discussion on discourse about it : http://discuss.jsonapi.org/t/long-running-jobs-or-asynchronous-processing/26

Maybe the status response have too much infos for this example.
Maybe "actions" should not be there.

Any feedbacks more than welcome.

@benoittgt benoittgt force-pushed the asynchronous_processing branch from dd00252 to 64e68de Compare June 29, 2015 09:17
@benoittgt
Copy link
Contributor Author

Do I need to add some change ?

@benoittgt benoittgt force-pushed the asynchronous_processing branch from 64e68de to 8cfa85e Compare July 28, 2015 14:31
@ryansch
Copy link

ryansch commented Jul 30, 2015

At first glance, this is really good stuff.

},
"actions": {
"cancel": "/photos/queue/5234/cancel",
"delete": "/photos/queue/5234/delete"
Copy link

Choose a reason for hiding this comment

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

What would be the difference between cancel and delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A job canceled can be restarted. But it's ok for me if a job is only deleted.

@ethanresnick
Copy link
Member

@benoittgt Coming back to this... I'd like to see this merged, but it needs a few updates. I'll comment inline. Let me know if you're up for bringing this up to date.

}
]
},
"actions": {
Copy link
Member

Choose a reason for hiding this comment

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

First, this "actions" container should (temporarily) be removed. We're working on a standard way to support actions (see, e.g., #745) but, until then, I don't want to recommend something that will likely contradict our final solution.

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'm ok with that

@benoittgt benoittgt force-pushed the asynchronous_processing branch from 4d905ce to 87ef4ab Compare August 27, 2015 07:33
"id":"5234",
"attributes":{
"status":"Process failed, see errors",
"errors":[
Copy link
Member

Choose a reason for hiding this comment

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

These errors shouldn't be here, I don't think, because if the server already knows that the request has errored, it should send back the error (not a 200).

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. Managing errors seems not related to this recommendation. Errors where discussed here #828. Seems enough for me.

@ethanresnick
Copy link
Member

@benoittgt Awesome! I just noted some small grammatical corrections too. Can you please make those, squash this all down to one commit, and then I'll merge it?

@benoittgt benoittgt force-pushed the asynchronous_processing branch from 290ea07 to e804cdb Compare August 28, 2015 09:51
Started a discussion on discourse about it  : http://discuss.jsonapi.org/t/long-running-jobs-or-asynchronous-processing/26

Maybe the status response have too much infos for this example.
Maybe "actions" should not be there.

Move "status" and "errors" in an "attributes" bucket

Temporary remove "actions" container. Waiting for standard about it.

Waiting json-api#745

Remove errors fields

Move queue link to content location, add it to 'attributes'

Remove links self and grammar corrections

Move Header/location to Content-Location
@benoittgt benoittgt force-pushed the asynchronous_processing branch from e804cdb to d474956 Compare August 28, 2015 09:56
@benoittgt
Copy link
Contributor Author

Thanks Ethan for the time you took to review my PR. 🍶

@ethanresnick
Copy link
Member

Happy to :) This looks great now. Merged!

ethanresnick added a commit that referenced this pull request Aug 28, 2015
Add recommendations for asynchronous processing
@ethanresnick ethanresnick merged commit 1425204 into json-api:gh-pages Aug 28, 2015
@krainboltgreene
Copy link
Contributor

Should this also mention that further requests should return 102?

@benoittgt benoittgt deleted the asynchronous_processing branch November 10, 2017 10:58
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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy