Join our book community on Discord
https://packt.link/EarlyAccess
Server-side web development is characterized by processing large volumes of HTTP requests as quickly and efficiently as possible. JavaScript is different from other languages and platforms because it has a single thread of execution, which means that HTTP requests are processed one at a time. Behind the scenes, however, there is a lot more going on, and in this chapter, I explain why the JavaScript approach is unusual, how the Node.js API performs work on behalf of JavaScript code, and how additional execution threads can be created to handle computationally intense tasks. Table 4.1 puts JavaScript concurrency in context.
Table 4.1. Putting Node.js Concurrency in ContextQuestion | Answer |
What is it? | Concurrency is the execution of multiple threads of code. Node.js has support for concurrency, but it hides the details from the developer. |
Why is it useful? | Concurrency allows servers to achieve greater throughput... |