NodeJS Under the Hood

what does it mean by : NodeJS is single threaded non blocking eventdriven framework….

NodeJS works on single thread ie main thread .

where as other develoment platforms use multiple threading to process multiple request you can say one thread per request .
So by using single thread NodeJS saves a lot of memory.

NodeJS = JavaScript  V8 Engine + libuv + Event Pool

a C++ library for asynchronous IO functionality.

JavaScript V8 is a JS interpreter .

Here one stack and event pool and one queue works . where threads dont make each other to wait for processing but events for each task are generated and they will automatcally callback when processing is complete in this way callbacks make it asynchronous and non blocking for othe threads

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s