Dependency handling in an on-demand network code execution system
First Claim
1. A system comprising:
- a physical data store storing;
a first package representing as a single file a set of code objects depended on by at least first user-submitted code executable on an on-demand code execution system; and
a collection of packages representing the set of code objects as multiple files;
a computing device configured with executable instructions to;
receive a request for the set of code objects depended on by at least first user-submitted code executable;
make a selection between returning information identifying the first package or information identifying the collection of packages in response to the request, wherein making the selection comprises;
determining, for the collection of packages, a threshold use rate for incurring additional time required to transfer the set of code objects as the collection of packages to a computing device within the on-demand code execution system relative to time required to transfer the set of code objects as the first package to the computing device, wherein the threshold use rate is determined based at least partly on a number of files within the collection of packages;
obtaining an expected future use rate on the on-demand code execution system for the collection of packages, wherein the expected future use rate indicates at least one expected future use of a file, within the multiple files, by an execution of second user-submitted executable code on the on-demand code execution system, the second user-submitted code being distinct from the first user-submitted code;
determining whether the expected future use rate for the collection of packages at least meets the threshold use rate for incurring the additional time required to transfer the collection of packages to the computing device, wherein if the expected future use rate at least meets the threshold, the computing device is configured to return information identifying the collection of packages in response to the request, and wherein if the expected future use rate does not meet the threshold, the computing device is configured to return information identifying the first packages in response to the request; and
in response to determining that the expected future use rate for the collection of packages at least meets the threshold use rate, selecting to return the information identifying the collection of packages in response to the request; and
return, as a response to the request, the information identifying the collection of packages, wherein the response to the request causes the computing device within the on-demand code execution system to retrieve individual files within the collection of packages for use during execution of the first user-submitted executable code.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods are described for managing dependencies among code in an on-demand code execution system in a manner that enables efficient execution of the code. A user may generate a task on the system by submitting code, which may reference additional code on the system. The system can determine a dependency graph for the submitted code, and generate multiple representations of the dependency graph, storing dependency code objects in different numbers of files. On receiving a request to provision an execution environment for the task, the system can select an appropriate representation based on an expected reuse of the files within different representations. For example, a representation of fewer files can be selected where expected future use is low, minimizing retrieval time but also potentially limiting reuse of code objects within the representation.
-
Citations
19 Claims
-
1. A system comprising:
-
a physical data store storing; a first package representing as a single file a set of code objects depended on by at least first user-submitted code executable on an on-demand code execution system; and a collection of packages representing the set of code objects as multiple files; a computing device configured with executable instructions to; receive a request for the set of code objects depended on by at least first user-submitted code executable; make a selection between returning information identifying the first package or information identifying the collection of packages in response to the request, wherein making the selection comprises; determining, for the collection of packages, a threshold use rate for incurring additional time required to transfer the set of code objects as the collection of packages to a computing device within the on-demand code execution system relative to time required to transfer the set of code objects as the first package to the computing device, wherein the threshold use rate is determined based at least partly on a number of files within the collection of packages; obtaining an expected future use rate on the on-demand code execution system for the collection of packages, wherein the expected future use rate indicates at least one expected future use of a file, within the multiple files, by an execution of second user-submitted executable code on the on-demand code execution system, the second user-submitted code being distinct from the first user-submitted code; determining whether the expected future use rate for the collection of packages at least meets the threshold use rate for incurring the additional time required to transfer the collection of packages to the computing device, wherein if the expected future use rate at least meets the threshold, the computing device is configured to return information identifying the collection of packages in response to the request, and wherein if the expected future use rate does not meet the threshold, the computing device is configured to return information identifying the first packages in response to the request; and in response to determining that the expected future use rate for the collection of packages at least meets the threshold use rate, selecting to return the information identifying the collection of packages in response to the request; and return, as a response to the request, the information identifying the collection of packages, wherein the response to the request causes the computing device within the on-demand code execution system to retrieve individual files within the collection of packages for use during execution of the first user-submitted executable code. - View Dependent Claims (2, 3, 4)
-
-
5. A computer-implemented method comprising:
-
receiving a request for a set of code objects depended on by first user-submitted code executable on an on-demand code execution system; identifying a first set of files representing the set of code objects and a second set of files representing the set of code objects, wherein a number of files within the second set of files is greater than a number of files within the first set of files; obtaining, for the second set of files, a threshold use value for incurring additional time to transfer the set of code objects as the second set of files to a computing device within the on-demand code execution system relative to time required to transfer the set of code objects as the first set of files to the computing device, wherein the threshold use value is determined based at least partly on files within the second set of files; making a selection between returning information identifying the first set of files or the second set of files in response to the request, wherein making the selection comprises; determining that an expected future use value on the on-demand code execution system for the second set of files satisfies the threshold use value for incurring the additional time required to transfer the second set of files to the computing device, wherein the expected future use value indicates at least one expected future use of a file, within the second set of files, by an execution of second user-submitted executable code on the on-demand code execution system, the second user-submitted code being distinct from the first user-submitted code; and in response to determining that the expected future use value for the second set of files satisfies the threshold use value, selecting to return the information identifying the second set of files in response to the request; returning, in response to the request, the information identifying the second set of files; retrieving the second set of files using the information and provisioning the set of code objects from the second set of files into an execution environment for the first user-submitted code. - View Dependent Claims (6, 7, 8, 9, 10, 11)
-
-
12. Non-transitory computer readable media including computer-executable instructions that, when executed on an on-demand code execution system, causes the on-demand code execution system to:
-
receive a request for a set of code objects depended on by first user-submitted code executable on an on-demand code execution system; identify a first set of files representing the set of code objects and a second set of files representing the set of code objects, wherein a number of files within the second set of files is greater than a number of files within the first set of files; obtain, for the second set of files, a threshold use value for incurring additional time to transfer the set of code objects as the second set of files to a computing device within the on-demand code execution system relative to time to transfer the set of code objects as the first set of files to the computing device, wherein the threshold use value is determined based at least partly on files within the second set of files; make a selection between returning information identifying the first set of files or the second set of files in response to the request, wherein making the selection comprises; determining that an expected future use value on the on-demand code execution system for the second set of files exceeds the threshold use value for incurring the additional time required to transfer the second set of files to the computing device, wherein the expected future use value indicates at least one expected future use of a file, within the second set of files, by an execution of second user-submitted executable code on the on-demand code execution system, the second user-submitted code being distinct from the first user-submitted code; and in response to determining that the expected future use value for the second set of files satisfies the threshold use value, selecting to return the information identifying the second set of files in response to the request; return, in response to the request, information identifying the second set of files; retrieve the second set of files using the information; and provision the set of code objects from the second set of files into an execution environment for the first user-submitted code. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
Specification