A computer system comprising one or more processors, one or more computer-readable memories, one or more computer-readable storage devices, and program instructions, stored on at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, the stored program instructions comprising:
- program instructions to enable a particular device communicatively connected on a network, to share one or more resources of the particular device with a plurality of devices communicatively connected to the network and coordinate task bidding with the plurality of devices through broadcasting requests on the network;
- program instructions to monitor for a new task needing to be performed and designated to be sourced to a web service provider;
- program instructions, responsive to detecting the new task designated to be sourced to the web service provider, to estimate a local cost of managing the new task locally by the particular device;
- program instructions to, responsive to the local cost not exceeding a maximum threshold, determine whether the new task is received from a top level requestor;
- program instructions to, responsive to detecting the new task is received from the top level requestor, release control of the new task to be managed locally by the particular device;
- program instructions to, responsive to the local cost exceeding the maximum threshold, coordinate task bidding with the plurality of devices by broadcasting a particular request for costs for the new task on the network;
- program instructions to monitor for one or more initial bids returned by the plurality of devices, the one or more initial bids each specifying a separate offer cost for managing the new task;
- program instructions to select from among the one or more initial bids, one or more bids from one or more selected devices, where the one or more bids from the one or more selected devices best match a cost and the service level of the particular request;
- program instructions to manage dispatch of the new task as a particular task to the one or more selected devices of the plurality of devices, the particular task migrated to the one or more selected devices instead of handled by the web service provider, by the stored program instructions further comprising:
- program instructions to send an acceptance and the particular task to the one or more selected devices;
- program instructions to wait for an acknowledgement of the acceptance from the one or more selected devices before a timeout is reached and monitoring for a task response for the particular task from the one or more selected devices;
- program instructions, responsive to reaching the timeout before the acknowledgment is received, to manage a subsequent determination whether to manage sourcing the particular task among the plurality of devices;
- program instructions, responsive to receiving the task response with an error indicator, to manage the subsequent determination whether to manage sourcing the particular task among the plurality of devices;
- program instructions, responsive to receiving the task response with a task completed indicator, to return a notification and a result from the task response to a requestor;
- and
- program instructions, responsive to an execution timeout reached before the task response is received, to manage the subsequent determination whether to manage sourcing the particular task among the plurality of devices;
- and
- program instructions to monitor, at the particular device, for a result of execution of the particular task from the one or more selected devices, the one or more selected devices collecting telemetry data for usage reporting to the web service provider.