| Summary: | More generic mechanism to use tasks only if necessary | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Szymon Brandys <Szymon.Brandys> |
| Component: | Client | Assignee: | Malgorzata Janczarska <malgorzata.tomczyk> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | john.arthorne, malgorzata.tomczyk, tomasz.zarna |
| Version: | unspecified | ||
| Target Milestone: | 0.4 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Szymon Brandys
An example for necessity for moving operations that didn't require tasks until now is Bug 361006. One small change I suggest: when the operation cannot complete immediately it should return 202 Accepted. Some links: http://wiki.eclipse.org/Orion/Server_API#Progress_reporting http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3 (In reply to comment #0) > [...] there is another solution we already use for git > operations. So if an operation is quick, we return immediately (200). If for any > reason it is longer it becomes a task and 201 is returned. Afaik, this approach is only implemented when requesting Git Log. If it takes longer then expected 202 (HttpServletResponse.SC_ACCEPTED) is returned as John suggested in the last comment. (In reply to comment #2) > One small change I suggest: when the operation cannot complete immediately it > should return 202 Accepted. Some links: > > http://wiki.eclipse.org/Orion/Server_API#Progress_reporting > http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3 Yeah, I meant Accepted (202). It would be cool, if we could use it transparently like we already do with authentication (at least server side, on the client side we still need to add the magic 'handle....AuthenticationError' line). We have to be careful with creating tasks for GET requests[1]. This doesn't sound RESTy[2]. [1] bug 365534 [2] See last paragraph of http://books.google.com/books?id=XUaErakHsoAC&lpg=PP1&pg=PA229#v=onepage&q&f=false Everything is migrated now. |