June 2025
Intermediate to advanced
837 pages
24h 50m
English
In this chapter, you’ve seen how versatile the stream API of Node.js can be in your application when it comes to modeling and manipulating data flows. You now know the four types of streams—readable, writable, duplex, and transform—and where you can use them.
There are some areas of use where streams can serve you very well in processing data. A very prominent example involves database connections. If you query data from a database, an alternative is to asynchronously process the entire result, which may be very large. By using streams in this case, you can process data records individually without losing control of the data flow.
Read now
Unlock full access