<div dir="ltr">On 29 June 2015 at 18:18, Joshua Harlow <span dir="ltr"><<a href="mailto:harlowja@outlook.com" target="_blank">harlowja@outlook.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Duncan Thomas wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Do we know what is so hated about the glance task API? Tasks and entity<br>
queues give the required exclusion, if you accept that tasks can fail if<br>
previous tasks in the queue can cause things to be pulled out from under it.<br>
</blockquote>
<br></span>
Sounds like certain tasks shouldn't of been accepted in the first place then no? Sounds like before acceptance of a piece of work there needs to be some verification that what is being requested doesn't conflict with what is underway/planned.<br>
<br></blockquote><div><br></div><div>That should be fun to code - you'd need to have current and future states of all tasks, and an atomic transactional way of changing the future state, from any API service... I'd say it's better to accept all tasks and report failure for the ones who had their resource go away before they got executed... far less needed in the way of transactional atomic primatives - you can just lock the state of each needed resource, as long as it is always in some defined order, you don't deadlock, and if a resource is found in a bad state, release (in reverse order) and fail the task. <br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
After all you don't try to hire a contractor to fix your plumbing on the 23rd of the month if your house is scheduled to be demolished on the 21st (analogies ftw)...</blockquote><div><br></div><div>If cancelling a contractor is cheap and booking one at the last second is expensive (or you schedule is very busy and unclear), then maybe you do... <br></div></div></div></div>