All fields

“Streams & Buffers” in Information Technology

17 questions across 1 technology.

Information Technology

17 questions in 1 technology

#QuestionTechnologyTopicLevel
1How would you copy a large file efficiently in Node.js, and what's the difference between fs.copyFile() and manually piping streams? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
2What is backpressure in Node.js streams, and how do you handle it correctly when piping data? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
3What is the difference between fs.readFile() and fs.createReadStream() for reading a file in Node.js? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingBeginner
4What is the difference between multer's diskStorage and memoryStorage engines? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingBeginner
5How do you correctly propagate and handle errors from a Node.js stream, given that stream errors aren't caught by a surrounding try/catch? Node.js › Error HandlingNode.jsError HandlingIntermediate
6How would you stream a large file upload directly to processing (like virus scanning or transcoding) without first saving the entire file to disk? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingIntermediate
7What is the purpose of the Content-Length and Transfer-Encoding: chunked headers, and why can't a response use both simultaneously? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersIntermediate
8How would you pipe the output of one child process directly into the input of another, replicating a shell pipeline in Node.js? Node.js › Child Processes & Process ManagementNode.jsChild Processes & Process ManagementIntermediate
9How would you read a large file efficiently using a stream rather than loading it entirely into memory with fs.readFile()? Node.js › File System (fs) ModuleNode.jsFile System (fs) ModuleIntermediate
10What is the global Buffer class, and how does it relate to the process object's broader role in giving access to system-level capabilities? Node.js › Global Objects & the process ObjectNode.jsGlobal Objects & the process ObjectIntermediate
11What is an async generator, and how does 'for await...of' let you consume asynchronously produced data? Node.js › Async PatternsNode.jsAsync PatternsAdvanced
12What is the node:stream module's Transform stream, and how does it differ from a Readable or Writable stream? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesAdvanced
13How would you process a very large CSV file in Node.js without loading the entire file into memory? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingAdvanced
14How would you process and resize an uploaded image in Node.js using the sharp library, and why is sharp generally preferred over pure-JavaScript alternatives? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingAdvanced
15How would you implement resumable/chunked file uploads in Node.js to handle very large files over unreliable network connections? Node.js › File Uploads & Media ProcessingNode.jsFile Uploads & Media ProcessingAdvanced
16How would you implement Server-Sent Events (SSE) in Node.js to push real-time updates to a browser client over a single long-lived HTTP connection? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersAdvanced
17How would you implement HTTP response streaming in Node.js to begin sending data to a client before the entire response is ready, such as for a large report? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersAdvanced