Untitled
Slides in this set (3)
-
- Node takes an approach that serves all the request from a single thread known as the event loop. When node receives an request from the client it will put the request in the event queue, the event loop runs indefinetly to retrieve an request in the event queue, in one case if the request doesn't involve a blocking I/O operation node will simply process and prepare the response and sent it back to the client, in another case if the request requires blocking operations, node will deligate it to a worker tread in thread pool to work on the blocking I/O operations. The blocking I/O operation may be associated with the callback function. When the blocking I/O operations completes, the worker thread will prepare the response and send it back to event loop which then runs the callback function and send back response to the client. Therefore the main program is not blocked by the I/O operations so node keeps a single threaded event loop through our code and everything else runs in parallel and that's the secret why node has such a high I/O performance. .
-
- 1. Number
- 2. String
- 3. Undefined
- 4. Null
- 5. Boolean
- 6. Symbol ( data type whose instances are unique and immutable. )
-
- Synchronous JavaScript: As the name suggests synchronous means to be in a sequence, i.e. every statement of the code gets executed one by one. So, basically a statement has to wait for the earlier statement to get executed.
Information
- Description
- Slide Set on Untitled, created by Aman sharma on 09/12/2020.
- Created by
- Aman sharma
- Views
- 0
- Rating