Virtualization-based transaction handling in an on-demand network code execution system

US11714675B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11714675-B2
Application numberUS-202117472380-A
CountryUS
Kind codeB2
Filing dateSep 10, 2021
Priority dateJun 20, 2019
Publication dateAug 1, 2023
Grant dateAug 1, 2023

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Systems and methods are described for providing virtualized transaction retries in an on-demand network code execution system. A user may generate a task on the system by submitting code. The task may include a transaction that can succeed or fail depending on external factors, such as accessing a resource that other processes are also trying to access. The system may obtain success criteria for evaluating whether the transaction was successful, and may configure a virtual machine instance to execute the submitted code. The system may generate a “snapshot” or otherwise capture information regarding the state of the virtual machine instance prior to executing the code, and may then execute the code or a portion of it to attempt the transaction. The system may then apply the success criteria to determine whether the transaction was successful, and if not may retry the transaction by restoring the snapshot and re-executing the code.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer-implemented method comprising: obtaining a request to execute user-submitted code on an on-demand code execution system, wherein the user-submitted code is associated with metadata that identifies a portion of the user-submitted code as including a transaction; causing the on-demand code execution system to configure a virtual computing environment to execute the user-submitted code; generating a snapshot of the virtual computing environment when execution of the user-submitted code reaches a first statement in the user-submitted code, the first statement associated with a start of the transaction; causing the on-demand code execution system to perform a first execution of the transaction within the virtual computing environment; determining, based at least in part on a result obtained from the first execution, that the first execution was not successful, wherein the result is generated based at least in part on the execution of the user-submitted code reaching a second statement associated with an end of the transaction; causing the on-demand code execution system to restore the snapshot of the virtual computing environment, wherein restoring the snapshot of the virtual computing environment changes an execution state of the user-submitted code from a state corresponding to the second statement to a state corresponding to the first statement; and causing the on-demand code execution system to perform a second execution of the transaction within the virtual computing environment. 2. The computer-implemented method of claim 1 , wherein the request includes the metadata. 3. The computer-implemented method of claim 1 , wherein the metadata includes a success criterion. 4. The computer-implemented method of claim 3 , wherein determining that the first execution was not successful comprises determining that the result obtained from the first execution does not satisfy the success criterion. 5. The computer-implemented method of claim 3 , wherein the success criterion specifies that the result includes an expected response to the transaction. 6. The computer-implemented method of claim 1 , wherein the metadata includes a retry criterion. 7. The computer-implemented method of claim 6 , wherein the retry criterion specifies one of more of a threshold number of retries to attempt or a threshold amount of time during which to attempt retries. 8. The computer-implemented method of claim 7 further comprising: causing the on-demand code execution system to perform a second execution of the transaction within the virtual computing environment; determining, based at least in part on a result obtained from the second execution, that the second execution was not successful; determining that the retry criterion is no longer satisfied; and transmitting a report to a sender of the request to execute the user-submitted code, the report indicating that execution of the user-submitted code was unsuccessful. 9. A system comprising: a non-transitory data store configured to store computer-executable instructions; and a processor in communication with the non-transitory data store, wherein the computer-executable instructions, when executed by the processor, configure the processor to perform operations including: causing an on-demand code execution system to configure a virtual computing environment to execute user-submitted code, wherein the user-submitted code is associated with metadata that identifies a portion of the user-submitted code as including a transaction; generating a snapshot of the virtual computing environment when execution of the user-submitted code reaches a first statement in the user-submitted code, the first statement associated with a start of the transaction; causing the on-demand code execution system to perform a first execution of the transaction within the virtual computing environment; determining, based at least in part on a result obtained from the first execution, that the first execution was not successful, wherein the result is obtained after the execution of the user-submitted code reaches a second statement in the user-submitted code, the second statement associated with an end of the transaction; causing the on-demand code execution system to restore the snapshot of the virtual computing environment, wherein restoring the snapshot changes an execution state of the user-submitted code from a state corresponding to the second statement to a state corresponding to the first statement; and causing the on-demand code execution system to perform a second execution of the transaction within the virtual computing environment. 10. The system of claim 9 , wherein the metadata is generated by a transaction analyzer. 11. The system of claim 9 , wherein the metadata is submitted with a request to execute the user-submitted code. 12. The system of claim 9 , wherein the metadata is included in the user-submitted code. 13. The system of claim 9 , wherein the metadata includes one or more of a line number identifying a line of the user-submitted code, a marker or statement in the user-submitted code, or an indication that a function or API call in the user-submitted code is known to invoke a transaction. 14. The system of claim 9 , wherein the non-transitory data store is configured to store further computer-executable instructions that, when executed by the processor, configure the processor to perform further operations including: identifying, based at least in part on the transaction, a set of computing resources to include in the snapshot of the virtual computing environment. 15. The system of claim 14 , wherein generating the snapshot comprises one or more of preserving all or part of contents of the set of computing resources, logging changes to the set of computing resources, determining that the virtual computing environment is in a known baseline state, or preserving a network configuration. 16. The system of claim 9 , wherein the non-transitory data store is configured to store further computer-executable instructions that, when executed by the processor, configure the processor to perform further operations including: determining that the portion of the user-submitted code corresponding to the transaction causes a side effect if executed repeatedly, wherein causing the on-demand code execution system to restore the snapshot of the virtual computing environment does not restore the side effect to its original state; and generating and transmitting a warning regarding the side effect. 17. Non-transitory computer-readable media including computer-executable instructions that, when executed by a processor, cause the processor to perform operations including: causing an on-demand code execution system to execute user-submitted code in a virtual computing environment, wherein the user-submitted code is associated with metadata that identifies a portion of the user-submitted code as including a transaction; obtaining a state of the virtual computing environment when execution of the user-submitted code reaches a first location in the user-submitted code, the first location being associated with a start of the transaction; determining, based at least in part on a result obtained when the execution of the user-submitted code reaches a second location in the user-submitted code, the second location being associated with an end of the transaction, that a success criterion has not been satisfied; restoring the state of the virtual computing environment to that obtained when the execution of the user-submitted code reached

Assignees

Inventors

Classifications

  • G06F9/466Primary

    Transaction processing · CPC title

  • based on web technology, e.g. hypertext transfer protocol [HTTP] · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11714675B2 cover?
Systems and methods are described for providing virtualized transaction retries in an on-demand network code execution system. A user may generate a task on the system by submitting code. The task may include a transaction that can succeed or fail depending on external factors, such as accessing a resource that other processes are also trying to access. The system may obtain success criteria fo…
Who is the assignee on this patent?
Amazon Tech Inc
What technology area does this patent fall under?
Primary CPC classification G06F9/466. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Aug 01 2023 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 12 related publications on this page (citations in our corpus or others sharing the same primary CPC).