June 2014
Intermediate to advanced
696 pages
38h 52m
English
The fs module provided in Node.js makes almost all functionality available in two forms: asynchronous and synchronous. For example, it offers the asynchronous form write() and the synchronous form writeSync(). It is important to understand the difference when you are implementing code.
Synchronous file system calls block until a call completes and then control is released back to the thread. This has advantages but can also cause severe performance issues in Node.js if synchronous calls block the main event thread or too many of the background thread pool threads. Therefore, you should limit the use of synchronous file system calls when possible.
Asynchronous calls are placed on the event queue ...
Read now
Unlock full access