Patent ID: 8473957

Claim:
At a web service platform, a computer-implemented method for converting the manner in which client messages are handled for processing, so that client messages specified for background handling are handled instead as service-initiated on-demand tasks, the method comprising: an act of loading at a web service platform an on-demand message handling service with one or more threads that are configured to perform on-demand message processing, and a background message handling service with one or more threads that are configured to perform background processing of a message according to a schedule rather than as the message is received; an act of receiving at the web service platform a message from a client, the message specified for schedule-based, background handling; an act of determining at the web service platform that one or more threads of the on-demand message handling service are available to process at least one or more parts of the received message; an act of using one or more of the on-demand message handling service's threads to process the at least one or more parts of the received message as they are received rather than according to a schedule used to perform background processing on the received client message so that the received client message specified for background handling is instead handled at least in part as one or more service-initiated on-demand tasks; an act of at least one of the one or more on-demand message handling service's threads being allocated to propel a polling loop that polls for background processing work items; an act of estimating a future workload for the web service platform based on at least one of current and past polling loop activity; and an act of suspending at least a portion of background processing provided by the background message handling service based on the estimated future workload.