METHOD AND SYSTEM FOR PERSISTENT HELPERS FOR FUNCTIONS AS A SERVICE (FAAS) IN CLOUD COMPUTING ENVIRONMENTS
20210042098 ยท 2021-02-11
Assignee
Inventors
Cpc classification
G06F16/2379
PHYSICS
G06F15/17331
PHYSICS
International classification
Abstract
A method for improving the performance of functions-as-a-service including receiving a first function call comprising a first argument, performing a first function responsive to the first argument comprised by the first function call, producing a first function result, generating a first precomputation argument that differs from the first argument responsive to the first function call, executing a first persistent function responsive to the first precomputation argument, the persistent function comprising performing at least one precomputation operation, the at least one precomputation operation comprising performing the first function responsive to the first precomputation argument, producing a first precomputation result, storing the first precomputation result, receiving a second function call comprising a second argument, comparing the second argument to the first precomputation argument, and upon determining the second argument is identical to the first precomputation argument, transmitting the first precomputation result from a source of the second function call.
Claims
1. A method for improving the performance of functions-as-a-service comprising: receiving a first function call comprising a first argument; performing a first function responsive to the first argument comprised by the first function call, producing a first function result; generating a first precomputation argument that differs from the first argument responsive to the first function call; executing a first persistent function responsive to the first precomputation argument, the first persistent function comprising performing at least one precomputation operation, the at least one precomputation operation comprising performing the first function responsive to the first precomputation argument, producing a first precomputation result; storing the first precomputation result; receiving a second function call comprising a second argument; comparing the second argument to the first precomputation argument; and upon determining the second argument is identical to the first precomputation argument, transmitting the first precomputation result from a source of the second function call.
2. The method of claim 1 further comprising storing the first precomputation result in memory.
3. The method of claim 1 further comprising storing the first precomputation result in a result database.
4. The method of claim 1 wherein the first persistent function is stateful.
5. The method of claim 1 further comprising retrieving the first persistent result using remote direct memory access.
6. The method of claim 1 further comprising: identifying one or more operations comprised by the first function that are persisted, defining persisted operations; identifying one or more operations comprised by the first function that are not persisted, defining non-persisted operations; determining a total resource availability; determining a performance enhancement value for each non-persisted operation by comparing the time to perform the non-persisted operation with the time to perform the non-persisted operation if it were persisted; assigning a resource cost to each performance enhancement value; and recursively reassigning non-persisted operations as persisted operations in order of their performance enhancement values, defining reassigned operations, until the sum of the resource costs for the reassigned operations would exceed the total resource availability.
7. The method of claim 6 wherein: the total resource availability is at least one of a total memory availability, a total read/write availability, and a storage availability; and the resource cost is at least one of memory used in persisting the non-persisted operation, read/write utilization in persisting the non-persisted operation, and storage utilized in persisting the operation.
8. The method of claim 6 wherein the non-persisted operations are reassigned as persisted operations responsive to having the largest performance enhancement value.
9. The method of claim 6 wherein the non-persisted operations are reassigned as persisted operations responsive to having the largest ratio of performance enhancement value to resource cost.
10. The method of claim 1 comprising: caching an image of the first function; creating a first container consisting of the first function; storing the first container in a function container pool; caching an image of the first persistent function; creating a first persistent container consisting of the first persistent function; and storing the first persistent container in a persistent function container pool.
11. The method of claim 10 wherein executing the first persistent function comprises executing the first persistent container.
12. The method of claim 11 further comprising retrieving the first persistent result using remote direct memory access.
13. A results-as-a-service (RaaS) system for improving functions-as-a-service operation comprising: a server comprising; a function container pool comprising a plurality of function containers; a resource manager configured to launch and manage containers within the function container pool; a persistent function container pool comprising a plurality of persistent function containers; and a persistent functions manager configured to launch and manage the persistent function container pool; a container registry positioned in communication with the server comprising a record of all functions registered with the RaaS system; and a catalog of persistent functions registered with the RaaS system positioned in communication with the server.
14. The RaaS system of claim 13 wherein the server further comprises: a resource manager comprising: a scheduler; and a container launcher; and an event controller configured to invoke functions comprised by the function container pool.
15. The RaaS system of claim 13, wherein the server is one of a plurality of servers, the RaaS system further comprising a load balancer configured to route requests to a server of the plurality of servers; a function metadata database; a message queue configured for asynchronous execution; and an object store database configured to store logs from the plurality of servers.
16. A method for improving the performance of functions-as-a-service comprising: receiving a first function call comprising a first argument; performing a first function responsive to the first argument comprised by the first function call, producing a first function result; generating a first precomputation argument that differs from the first argument responsive to the first function call; executing a first persistent function responsive to the first precomputation argument, the first persistent function comprising performing at least one precomputation operation, the at least one precomputation operation comprising performing the first function responsive to the first precomputation argument, producing a first precomputation result; storing the first precomputation result in at least one of memory and a result database; receiving a second function call comprising a second argument; comparing the second argument to the first precomputation argument; and upon determining the second argument is identical to the first precomputation argument, transmitting the first precomputation result from a source of the second function call; wherein the first persistent function is stateful.
17. The method of claim 16 further comprising: identifying one or more operations comprised by the first function that are persisted, defining persisted operations; identifying one or more operations comprised by the first function that are not persisted, defining non-persisted operations; determining a total resource availability; determining a performance enhancement value for each non-persisted operation by comparing the time to perform the non-persisted operation with the time to perform the non-persisted operation if it were persisted; assigning a resource cost to each performance enhancement value; and recursively reassigning non-persisted operations as persisted operations in order of their performance enhancement values, defining reassigned operations, until the sum of the resource costs for the reassigned operations would exceed the total resource availability.
18. The method of claim 17 wherein: the total resource availability is at least one of a total memory availability, a total read/write availability, and a storage availability; and the resource cost is at least one of memory used in persisting the non-persisted operation, read/write utilization in persisting the non-persisted operation, and storage utilized in persisting the operation.
19. The method of claim 17 wherein the non-persisted operations are reassigned as persisted operations responsive to having the largest performance enhancement value.
20. The method of claim 17 wherein the non-persisted operations are reassigned as persisted operations responsive to having the largest ratio of performance enhancement value to resource cost.
21. The method of claim 16 further comprising retrieving the first persistent result using remote direct memory access.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
DETAILED DESCRIPTION OF THE INVENTION
[0050] The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Those of ordinary skill in the art realize that the following descriptions of the embodiments of the present invention are illustrative and are not intended to be limiting in any way. Other embodiments of the present invention will readily suggest themselves to such skilled persons having the benefit of this disclosure. Like numbers refer to like elements throughout.
[0051] Although the following detailed description contains many specifics for the purposes of illustration, anyone of ordinary skill in the art will appreciate that many variations and alterations to the following details are within the scope of the invention. Accordingly, the following embodiments of the invention are set forth without any loss of generality to, and without imposing limitations upon, the claimed invention.
[0052] In this detailed description of the present invention, a person skilled in the art should note that directional terms, such as above, below, upper, lower, and other like terms are used for the convenience of the reader in reference to the drawings. Also, a person skilled in the art should notice this description may contain other terminology to convey position, orientation, and direction without departing from the principles of the present invention.
[0053] Furthermore, in this detailed description, a person skilled in the art should note that quantitative qualifying terms such as generally, substantially, mostly, and other terms are used, in general, to mean that the referred to object, characteristic, or quality constitutes a majority of the subject of the reference. The meaning of any of these terms is dependent upon the context within which it is used, and the meaning may be expressly modified.
[0054] Referring now to
[0055] The RaaS architecture further comprises one or more RaaS server (such as 104, 106, 108, 110, 112) configured to execute functions within containers and returns a response to clients. The RaaS servers 104, 106, 108, 110, 112 are placed under an auto-scaling group 102. Response from function execution is sent back to the load balancer 100.
[0056] The RaaS architecture further comprises a database 114 configured to store function meta-data, a message queue 116 is configured for asynchronous/pull execution, and an object store 118 is configured for storing logs.
[0057] The source code of functions and persistent helpers is packaged as a container image. A container registry 120 (or functions distribution service) comprised by the RaaS architecture maintains a record of all the functions registered with the RaaS architecture. Similarly, a catalog of persistent helper functions 122 comprised by the RaaS architecture is maintained. As the source code of functions and persistent helpers is packaged as container images, these can be implemented in any language supported by the container runtime.
[0058] Referring now to
[0059] Persistent Helper functions executing within containers can be accelerated using Remote Direct Memory Access (RDMA). RDMA has been demonstrated to improve network performance in containerized environments achieving higher throughput, lower latency, and less CPU overhead. RDMA enables zero-copy networking such that data can be sent and received directly between applications without being copied between network layers. Further, persistent helper functions can benefit from network protocols that support RDMA including InfiniBand (IB) and RDMA Over Converged Ethernet (RoCE). Specifically, persistent helper functions may benefit from RDMA by the retrieval of the results of persistent helper functions, defined as persistent results, using RDMA.
[0060] Referring now to
[0061] Referring now to
[0062] Referring now to
[0063] Referring now to
[0064] Referring now to
[0065] Referring now to
[0066] Can be stateful
[0067] Can have different billing & subscription models
[0068] Can be trained continuously
[0069] Can be executed on GPUs or ASICs
[0070] Can be shared across multiple lambda functions
[0071] Can be customized for a lambda function
[0072] May use a third-party library or may be developed by the user itself
[0073] Can be managed through a persistent helper functions dashboard
[0074] Can be scaled elastically
[0075] While the example of sentiment is described herein, it is contemplated that the RaaS system described herein may be used for a wide variety of applications and not exclusively for sentiment analysis, nor may such sentiment analysis be constrained to social media applications, but instead is applicable to all instances where sentiment analysis is desired, including, but not limited to, other types of correspondence.
[0076] Referring now to
[0077] Referring now to
[0078] Upon determining the performance enhancement value and resource cost for each non-persisted operation, the non-persisted operations may be recursively reassigned as persisted operations in order of their performance enhancement values, defining reassigned operations, until the sum of the resource costs for the reassigned operations would exceed the total resource availability. In some embodiments, the non-persisted operations may be reassigned as persisted operations responsive to having the largest performance enhancement value. In some embodiments, the non-persisted operations may be reassigned as persisted operations responsive to having the largest ratio of performance enhancement value to resource cost.
[0079] Referring now to
[0080] Referring now to
[0081] In both the cold and warm run experiments (with persistence in memory as shown in
[0082] As one of ordinary skill in the art will appreciate, the above-recited servers may comprise all necessary hardware, including, but not limited to, a processor, memory operably coupled to the processor, a storage device, such as a hard drive, coupled to the processor, and a network communication device coupled to the processor. The processor may be any type of processor as is known in the art, including, but not limited to, integrated circuits, microprocessors, field programmable gate assemblies, and the like. The storage may be any type of storage device as is known in the art, including, but not limited to, hard disk drives, solid state drives, flash drives, secure digital (SD) drives, including Mini SD cards and Micro SD cards, compact flash (CF) cards, and the like. The network communication device may be any device operable to communicate across a network, including but not limited to, an Ethernet card, a Wi-Fi device, a Bluetooth device, a Zigbee device or any other IEEE 802.XX compliant device, a cellular communication device, and the like. Accordingly, the servers described above may be operable to communicate across a network, including wide access networks (WANs) such as the internet, local area networks (LANs), and personal area networks (PANs). Some of the illustrative aspects of the present invention may be advantageous in solving the problems herein described and other problems not discussed which are discoverable by a skilled artisan.
[0083] While the above description contains much specificity, these should not be construed as limitations on the scope of any embodiment, but as exemplifications of the presented embodiments thereof. Many other ramifications and variations are possible within the teachings of the various embodiments. While the invention has been described with reference to exemplary embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed as the best or only mode contemplated for carrying out this invention, but that the invention will include all embodiments falling within the scope of the appended claims. Also, in the drawings and the description, there have been disclosed exemplary embodiments of the invention and, although specific terms may have been employed, they are unless otherwise stated used in a generic and descriptive sense only and not for purposes of limitation, the scope of the invention therefore not being so limited. Moreover, the use of the terms first, second, etc. do not denote any order or importance, but rather the terms first, second, etc. are used to distinguish one element from another. Furthermore, the use of the terms a, an, etc. do not denote a limitation of quantity, but rather denote the presence of at least one of the referenced item.
[0084] Thus the scope of the invention should be determined by the appended claims and their legal equivalents, and not by the examples given.