Node JS Services
Thread vs Evented
Let’s take an example: 3 people simultaneously connect to www.paginata.ro site is hosted on a server with Apache2, PHP, Linux (LAMP). HTTP server (Apache2) takes connections and open a thread for each connection. Each thread will run an instance of the file index.php, will evaluate fully, from top to bottom (synchronous). Now the important part: a core of a CPU can not run more than one instruction at a time, just the way they are designed. So the core of a CPU can not run simultaneously instructions of the 3 instances of file index.php. This is where the threads that share files instructions in increments of time that will be processed by a core. Imagine three sophisticated women who want to write a book, each at the same typewriter. Can not simultaneously, but dividing pages in increments of time each takes to write a few pages then gives a turn and so ends up typing books.
Revisit Example: 3 people simultaneously connect to www.paginata.ro site is hosted on a server with Node.js, Linux. HTTP server (Node.js) takes connections and initiates an event (eg “connected”) pt. each connection sequence. Each event initiates a series of events (asynchronous). Because a core (CPU) can not only run once an instruction at any moment in time, one event is processed (in a series of events). Evented scheduling (asynchronous) has the main loop (Event loop) and has two components, event detection (detection event) and event handling (event handlers). Browsers are Evented therefore have the main loop for. event detection. Therefore meet syntax onclick (afiseazaCeva). The main event loop detects “click” and runs the “afiseazaCeva” which is an event handler (callback). Nginx ™ and light HTTP are based event which makes them more efficient as Apache2.
2. A community project is about 2½ years and has 3000+ modules written. Not all are excellent, but are open-source and can do just about anything you need, even if you want me to turn the lights on in the room (seriously vb).
3. The modules/libraries and NPM (Node.js Package Manager) A very important that the community has managed to do is to create standards. How important are standards?! Is a standard language, writing is a standard; We have never evolved if they fail to conform to some set of rules accepted in the community. There are other important things but as Article too long to pass all.
Einfach Hub Is the company that can help you using Node .all you have to do is visit our website and contact us, and we will resolve your problems.