Simulated data object storage using on-demand computation of data objects

Systems and methods are described for simulated data object storage on a data storage system. The system may allow clients to store computed data objects, which are generated from a source data object based on a user-defined transformation. For example, computed data objects may be thumbnail images generated based on a full resolution image. When a request to store a computed data object is received, the system can predict a timing of a next request for the data object. If expected resource consumption associated with storing the data object until a next request exceeds expected resource consumption associated with generating the data object in response to the next request, the system can acknowledge the request to store the data object, but not actually store the data object. Instead, the system may generate the data object in response to the next request.

BACKGROUND

To facilitate increased utilization of data center resources, virtualization technologies allow a single physical computing device to host one or more instances of virtual machines that appear and operate as independent computing devices to users of a data center. With virtualization, the single physical computing device can create, maintain, delete, or otherwise manage virtual machines in a dynamic manner. In turn, users can request computer resources from a data center, including single computing devices or a configuration of networked computing devices, and be provided with varying numbers of virtual machine resources.

In some scenarios, virtual machine instances may be configured according to a number of virtual machine instance types to provide specific functionality. For example, various computing devices may be associated with different combinations of operating systems or operating system configurations, virtualized hardware resources and software applications to enable a computing device to provide different desired functionalities, or to provide similar functionalities more efficiently. These virtual machine instance type configurations are often contained within a device image, which includes static data containing the software (e.g., the OS and applications together with their configuration and data files, etc.) that the virtual machine will run once started. The device image is typically stored on the disk used to create or initialize the instance. Thus, a computing device may process the device image in order to implement the desired software configuration.

DETAILED DESCRIPTION

Generally described, aspects of the present disclosure relate to handling of storage of data objects on a data storage system. More specifically, aspects of the present disclosure relate to handling of computed data objects and to potentially simulating storage of such computed data objects at the data storage system, rather than incurring the computational resource consumption of storing such data objects. As used herein, the term computed data objects generally refers to data objects which are generated based on a transformation of other data stored at or available to the data storage system. For example, a computed data object may be a thumbnail image, which is generated based on a transformation of larger image data object. A user may wish to utilize a data storage system to store computed data objects. For example, a user may request that each time a full resolution image is uploaded to the data storage system, the service (or a related service, such as the on-demand code execution system described in detail below) generate and store a corresponding thumbnail image. However, storage of such computed data objects, particularly when viewed in aggregate, can require non-trivial computing resources. Thus, rather than store a computed data object, a data storage system in accordance with embodiments of the present disclosure may “lazily” generate the computed data object, either on request from a client or just prior to such request. Moreover, rather than storing the computed data object from that point forward, the data storage system can be configured to predict a timing of a next request for the computed data object, and compare an estimated consumption (or “cost”) of computing resources required to store the data object until that next request to an estimated consumption of computing resources required to recompute the data object at or just prior to the next request. When the estimated consumption of computing resources required to recompute the data object at or prior to the next request is less than the estimated consumption of computing resources required to store the data object, the data storage system can decline to store the data object. In this manner, storage of the computed data object can be “simulated.” Specifically, while a client device may interact with the data storage system to store and retrieve computed data objects, as if the data objects were persisted at the data storage system, the storage service may not in fact be storing the data object.

To facilitate computation of data objects, a data storage system as disclosed herein may include or operate in conjunction with an on-demand code execution system enabling rapid execution of code, which may be supplied by users of the on-demand code execution system. An on-demand code execution system may also be known as a “serverless” execution system or a request-drive code execution system. As described in detail herein, the on-demand code execution system may provide a network-accessible service enabling users to submit or designate computer-executable code to be executed by virtual machine instances on the on-demand code execution system. Each set of code on the on-demand code execution system may define a “task,” and implement specific functionality corresponding to that task when executed on a virtual machine instance of the on-demand code execution system. Individual implementations of the task on the on-demand code execution system may be referred to as an “execution” of the task (or a “task execution”). The on-demand code execution system can further enable users to trigger execution of a task based on a variety of potential events, such as detecting new data at a network-based storage system, transmission of an application programming interface (“API”) call to the on-demand code execution system, or transmission of a specially formatted hypertext transport protocol (“HTTP”) packet to the on-demand code execution system. Thus, users may utilize the on-demand code execution system to execute any specified executable code “on-demand,” without requiring configuration or maintenance of the underlying hardware or infrastructure on which the code is executed. Further, the on-demand code execution system may be configured to execute tasks in a rapid manner (e.g., in under 100 milliseconds [ms]), thus enabling execution of tasks in “real-time” (e.g., with little or no perceptible delay to an end user). The on-demand code execution system may implement a variety of technologies to enable rapid execution of code. Illustratively, the on-demand code execution system may be configured to maintain a number of execution environments, such as virtual machine instances, software containers, or the like, in which code of a task may be provisioned and executed.

In accordance with embodiments of the present disclosure, a client may utilize an on-demand code execution system to generate computed data items, intended to be stored on a data storage system. For example, a client may configure the on-demand code execution system to execute code that transforms an image into a thumbnail representation, converts a format of audio, video, or text, parses or translates data from one form to another, etc. The client may then instruct the on-demand code execution system to execute the code, with the intention that as a result of code execution, the on-demand code execution system generates and stores a computed data object on the data storage system. In some instances, a client may configure the data storage system or on-demand code execution environment to automatically generate computed data objects based on events occurring on or viewable by the on-demand code execution system or the data storage system. For example, a client may specify that each time a specific type of data object (e.g., matching a given set of parameters) is stored within a relevant location of the data storage system, that the on-demand code execution system generate one more corresponding computed data objects based on the specific data object.

As noted above, computation and storage of data objects generally incurs resource consumption on the data storage system and/or the on-demand code execution system. Thus, rather than generating a computed data object at the time of a request to generate the data object, the data storage system and the on-demand code execution system may be configured to delay generation of the computed data object, until or just prior to a request for the computed data object. In this manner, the computational resource consumption associated with storage of the data object between a request to generate the data object and a request to retrieve the data object can be reduced or eliminated. Because the on-demand code execution system can facilitate rapid generation of code to generate the computed data object, generation of the computed data object on request by a user may not result in noticeable delay to retrieve the data object. However, as will be discussed below, the data storage system and on-demand code execution system may be configured to account for any potential delay related to on-demand generation of a computed data object when determining whether to delay generation of the data object.

Moreover, after a computed data object has been generated, the data storage system can in accordance with the present embodiments be configured to determine whether to store the computed data object, or discard the data object in favor or recomputing the data object at (or just before) a next request for the data object. More specifically, the data storage system may at various points in time (e.g., on obtaining a computed data object or periodically thereafter) utilize a history of requests to the data storage system to predict a next request for the computed data object. In one embodiment, the data storage system may predict a next request based on a history of requests for the data object, such as by calculating a frequency of historical requests for the data object, and extrapolating from the frequency and a last request a predicted time of a next request. In some embodiments, the data storage system may utilize additional or alternative techniques, such as linear regression analysis or other statistical measures, to predict a timing of a next (or other future) requests based on a history of requests. Still further, in some embodiments the data storage system may utilize machine learning techniques (e.g., neural networks) to predict a timing of a next request to access a data object. A variety of techniques utilizing statistical models or machine learning to predict a next event in a sequence of events are known in the art, any of which may be applied in accordance with embodiments of the present disclosure to predict a timing of a next request for a data object. In some instances, such as where history of requests to access a data object are limited, the data storage system may additionally or alternatively utilize a history of requests to access other data objects on the data storage system to predict a timing of a next request to access a computed data object. Other data objects may include, for example, other data objects designated for storage within a common storage location (e.g., the same folder, group, or bucket), other data objects sharing common formats, other data objects of the user, etc.

On predicting a next request to access a computed data object, the data storage system may calculate a resource consumption associated with storing the computed data object until the next request to access the data object, and alternatively with discarding the computed data object and recomputing the data object at or just prior to the next request. Each metric of resource consumption (which may be viewed as a “cost” in terms of resource used) may be based on the computing resources required for the respective actions. Illustratively, the metric of resource consumption to store the data object until a next request may include a metric of resource consumption in terms of bits of memory (e.g., hard disk drive storage) of the data storage system used to store the data object. The metric of resource consumption of recomputing the data object may include a metric of resource consumption in terms of processing power of the on-demand code execution system used to generate the data object, network bandwidth required to transfer the computed data object from the on-demand code execution system to the data processing system, etc. The data storage system may be configured with weights, enabling these respective metrics of resource consumption (potentially expressed in different units of measurement) to be compared. For example, where the data storage system has access to relatively little long-term storage memory but excess processing power, the metric of storing a computed data object may be weighted heavily, and the metric of recomputing a data object may be weighted lightly. In such a scenario, the data storage system may be more likely to recompute a data object than to store the data object. Conversely, where the data storage system has access to a high amount of long-term memory but little access to processing power, an inverse result is likely.

In one embodiment, the metric of resource consumption on the data storage system may vary over time. For example, the amount of available storage memory of the data storage system may vary based on use of that memory to store data objects of clients. The amount of processing power of the on-demand code execution system may vary based on use of processing power to execute code on behalf of clients. In one embodiment, the data storage system is configured to estimate the relevant metric of resource consumption associated with either storing or recomputing a computed data object. For example, the metric of resource consumption of storing a data object may be represented as the aggregated metrics of storing the data object for each period of time in a series of time periods between a current time and the time of a next request to access the data object, with the metric of each period of time being weighted according to a predicted availability of storage during that period of time. Similarly, the metric of resource consumption of recomputing a data object at or just prior to a next request for the data object may be calculated based on an expected availability of processing power when that recomputation would occur. Future computation metrics may be modeled based on historical computational availabilities, in a manner similarly to how a timing of a next request may be predicted based on historical requests (e.g., by application of statistical or machine learning techniques to predict a future sequence based on historical sequence information).

After determining the expected metrics of resource consumption of storing or recomputing a data object, the data storage system may determine whether to continue to store (or generate and store) a data object, based on a comparison of metrics to store or recompute the data object. If the metrics of continuing to store a data object do not exceed those to recompute the data object, the data storage system may continue to store the data object, and respond to a next request to retrieve the data object by providing the data object. If the metrics of continuing to store the data object exceed those to recompute the data object, the data storage system may delete the data object (if necessary), thus avoiding the storage source usage associated with storing the data object. On or just prior to a next request to access the data object, the data storage system may utilize the on-demand code execution system to recompute the data object, thus enabling a client to access the data object as if it had been stored on the data storage system. In this manner, the data storage system can operate to “simulate” storage of computed data objects, without requiring that those data objects be stored, particularly in instances where such storage is inefficient in terms of resource use of the data storage system.

As will be appreciated by one of skill in the art in light of the present disclosure, the embodiments disclosed herein improves the ability of computing systems, such as data storage systems, to store computed data objects an efficient manner. Specifically, embodiments of the present disclosure increase the efficiency of computing resource usage of such systems by enabling the data storage system to weight metrics of resource consumption of storing the data objects against metrics of resource consumption to recompute the data objects, and to select an action that is expected to minimize computing resource usage by the data storage system (and/or an associated on-demand code execution system). Moreover, the presently disclosed embodiments address technical problems inherent within computing systems; specifically, the limited nature of computing resources with which to store or compute data objects and the inefficiencies caused by maintaining infrequently accessed data objects within memory of a data storage system. These technical problems are addressed by the various technical solutions described herein, including the use of a next predicted request for a data object to compare metrics for storing the data object against metrics for of recomputing the data object, and selection of whether to store the data object based on that comparison. Thus, the present disclosure represents an improvement on existing data processing systems and computing systems in general.

The general execution of tasks on the on-demand code execution system will now be discussed. As described in detail herein, the on-demand code execution system may provide a network-accessible service enabling users to submit or designate computer-executable source code to be executed by virtual machine instances on the on-demand code execution system. Each set of code on the on-demand code execution system may define a “task,” and implement specific functionality corresponding to that task when executed on a virtual machine instance of the on-demand code execution system. Individual implementations of the task on the on-demand code execution system may be referred to as an “execution” of the task (or a “task execution”). The on-demand code execution system can further enable users to trigger execution of a task based on a variety of potential events, such as detecting new data at a network-based storage system, transmission of an application programming interface (“API”) call to the on-demand code execution system, or transmission of a specially formatted hypertext transport protocol (“HTTP”) packet to the on-demand code execution system. Thus, users may utilize the on-demand code execution system to execute any specified executable code “on-demand,” without requiring configuration or maintenance of the underlying hardware or infrastructure on which the code is executed. Further, the on-demand code execution system may be configured to execute tasks in a rapid manner (e.g., in under 100 milliseconds [ms]), thus enabling execution of tasks in “real-time” (e.g., with little or no perceptible delay to an end user). To enable this rapid execution, the on-demand code execution system can include one or more virtual machine instances that are “pre-warmed” or pre-initialized (e.g., booted into an operating system and executing a complete or substantially complete runtime environment) and configured to enable execution of user-defined code, such that the code may be rapidly executed in response to a request to execute the code, without delay caused by initializing the virtual machine instance. Thus, when an execution of a task is triggered, the code corresponding to that task can be executed within a pre-initialized virtual machine in a very short amount of time.

Specifically, to execute tasks, the on-demand code execution system described herein may maintain a pool of executing virtual machine instances that are ready for use as soon as a user request is received. Due to the pre-initialized nature of these virtual machines, delay (sometimes referred to as latency) associated with executing the user code (e.g., instance and language runtime startup time) can be significantly reduced, often to sub-100 millisecond levels. Illustratively, the on-demand code execution system may maintain a pool of virtual machine instances on one or more physical computing devices, where each virtual machine instance has one or more software components (e.g., operating systems, language runtimes, libraries, etc.) loaded thereon. When the on-demand code execution system receives a request to execute the program code of a user (a “task”), which specifies one or more computing constraints for executing the program code of the user, the on-demand code execution system may select a virtual machine instance for executing the program code of the user based on the one or more computing constraints specified by the request and cause the program code of the user to be executed on the selected virtual machine instance. The program codes can be executed in isolated containers that are created on the virtual machine instances, or may be executed within a virtual machine instance isolated from other virtual machine instances acting as environments for other tasks. Since the virtual machine instances in the pool have already been booted and loaded with particular operating systems and language runtimes by the time the requests are received, the delay associated with finding compute capacity that can handle the requests (e.g., by executing the user code in one or more containers created on the virtual machine instances) can be significantly reduced.

Because the number of different virtual machine instances that a host computing device may execute is limited by the computing resources of that host (and particularly by highly utilized resources such as CPU cycles and RAM), the number of virtual machine instances in a pool on the on-demand code execution system is similarly limited. Thus, in accordance with the embodiments of the present disclosure, the on-demand code execution system may generate execution environments for a large number of tasks (e.g., more environments than could be maintained as executing on the on-demand code execution system at a given point in time), and transition a subset (e.g., a majority) of those environments into lower tier memory storage, based on a next expected utilization of each environment. Thus, a primary memory of the on-demand code execution system can be expected to hold environments either being actively used or expected to be used in a very short amount of time. As environments within the primary memory become idle, the on-demand code execution system can transition the environments to secondary memory based on future expected use, and move into primary memory those environments which are next expected to be used. In this manner, the overall efficiency of primary memory within the on-demand code execution system is increased.

As used herein, the term “virtual machine instance” is intended to refer to an execution of software or other executable code that emulates hardware to provide an environment or platform on which software may execute (an “execution environment”). Virtual machine instances are generally executed by hardware devices, which may differ from the physical hardware emulated by the virtual machine instance. For example, a virtual machine may emulate a first type of processor and memory while being executed on a second type of processor and memory. Thus, virtual machines can be utilized to execute software intended for a first execution environment (e.g., a first operating system) on a physical device that is executing a second execution environment (e.g., a second operating system). In some instances, hardware emulated by a virtual machine instance may be the same or similar to hardware of an underlying device. For example, a device with a first type of processor may implement a plurality of virtual machine instances, each emulating an instance of that first type of processor. Thus, virtual machine instances can be used to divide a device into a number of logical sub-devices (each referred to as a “virtual machine instance”). While virtual machine instances can generally provide a level of abstraction away from the hardware of an underlying physical device, this abstraction is not required. For example, assume a device implements a plurality of virtual machine instances, each of which emulate hardware identical to that provided by the device. Under such a scenario, each virtual machine instance may allow a software application to execute code on the underlying hardware without translation, while maintaining a logical separation between software applications running on other virtual machine instances. This process, which is generally referred to as “native execution,” may be utilized to increase the speed or performance of virtual machine instances. Other techniques that allow direct utilization of underlying hardware, such as hardware pass-through techniques, may be used, as well.

While a virtual machine executing an operating system is described herein as one example of an execution environment, other execution environments are also possible. For example, tasks or other processes may be executed within a software “container,” which provides a runtime environment without itself providing virtualization of hardware. Containers may be implemented within virtual machines to provide additional security, or may be run outside of a virtual machine instance.

The foregoing aspects and many of the attendant advantages of this disclosure will become more readily appreciated as the same become better understood by reference to the following description, when taken in conjunction with the accompanying drawings.

FIG. 1is a block diagram of an illustrative operating environment100in which a data storage system160and an on-demand code execution system110may operate based on communication with client devices102and auxiliary services106. By way of illustration, various example client devices102are shown in communication with the data storage system160and on-demand code execution system110, including a desktop computer, laptop, and a mobile phone. In general, the client devices102can be any computing device such as a desktop, laptop or tablet computer, personal computer, wearable computer, server, personal digital assistant (PDA), hybrid PDA/mobile phone, mobile phone, electronic book reader, set-top box, voice command device, camera, digital media player, and the like. The on-demand code execution system110may provide the client devices102with one or more user interfaces, command-line interfaces (CLIs), application programing interfaces (APIs), and/or other programmatic interfaces for generating and uploading user-executable code (e.g., including metadata identifying dependency code objects for the uploaded code), invoking the user-provided code (e.g., submitting a request to execute the user codes on the on-demand code execution system110), scheduling event-based jobs or timed jobs, tracking the user-provided code, and/or viewing other logging or monitoring information related to their requests and/or user codes. Although one or more embodiments may be described herein as using a user interface, it should be appreciated that such embodiments may, additionally or alternatively, use any CLIs, APIs, or other programmatic interfaces. Moreover, while end users may operate client devices102, client devices102may also include non-end-user devices, such as servers, or other devices of the data storage system160, on-demand code execution system110, or auxiliary services106, that access respective services provided by the data storage system160or on-demand code execution system110.

The illustrative environment100further includes one or more auxiliary services106, which can interact with the data storage system160and/or on-demand code execution environment110to implement desired functionality on behalf of a user. Auxiliary services106can correspond to network-connected computing devices, such as servers, which generate data accessible to the data storage system160and/or on-demand code execution environment110or otherwise communicate to the data storage system160and/or on-demand code execution environment110. For example, the auxiliary services106can include web services (e.g., associated with the client devices102, with the on-demand code execution system110, or with third parties), databases, really simple syndication (“RSS”) readers, social networking sites, or any other source of network-accessible service or data source. In some instances, auxiliary services106may be associated with the data storage system160and/or on-demand code execution system110, e.g., to provide billing or logging services to the data storage system160and/or on-demand code execution system110. In some instances, auxiliary services106actively transmit information, such as API calls or other task-triggering information, to the data storage system160and/or on-demand code execution system110. In other instances, auxiliary services106may be passive, such that data is made available for access by the data storage system160and/or on-demand code execution system110. For example, components of the data storage system160and/or on-demand code execution system110may periodically poll such passive data sources, and trigger execution of tasks within the on-demand code execution system110based on the data provided. While depicted inFIG. 1as distinct from the client devices102and the on-demand code execution system110, in some embodiments, various auxiliary services106may be implemented by either the client devices102or the data storage system160and/or on-demand code execution system110.

The client devices102, auxiliary services106, data storage system160, and on-demand code execution system110may communicate via a network104, which may include any wired network, wireless network, or combination thereof. For example, the network104may be a personal area network, local area network, wide area network, over-the-air broadcast network (e.g., for radio or television), cable network, satellite network, cellular telephone network, or combination thereof. As a further example, the network104may be a publicly accessible network of linked networks, possibly operated by various distinct parties, such as the Internet. In some embodiments, the network104may be a private or semi-private network, such as a corporate or university intranet. The network104may include one or more wireless networks, such as a Global System for Mobile Communications (GSM) network, a Code Division Multiple Access (CDMA) network, a Long Term Evolution (LTE) network, or any other type of wireless network. The network104can use protocols and components for communicating via the Internet or any of the other aforementioned types of networks. For example, the protocols used by the network104may include Hypertext Transfer Protocol (HTTP), HTTP Secure (HTTPS), Message Queue Telemetry Transport (MQTT), Constrained Application Protocol (CoAP), and the like. Protocols and components for communicating via the Internet or any of the other aforementioned types of communication networks are well known to those skilled in the art and, thus, are not described in more detail herein.

The data storage system160represents a service configured to enable client devices102to store and retrieve data from one or more client data stores166, each of which may a hard disk drive (HDD), solid state drive (SSD), network attached storage (NAS), or any other persistent or substantially persistent storage. Additionally, in some embodiments, client data stores166may include transitory storage, such as random access memory (RAM). For example, the data storage system160may represent a caching service intended to store client data for relatively short periods.

In general, the data storage system160may operate with respect to data objects, each of which corresponds to a defined set of data storable and retrievable on the service160. Each data object may illustratively represent a file on a computing device. To facilitate storage and retrieval of data objects, the service160includes one or more frontends162that receive and process requests of client devices102to interact with the service160(e.g., including authenticating requests, verifying requests, etc.). While not shown inFIG. 1, the data storage system160may in some embodiments include additional or alternative components to facilitate storage of data objects, such as devices to manage replication of client data across multiple client data storages166. General operation of a network-based data storage system to facilitate storage and retrieval of data objects is known in the art. AMAZON™'s “Simple Storage Service,” or “S3” is on example of a data storage system implementing a frontend120and client data stores166, which may be modified and/or configured in accordance with the present disclosure to provide simulated data object storage.

In accordance with embodiments of the present disclosure, the data storage system160further includes a data manager168configured to implement aspects of the present disclosure, such as the determination of whether to store a computed data object, or decline to store the object in favor of recomputing the object at a later time (e.g., at or just prior to a request for the data object). The data manager168may illustratively implement the routine500, discussed below, to predict a next request for a data object, and to compare estimated computational resource metrics associated with either storage or recomputation of the data object. The data manager168may then control operation of the data storage system160, or interaction of the data storage system160with the on-demand code execution system110, to either store data objects, or facilitate later recomputation of the data objects, according to estimated metrics of those actions. To facilitate operation of the data manager168to predict a timing of a next request to access a data object, the data storage system160further includes a request history data store164, which includes a history of requests to access data objects on the data storage system160. In one embodiment, the request history data store164is implemented as a logical portion of the client data stores166. In another embodiment, the request history data store164is a separate data store, implemented by any one or more persistent or substantially persistent data storage devices.

To facilitate generation of computed data objects, the data storage system160may interact with an on-demand code execution system110, which may enable client devices102to provide executable code, and establish rules or logic defining when and how such code should be executed on the on-demand code execution system110, thus establishing a “task.” A task may illustratively execute to generate a data object from another set of data stored on or available to the data storage system160. For example, a task may represent code executable to transform a full resolution image to a thumbnail image, to convert a format of a multimedia file, to parse a text file into structure data, or the like. The on-demand code execution system110can handle the acquisition and configuration of compute capacity (e.g., containers, instances, etc., which are described in greater detail below) based on the code execution request, and execute the code using the compute capacity. The on-demand code execution system110may automatically scale up and down based on the volume, thereby relieving the user from the burden of having to worry about over-utilization (e.g., acquiring too little computing resources and suffering performance issues) or under-utilization (e.g., acquiring more computing resources than necessary to run the codes, and thus overpaying).

To enable interaction with the on-demand code execution system110, the system110includes one or more frontends120, which enable interaction with the on-demand code execution system110. In an illustrative embodiment, the frontends120serve as a “front door” to the other services provided by the on-demand code execution system110, enabling users (via client devices102) to provide, request execution of, and view results of computer executable code. The frontends120include a variety of components to enable interaction between the on-demand code execution system110and other computing devices. For example, each frontend120may include a request interface providing client devices102with the ability to upload or otherwise communication user-specified code to the on-demand code execution system110and to thereafter request execution of that code. In one embodiment, the request interface communicates with external computing devices (e.g., client devices102, auxiliary services106, etc.) via a graphical user interface (GUI), CLI, or API. The frontends120process the requests and makes sure that the requests are properly authorized. For example, the frontends120may determine whether the user associated with the request is authorized to access the user code specified in the request.

References to user code as used herein may refer to any program code (e.g., a program, routine, subroutine, thread, etc.) written in a specific program language. In the present disclosure, the terms “code,” “user code,” and “program code,” may be used interchangeably. Such user code may be executed to achieve a specific function, for example, in connection with a particular web application or mobile application developed by the user. As noted above, individual collections of user code (e.g., to achieve a specific function) are referred to herein as “tasks,” while specific executions of that code (including, e.g., compiling code, interpreting code, or otherwise making the code executable) are referred to as “task executions” or simply “executions.” Tasks may be written, by way of non-limiting example, in JavaScript (e.g., node.js), Java, Python, and/or Ruby (and/or another programming language). Tasks may be “triggered” for execution on the on-demand code execution system110in a variety of manners. In one embodiment, a user or other computing device may transmit a request to execute a task may, which can generally be referred to as “call” to execute of the task. Such calls may include the user code (or the location thereof) to be executed and one or more arguments to be used for executing the user code. For example, a call may provide the user code of a task along with the request to execute the task. In another example, a call may identify a previously uploaded task by its name or an identifier. In yet another example, code corresponding to a task may be included in a call for the task, as well as being uploaded in a separate location (e.g., storage of an auxiliary service106or a storage system internal to the on-demand code execution system110) prior to the request being received by the on-demand code execution system110. As noted above, the code for a task may reference additional code objects maintained at the on-demand code execution system110by use of identifiers of those code objects, such that the code objects are combined with the code of a task in an execution environment prior to execution of the task. The on-demand code execution system110may vary its execution strategy for a task based on where the code of the task is available at the time a call for the task is processed. A request interface of the frontend120may receive calls to execute tasks as Hypertext Transfer Protocol Secure (HTTPS) requests from a user. Also, any information (e.g., headers and parameters) included in the HTTPS request may also be processed and utilized when executing a task. As discussed above, any other protocols, including, for example, HTTP, MQTT, and CoAP, may be used to transfer the message containing a task call to the request interface122.

A call to execute a task (which may also be referred to as a request to execute the task) may specify one or more third-party libraries (including native libraries) to be used along with the user code corresponding to the task. In one embodiment, the call may provide to the on-demand code execution system110a file containing the user code and any libraries (and/or identifications of storage locations thereof) corresponding to the task requested for execution. In some embodiments, the call includes metadata that indicates the program code of the task to be executed, the language in which the program code is written, the user associated with the call, and/or the computing resources (e.g., memory, etc.) to be reserved for executing the program code. For example, the program code of a task may be provided with the call, previously uploaded by the user, provided by the on-demand code execution system110(e.g., standard routines), and/or provided by third parties. Illustratively, code not included within a call or previously uploaded by the user may be referenced within metadata of the task by use of a URI associated with the code. In some embodiments, such resource-level constraints (e.g., how much memory is to be allocated for executing a particular user code) are specified for the particular task, and may not vary over each execution of the task. In such cases, the on-demand code execution system110may have access to such resource-level constraints before each individual call is received, and the individual call may not specify such resource-level constraints. In some embodiments, the call may specify other constraints such as permission data that indicates what kind of permissions or authorities that the call invokes to execute the task. Such permission data may be used by the on-demand code execution system110to access private resources (e.g., on a private network). In some embodiments, individual code objects may also be associated with permissions or authorizations. For example, a third party may submit a code object and designate the object as readable by only a subset of users. The on-demand code execution system110may include functionality to enforce these permissions or authorizations with respect to code objects.

In some embodiments, a call may specify the behavior that should be adopted for handling the call. In such embodiments, the call may include an indicator for enabling one or more execution modes in which to execute the task referenced in the call. For example, the call may include a flag or a header for indicating whether the task should be executed in a debug mode in which the debugging and/or logging output that may be generated in connection with the execution of the task is provided back to the user (e.g., via a console user interface). In such an example, the on-demand code execution system110may inspect the call and look for the flag or the header, and if it is present, the on-demand code execution system110may modify the behavior (e.g., logging facilities) of the container in which the task is executed, and cause the output data to be provided back to the user. In some embodiments, the behavior/mode indicators are added to the call by the user interface provided to the user by the on-demand code execution system110. Other features such as source code profiling, remote debugging, etc. may also be enabled or disabled based on the indication provided in a call.

To manage requests for code execution, the frontend120can include an execution queue (not shown inFIG. 1), which can maintain a record of requested task executions. Illustratively, the number of simultaneous task executions by the on-demand code execution system110is limited, and as such, new task executions initiated at the on-demand code execution system110(e.g., via an API call, via a call from an executed or executing task, etc.) may be placed on the execution queue124and processed, e.g., in a first-in-first-out order. In some embodiments, the on-demand code execution system110may include multiple execution queues, such as individual execution queues for each user account. For example, users of the on-demand code execution system110may desire to limit the rate of task executions on the on-demand code execution system110(e.g., for cost reasons). Thus, the on-demand code execution system110may utilize an account-specific execution queue to throttle the rate of simultaneous task executions by a specific user account. In some instances, the on-demand code execution system110may prioritize task executions, such that task executions of specific accounts or of specified priorities bypass or are prioritized within the execution queue. In other instances, the on-demand code execution system110may execute tasks immediately or substantially immediately after receiving a call for that task, and thus, the execution queue may be omitted.

As noted above, tasks may be triggered for execution at the on-demand code execution system110based on explicit calls from client devices102(e.g., as received at the request interface). For example, a user may manually call a task to request that a computed data object be generated from another data object. Alternatively or additionally, tasks may be triggered for execution at the on-demand code execution system110based on data retrieved from one or more auxiliary services106or the data storage system160. For example, a user may request that each time a new data object is stored in one location of the data storage system160(e.g., a specific folder or bucket), a corresponding computed data object be generated and stored in another location of the data storage system160.

The frontend120can further include an output interface (not shown inFIG. 1) configured to output information regarding the execution of tasks on the on-demand code execution system110. Illustratively, the output interface may transmit data regarding task executions (e.g., results of a task, errors related to the task execution, or details of the task execution, such as total time required to complete the execution, total data processed via the execution, etc.) to the client devices102or to auxiliary services106, which may include, for example, billing or logging services. The output interface may further enable transmission of data, such as service calls, to auxiliary services106. For example, the output interface may be utilized during execution of a task to transmit an API request to an external service106(e.g., to store data generated during execution of the task).

In some embodiments, the on-demand code execution system110may include multiple frontends120. In such embodiments, a load balancer (not shown inFIG. 1) may be provided to distribute the incoming calls to the multiple frontends120, for example, in a round-robin fashion. In some embodiments, the manner in which the load balancer distributes incoming calls to the multiple frontends120may be based on the location or state of other components of the on-demand code execution system110. For example, a load balancer may distribute calls to a geographically nearby frontend120, or to a frontend with capacity to service the call. In instances where each frontend120corresponds to an individual instance of another component of the on-demand code execution system, such as the active pool148described below, the load balancer may distribute calls according to the capacities or loads on those other components. Calls may in some instances be distributed between frontends120deterministically, such that a given call to execute a task will always (or almost always) be routed to the same frontend120. This may, for example, assist in maintaining an accurate execution record for a task, to ensure that the task executes only a desired number of times. For example, calls may be distributed to load balance between frontend120. Other distribution techniques, such as anycast routing, will be apparent to those of skill in the art.

The on-demand code execution system further includes one or more worker managers140that manage the execution environments, such as virtual machine instances150(shown as VM instance150A and150B, generally referred to as a “VM”), used for servicing incoming calls to execute tasks, and that manage the memory states of execution environments. While the following will be described with reference to virtual machine instances150as examples of such environments, embodiments of the present disclosure may utilize other environments, such as software containers. In the example illustrated inFIG. 1, each worker manager140manages an active pool148, which is a group (sometimes referred to as a pool) of virtual machine instances150executing on one or more physical host computing devices that are initialized to execute a given task (e.g., by having the code of the task and any dependency data objects loaded into the instance). The active pool148illustratively is implemented using primary memory (e.g., RAM) of host devices implementing or under control of the worker manager140.

Although the virtual machine instances150are described here as being assigned to a particular task, in some embodiments, the instances may be assigned to a group of tasks, such that the instance is tied to the group of tasks and any tasks of the group can be executed within the instance. For example, the tasks in the same group may belong to the same security group (e.g., based on their security credentials) such that executing one task in a container on a particular instance150after another task has been executed in another container on the same instance does not pose security risks. As another example, the tasks of the group may share common dependencies, such that an environment used to execute one task of the group can be rapidly modified to support execution of another task within the group.

Once a triggering event to execute a task has been successfully processed by a frontend120, the frontend120passes a request to a worker manager140to execute the task. In one embodiment, each frontend120may be associated with a corresponding worker manager140(e.g., a worker manager140co-located or geographically nearby to the frontend120) and thus, the frontend120may pass most or all requests to that worker manager140. In another embodiment, a frontend120may include a location selector configured to determine a worker manager140to which to pass the execution request. In one embodiment, the location selector may determine the worker manager140to receive a call based on hashing the call, and distributing the call to a worker manager140selected based on the hashed value (e.g., via a hash ring). Various other mechanisms for distributing calls between worker managers140will be apparent to one of skill in the art.

Thereafter, the worker manager140may modify a virtual machine instance150(if necessary) and execute the code of the task within the instance150. As shown inFIG. 1, respective instances150may have operating systems (OS)152(shown as OS152A and152B), language runtimes154(shown as runtime154A and154B), and user code156(shown as user code156A and156B). The OS152, runtime154, and user code156may collectively enable execution of the user code to implement the task. In some instances, each VM150may be associated with additional information, such as state information, maintained across individual executions of a task. For example, when initially created, a VM150may initialize the OS152, and each time the user code156is executed in the VM150, a state of the VM150may change. State of a VM150may be maintained, for example, within registers of a virtual CPU of the VM150, within RAM of the VM150, within a virtual disk drive of the VM150, or the like.

Thus, via operation of the on-demand code execution system110, the data storage system160can facilitate rapid generation of computed data objects, in accordance with embodiments of the present disclosure.

The data storage system160and on-demand code execution system110are depicted inFIG. 1as operating in a distributed computing environment including several computer systems that are interconnected using one or more computer networks (not shown inFIG. 1). The data storage system160and on-demand code execution system110could also operate within a computing environment having a fewer or greater number of devices than are illustrated inFIG. 1. Thus, the depiction of the data storage system160and on-demand code execution system110inFIG. 1should be taken as illustrative and not limiting to the present disclosure. For example, the on-demand code execution system110or various constituents thereof could implement various Web services components, hosted or “cloud” computing environments, and/or peer to peer network configurations to implement at least a portion of the processes described herein. In some instances, the data storage system160and on-demand code execution system110may be combined into a single service.

Further, the data storage system160and on-demand code execution system110may be implemented directly in hardware or software executed by hardware devices and may, for instance, include one or more physical or virtual servers implemented on physical computer hardware configured to execute computer executable instructions for performing various features that will be described herein. The one or more servers may be geographically dispersed or geographically co-located, for instance, in one or more data centers. In some instances, the one or more servers may operate as part of a system of rapidly provisioned and released computing resources, often referred to as a “cloud computing environment.”

In the example ofFIG. 1, the data storage system160and on-demand code execution system110are illustrated as connected to the network104. In some embodiments, any of the components within the data storage system160and on-demand code execution system110can communicate with other components of the on-demand code execution system110via the network104. In other embodiments, not all components of the data storage system160and on-demand code execution system110are capable of communicating with other components of the virtual environment100. In one example, only the frontends120and162(which may in some instances represent multiple frontends) may be connected to the network104, and other components of the data storage system160and on-demand code execution system110may communicate with other components of the environment100via the respective frontends120and164.

While some functionalities are generally described herein with reference to an individual component of the data storage system160and on-demand code execution system110, other components or a combination of components may additionally or alternatively implement such functionalities. For example, while the data storage system160is depicted inFIG. 1as including a data manager168, such data manager may additionally or alternatively be implemented within the on-demand code execution system110. Moreover, while the on-demand code execution system110is described as an example system to generate computed data objects, other compute systems may be used to generate computed data objects, which compute systems may include more, fewer or different components than depicted as part of the on-demand code execution system110. In a simplified example, the data storage system160may include a physical computing device configured to compute data objects on demand, thus representing a compute system usable in accordance with embodiments of the present disclosure. Thus, the specific configuration of elements withinFIG. 1is intended to be illustrative.

FIG. 2depicts a general architecture of a computing system implementing a data manager168ofFIG. 1. The general architecture of the data manager168depicted inFIG. 2includes an arrangement of computer hardware and software that may be used to implement aspects of the present disclosure. The hardware may be implemented on physical electronic devices, as discussed in greater detail below. The data manager168may include many more (or fewer) elements than those shown inFIG. 2. It is not necessary, however, that all of these generally conventional elements be shown in order to provide an enabling disclosure. Additionally, the general architecture illustrated inFIG. 2may be used to implement one or more of the other components illustrated inFIG. 1.

As illustrated, the data manager168includes a processing unit290, a network interface292, a computer readable medium drive294, and an input/output device interface296, all of which may communicate with one another by way of a communication bus. The network interface292may provide connectivity to one or more networks or computing systems. The processing unit290may thus receive information and instructions from other computing systems or services via the network104. The processing unit290may also communicate to and from primary memory280and/or secondary memory298and further provide output information for an optional display (not shown) via the input/output device interface296. The input/output device interface296may also accept input from an optional input device (not shown).

The primary memory280and/or secondary memory298may contain computer program instructions (grouped as units in some embodiments) that the processing unit290executes in order to implement one or more aspects of the present disclosure. These program instructions are shown inFIG. 2as included within the primary memory280, but may additionally or alternatively be stored within secondary memory298. The primary memory280and secondary memory298correspond to one or more tiers of memory devices, including (but not limited to) RAM, 3D XPOINT memory, flash memory, magnetic storage, and the like. The primary memory280is assumed for the purposes of description to represent a main working memory of the worker manager140, with a higher speed but lower total capacity than secondary memory298.

The primary memory280may store an operating system284that provides computer program instructions for use by the processing unit290in the general administration and operation of the data manager168. The memory280may further include computer program instructions and other information for implementing aspects of the present disclosure. For example, in one embodiment, the memory280includes a user interface unit282that generates user interfaces (and/or instructions therefor) for display upon a computing device, e.g., via a navigation and/or browsing interface such as a browser or application installed on the computing device.

In addition to and/or in combination with the user interface unit282, the memory280may include an access frequency estimation unit286executable to predict based on a history of access of data objects on the data storage system160a timing of a next request to access a given data object. The memory280may further include a data management unit288executable to determine, for a given data object and based on a timing of a next request to access the data object, whether to store the data object on the data storage system160, or decline to store the data object in favor of recomputing the data object at a later time.

The data manager168ofFIG. 2is one illustrative configuration of such a device, of which others are possible. For example, while shown as a single device, a data manager168may in some embodiments be implemented as multiple physical host devices. Illustratively, a first device of such a data manager168may implement “control plane” functions, such as receiving requests to determine whether to store a computed data object and the like, while a second device may implement “data plane” operations, such as causing the data storage system160to store or decline to store a data object in response to instructions by the first device.

While described inFIG. 2as a data manager, similar components may be utilized in some embodiments to implement other devices shown in the environment100ofFIG. 1. For example, a similar device may implement a worker manager140, as described in more detail in U.S. Pat. No. 9,323,556, entitled “PROGRAMMATIC EVENT DETECTION AND MESSAGE GENERATION FOR REQUESTS TO EXECUTE PROGRAM CODE,” and filed Sep. 30, 2014 (the “'556 Patent”), the entirety of which is hereby incorporated by reference.

With reference toFIG. 3, illustrative interactions are depicted for handling a request to store a computed data object on the data storage system160, potentially by use of simulated storage of the computed data object, where the data storage system160successfully processes the request without necessarily storing the computed data object. Specifically, at (1), a client device102A submits to the data storage system160a data object compute rule, denoting how to generate a computed data object. In one embodiment, the compute rule is a task executable on the on-demand code execution system110. Moreover, the compute rule may include criteria defining when to execute the task. For example, the compute rule may specify that the task should be executed each time a given type of data object is stored in the data storage system160(e.g., to transform the uploaded data object into a computed data object, such as a thumbnail of the uploaded data object). While the compute rule is depicted inFIG. 3as being provided to the data storage system160, the rule may additionally or alternatively be provided to the on-demand code execution environment110, as the on-demand code execution environment110and the data storage system160may cooperate or be under control of a single entity to implement aspects of the present disclosure. Thus, inFIG. 3, interactions with the data storage system160should be understood to potentially encompass interactions with the on-demand code execution system110.

At (2), the client device102A submits to the data storage system160a request to generate a computed data object. In one embodiment, the request may correspond to a call to the task on the on-demand code execution environment110representing the data object compute rule. In another embodiment, the request may correspond to uploading of one data object on the data storage system160which triggers the data object compute rule, requesting generation of the computed data object from the uploaded data object. In either instance, the request generally specifies a desire for execution of a task on the on-demand code execution system110to generate a computed data object and to store such data object on the data storage system160for later access by a client device102.

At (3), the data storage system160generates the computed data object, if appropriate. As noted above, the data storage system160can be generally configured to minimize resource consumption associated with storage of computed data objects, by delaying generation of computed data objects when the metrics of resource consumption for storage of the computed data object exceeds the metrics of resource consumption of generating the computed data object at or just prior to a next request to access the data object. In the example ofFIG. 3, because the computed data object has not yet been generated, the data storage system160may compare a metric of resource consumption of generating the computed data object immediately and storing it until a next request to access the data object against a metric of resource consumption of generating the computed data object at or just prior to the next request. It might be assumed that under such conditions, the metric of resource consumption of generating the computed data object at or just prior to the next request would always be lower than the metric of resource consumption of generating the computed data object immediately and storing it until a next request to access the data object, since in either instance computational resources must be used to generate the data object. However, this assumption does not account for potential undesirability of delay in providing the computed data object, which may in some instances be increased when the data object is not stored at the data storage system160at the time of a request. For example, where computation of a data object is expected to takes period of time (e.g., 500 ms), while retrieval of a stored version of the data object is expected to take less time, the excess time required to compute the data object “on-demand” may be viewed negatively by a client device102. The data storage system160may account for this delay by increasing a calculated metric for generating the data object at a later time. In one embodiment, a client device102may specify a weight to be associated with delays related to on-demand computation of data objects. An illustrative routine for calculation and comparison of metrics for generating and storing a computed data object against a metric related to computing a data object on demand is shown inFIG. 5. Based on comparing the metrics associated with computation and storage versus the metrics associated with on-demand computation of the data object, the data storage system160may generate the computed data object (if the metric of computation and storage does not exceed the metric of on-demand computation), or instead decline to generate the computed data object. Generation of a computed data object may include utilization of the on-demand code execution system110to generate the data object, as will be discussed in more detail with reference toFIG. 4.

In either instance, at (4), the data storage system160notifies the client device102A of successful storage of the computed data object. Thus, from the point of view of the client device102A, the computed data object has been stored at the data storage system160, even when the data storage system160declined to store the computed data object.

With reference toFIG. 4, illustrative interactions will be described for handling a request to access or retrieve a computed data object on the data storage system160. The interactions begin at (1), where the client device102A requests the computed data object from the data storage system160. While the request is shown inFIG. 4is stemming from the client device102A, in some embodiments, other client devices102may additionally or alternatively request a data object. For example, a first client device102A may utilize the data storage system160to store data associated with a web site or service (e.g., thumbnail images), and end users may interact with the service160to retrieve that data.

In the instance that the request data object has been stored at the data storage system160, the data storage system160may simply return the data object to the client device102, in accordance with known operation of network-based storage services. However, for the purposes of illustration, it is assumed that the data storage system160has not stored the computed data object, but instead elected to delay generation of the computed data object until a request for that object is retrieved. Thus, at (2), the data storage system160determines that the computed data object identified in the request is not stored at the data storage system160.

Accordingly, at (3), the data storage system160submits a request to the on-demand code execution system110to generate the data object. The request may correspond, for example, to invocation of a task represented by the data object compute rule submitted to the data storage system160. The request may further include a source data object, from which the computed data object is to be computed. Illustratively, where the computed data object is a thumbnail image, the request may specify a full resolution image used to generate the thumbnail image.

At (4), the on-demand code execution system110generates the computed data object, such as by execution of a task to process a source data object to result in the computed data object. Operation of the on-demand code execution system110to execute tasks is discussed in more detail in the '556 Patent, incorporated by reference above.

At (5), the on-demand code execution system110returns the computed data object to the data storage system160. The data storage system160, in turn, returns the computed data object to the client device102A, satisfying the initial request. Because the on-demand code execution system110can be configured to satisfy requests for generation of computed data objects quickly (e.g., on the order of tens or hundreds of milliseconds), it is expected that relatively little or no delay would be incurred to undertake the interactions ofFIG. 4, as opposed to interactions to return a data object actually stored at the data storage system160at the time of a request. Thus, the interactions ofFIG. 4can be utilized to simulate storage of computed data objects, without requiring that the data storage system160actually store the computed data object.

In addition, at (7), the data storage system160determines whether to store the computed data object, or to discard the data object in favor of recomputing the data object at or just prior to a next request for the data object. This determination is similar to as discussed above, and can include weighing a metric of storing the computed data object at the data storage system160against a metric of recomputing the computed data object at or just prior to the next request.

With reference toFIG. 5, an illustrative routine500is depicted enabling the data storage system160to make the determinations discussed above with reference to interaction (7) ofFIG. 4as well as interaction (3) ofFIG. 3. The routine500may additionally or alternatively be carried out at other times. For example, the routine500may be carried out periodically on the data storage system160for each computed data object stored (and/or simulated as being stored), to determine whether storage of the computed data object is appropriate going forward. The routine500is illustratively implemented by the data manager168.

The routine500begins at block502, where the data manager168predicts a next request for a computed data object (e.g., as a period of time until the next request). In one embodiment, the data manager168may predict a next request based on a history of requests for the data object, such as by calculating a frequency of historical requests for the data object, and extrapolating from the frequency and a last request a predicted time of a next request. In some embodiments, the data manager168may utilize additional or alternative techniques, such as linear regression analysis or other statistical measures, to predict a timing of a next (or other future) requests based on a history of requests. Still further, in some embodiments the data manager168may utilize machine learning techniques (e.g., neural networks) to predict a timing of a next request to access a data object. A variety of techniques utilizing statistical models or machine learning to predict a next event in a sequence of events are known in the art, any of which may be applied in accordance with embodiments of the present disclosure to predict a timing of a next request for a data object. In some instances, such as where history of requests to access a data object are limited, the data manager168may additionally or alternatively utilize a history of requests to access other data objects on the data storage system to predict a timing of a next request to access a computed data object. Other data objects may include, for example, other data objects designated for storage within a common storage location (e.g., the same folder, group, or bucket), other data objects sharing common formats, other data objects of the user, other data objects computed based on execution of the same task, etc.

At block504, the data manager168calculates a metric of resource consumption for storing the computed data object until the predicted next request. Illustratively, the metric of resource consumption for storing the computed data object may be based on an availability of memory required to store the data object over the period of time until the predicted next request. The memory required to store the data object may be determined based, for example, on a prior generation of the computed data object, or on similar computed data object that have previously been generated. Thus, the metric for storing the computed data object until the predicted next request may be computed by multiplying together the memory required to store the data object and an availability metric of such memory over the period of time until the next predicted request. In one embodiment, the availability metric of memory is set based on a current availability of memory to store the data object (e.g., such that lower availability results in a higher metric). In another embodiment, the availability metric of memory may vary over time, such as based on a forecasted availability. The availability metric may illustratively be represented as a dimensionless quantity, or in a dimension disassociated with memory as a computing resource, in able to allow for comparison of the metric to other potential metrics.

In some instances, at block504, the data manager168may additionally calculate a resource metric for generating the computed data object. Generally, such a resource metric for may be calculated at block504only when computational resources are not already “sunk”—that is, when the computed data object has not already been generated. For example, block504may include calculating a resource metric for generating a data object when the routine500is implemented at interaction (3) ofFIG. 3. Block504may exclude calculating a resource metric for generating a data object when the routine500is implemented at interaction (7) ofFIG. 4, since the computed data object is already available at the service160and need not be recomputed.

The metric for generating the computed data object may be based, for example, on processing power, processing time, and memory of the on-demand code execution system110to compute the data object. The metric may additionally or alternatively be based on network bandwidth used to compute the data object (e.g., in transferring a source data object to the system110and transferring the computed data object from the system110to the data storage system160). In one embodiment, the calculated metric may be based on historical computing resources used to generate the computed data object, which may be expected to remain stable over time, multiplied by current availability metrics associated with such resources. In another embodiment, the calculated metric may be based on historical computing resources used to generate similar data objects, as multiplied by current availability metrics associated with such resources. As with metrics for storing the data object, the metric for generating the data object may be expressed as a dimensionless quantity, or in a dimension disassociated with the specific computing resources used to compute the data object.

At block506, the data manager168additionally computes an expected metric for computing the child data object at the time of the predicted next request for the data object. Generally, this expected metric may be calculated similarly to the present metric of generating the computed data object, as described above (e.g., based on the expected computing resources of the on-demand code execution system110to generate the computed data object). However, in one embodiment, the expected metric of generating the computed data object at the time of the predicted next request for the data object is based on forecasted computing resource availability metrics at the time of the next predicted request. Illustratively, if the next request is predicted to occur during a time of high computing resource availability, the expected metric for generating the computed data object at the time of the predicted next request for the data object may be lower than a present metric for generating the computed data object. If the next request is predicted to occur at a time of low computing resource availability, the expected metric for generating the computed data object at the time of the predicted next request for the data object may be higher than a present metric for generating the computed data object.

Moreover, in some instances, the expected metric for of generating the computed data object at the time of the predicted next request for the data object may include a predicted delay in satisfying a request for the data object using on-the-fly computation, as opposed to storing the computed data object prior to such a request. For example, a client device102instructing the service160to store the computed data object (or simulate such storage) may assign a metric for a delay in providing the data object in response to a request. The data manager168may therefore predict such a delay (e.g., as the excess time required to generated the computed data object versus retrieving the data object from storage), based for example on historical data regarding time required to generate or retrieve the computed data object or similar data objects. The data manager168may then increase expected metric for computing the child data object at the time of the predicted next request for the data object based on the predicted delay, weighted according to the assigned weighting for the delay. Thus, the expected metric for computing the child data object at the time of the predicted next request for the data object can be modified to account for potential delays associated with simulated storage.

At block508, the data manager168compares the expected metric calculated at block504with the expected metric calculated at block506. If the expected metric for computing the child data object at the time of the predicted next request for the data object is less than the expected metric for storing the data object (and generating the data object at a present time, if necessary), the routine500proceeds to block514. At block514, any presently maintained representation of the computed data object is deleted, as the data manger168has elected to simulate storage of the computed data object, rather than incur the resource usage to store that representation. The routine500may then end at block516.

Alternatively, if the expected metric for computing the child data object at the time of the predicted next request for the data object is greater than the expected metric for storing the data object (and generating the data object at a present time, if necessary), the routine500proceeds to block510, where the computed data object is generated (if not already stored at the data storage system160). Illustratively, the computed data object may be generated based on interaction with an on-demand code execution system110, as described above. Further, at block512, the computed data object is stored at the data storage system160, in accordance with typical operation of a network-based data storage system. The data storage system160thus incurs the resource usage to store the computed data object, as opposed to incurring the delays or resource usage to generate the computed data object at a later time (e.g., in response to a request for the computed data object). The routine500may then end at block516.

All of the methods and processes described above may be embodied in, and fully automated via, software code modules executed by one or more computers or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other computer storage device. Some or all of the methods may alternatively be embodied in specialized computer hardware.

Unless otherwise explicitly stated, articles such as ‘a’ or ‘an’ should generally be interpreted to include one or more described items. Accordingly, phrases such as “a device configured to” are intended to include one or more recited devices. Such one or more recited devices can also be collectively configured to carry out the stated recitations. For example, “a processor configured to carry out recitations A, B and C” can include a first processor configured to carry out recitation A working in conjunction with a second processor configured to carry out recitations B and C.