<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I was asked at the OpenStack Summit to look at the Glance Tasks, particularly as a general pattern for other asynchronous operations.<div><br></div><div>If I understand Glance Tasks appropriately, different asynchronous operations get replaced by a single general purpose API call?</div><div><br></div><div>In general, a unified API for task tracking across all kinds of asynchronous operations is a good thing. However, assuming this understanding is correct, I have two comments:</div><div><br></div><div>#1 A consumer of an API should not need to know a priori whether a given operation is “asynchronous”. The asynchronous nature of the operation should be determined through a response. Specifically, if the client gets a 202 response, then it should recognize that the action is asynchronous and expect a task in the response. If it gets something else, then the action is synchronous. This approach has the virtual of being proper HTTP and allowing the needs of the implementation to dictate the synchronous/asynchronous nature of the API call and not a fixed contract.</div><div><br></div><div>#2 I really don’t like the idea of a single endpoint (/v2/tasks) for executing all tasks for a particular OpenStack component. Changes should be made through the resource being impacted.</div><div><br></div><div>-George</div><div><br><div>
<div><div>--</div><div>George Reese (<a href="mailto:george.reese@imaginary.com" target="_blank">george.reese@imaginary.com</a>)<br>t: @GeorgeReese               m: <a href="tel:%2B1%28207%29956-0217" value="+12079560217" target="_blank">+1(207)956-0217</a>               Skype: nspollution</div></div><div><br></div><br class="Apple-interchange-newline">

</div>
<br></div></body></html>