1. React
  2. JSHeroes
  3. 2019
  4. Electron: The Event Loop Tightrope

Electron: The Event Loop Tightrope

Get a glimpse into the inner workings of three powerful open source projects: Electron, Node, & Chromium.

Shelley Vohr at JSHeroes 2019

On principle, Electron is designed to lower the barrier to entry for development and maintenance of cross-platform desktop development. However, beneath the surface of this seeming magic is a carefully engineered web of JavaScript concepts that need to connect in just the right way to make that magic possible. A JavaScript runtime uses a message queue, or event loop, in order to process messages. Each kind of message has an associated function which handles it, and both Node.js and Chromium, which Electron embeds, have different event loops which must be reconciled. This talk will discuss the principles of the event loop as well as the challenges and solutions that Electron faced and arrived at in order to make the synthesis of Node.js and Chromium in Electron possible. You'll get a glimpse into the inner workings of three powerful open source projects, as well as how they leverage and utilize JavaScript for the benefit of users from beginner to expert.