Don’t Try This at Home: Synchronous I/O in Node.js
summary
Explores concrete options for doing synchronous I/O in Node.js and what actually works: plain fs.readFileSync exists but only covers files; compiling C/Rust to WASI WebAssembly is synchronous but awkward; native add‑ons work but require reimplementing networking; workers + Atomics lets main thread block while a worker does async network I/O and is production‑ready but blocks the event loop and limits object access; embedding a separate Node instance (synchronous worker) is powerful but experimental and crash‑prone; mongosh currently uses Babel to transpile async to sync as a pragmatic workaround.
AI-written summary · about
chapters (4)
- 0:00Start
- 5:04So what do I actually work on
- 6:12Migrating from Spider Monkey to Node.js
- 17:40Sync I/O in Node.js: The chaotic neutral way
related talks
41mPut on your asynchronous hat and node
34mYou Don't Know Node.js
35mNodeJS: from single thread to worker threads
39mYou Don’t Node.js
33mNode.js: The Road to Workers
22mScaling Node.js and unblocking the Event Loop
52mShared Memory in Multithreaded Node.js
13mConcurrency vs Parallelism in Node.js: Understanding the Event Loop & Worker Threads
