Series: Node.js TypeScript

JavaScript Node.js

Node.js TypeScript #15. Benefits of the HTTP/2 protocol

This entry is part 12 of 15 in the Node.js TypeScript

The HTTP protocol, having been introduced in 1991, is almost 30 years old. It went through quite a journey since the first documented version, later called 0.9. In this article, we briefly go through the history of the development of the HTTP protocol and focus on what HTTP/2 brings and how we can benefit from […]

JavaScript Node.js

Node.js TypeScript #12. Introduction to Worker Threads with TypeScript

This entry is part 13 of 15 in the Node.js TypeScript

The Node.js and JavaScript are often perceived as a single-threaded but in this series, we prove that it is not entirely true. Node.js creates threads when performing Input/Output operations. Not only that, but we can also create additional processes. While the above does not count yet as multithreading, in this article we begin to cover […]

JavaScript Node.js

Node.js TypeScript #13. Sending data between Worker Threads

This entry is part 14 of 15 in the Node.js TypeScript

The Worker Threads give us quite exciting features when compared to, for example, child processes. In this article, we create our instances of the MessageChannel to communicate with the Worker Threads. Aside from that, we also share the data between them: it’s something that is not possible with child processes. Communicating using the MessageChannel There […]

JavaScript Node.js

Node.js TypeScript #14. Measuring processes & worker threads with Performance Hooks

This entry is part 15 of 15 in the Node.js TypeScript

When writing Node.js code, we can approach tasks in many ways. While all of them might work fine, some perform better than others, and as developers, we should strive to make both easily readable and fast applications. In this article, we learn how to measure the performance of our code using Performance Hooks, also called […]