@gron

Reasoning About the Node.Js Event Loop Using Async Graphs

, , , and . Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization, page 61--72. IEEE Press, (2019)

Abstract

With the popularity of Node.js, asynchronous, event-driven programming has become widespread in server-side applications. While conceptually simple, event-based programming can be tedious and error-prone. The complex semantics of the Node.js event loop, coupled with the different flavors of asynchronous execution in JavaScript, easily leads to bugs. This paper introduces a new model called Async Graph to reason about the runtime behavior of applications and their interactions with the Node.js event loop. Based on the model, we have developed AsyncG, a tool to automatically build and analyze the Async Graph of a running application, and to identify bugs related to all sources of asynchronous execution in Node.js. AsyncG is compatible with the latest ECMAScript language features and can be (de)activated at runtime. In our evaluation, we show how AsyncG can be used to identify bugs in real-world Node.js applications.

Description

Reasoning about the Node.js event loop using async graphs

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted