TY - JOUR
T1 - Semantics of asynchronous JavaScript
AU - Loring, Matthew C.
AU - Marron, Mark
AU - Leijen, Daan
N1 - Publisher Copyright:
© 2017 Owner/Author.
PY - 2017/10/24
Y1 - 2017/10/24
N2 - JavaScript code running in the Node.js runtime is a major platform for developers building cloud, mobile, or IoT applications. A fundamental concept in Node.js programming is the use of asynchronous callbacks and event loops to provide highly responsive applications. While conceptually simple, this programming model contains numerous subtleties and behaviors that are defined implicitly by the current Node.js implementation. This paper presents the first comprehensive formalization of the Node.js asynchronous execution model and defines a high-level notion of async-contexts to formalize fundamental relationships between asynchronous executions in an application. These formalizations provide a foundation for the construction of static or dynamic program analysis tools, support the exploration of alternative Node.js event loop implementations, and provide a high-level conceptual framework for reasoning about relationships between the execution of asynchronous callbacks in a Node.js application.
AB - JavaScript code running in the Node.js runtime is a major platform for developers building cloud, mobile, or IoT applications. A fundamental concept in Node.js programming is the use of asynchronous callbacks and event loops to provide highly responsive applications. While conceptually simple, this programming model contains numerous subtleties and behaviors that are defined implicitly by the current Node.js implementation. This paper presents the first comprehensive formalization of the Node.js asynchronous execution model and defines a high-level notion of async-contexts to formalize fundamental relationships between asynchronous executions in an application. These formalizations provide a foundation for the construction of static or dynamic program analysis tools, support the exploration of alternative Node.js event loop implementations, and provide a high-level conceptual framework for reasoning about relationships between the execution of asynchronous callbacks in a Node.js application.
KW - Asynchrony
KW - JavaScript
UR - http://www.scopus.com/inward/record.url?scp=85084391833&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85084391833&partnerID=8YFLogxK
U2 - 10.1145/3133841.3133846
DO - 10.1145/3133841.3133846
M3 - Article
AN - SCOPUS:85084391833
SN - 1523-2867
VL - 52
SP - 51
EP - 62
JO - ACM SIGPLAN Notices
JF - ACM SIGPLAN Notices
IS - 11
ER -