User Tools

Site Tools


dido:public:ra:xapend:xapend.b_stds:defact:linuxf:nodejs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dido:public:ra:xapend:xapend.b_stds:defact:linuxf:nodejs [2020/05/22 16:32]
char
dido:public:ra:xapend:xapend.b_stds:defact:linuxf:nodejs [2021/11/09 15:41] (current)
char ↷ Links adapted because of a move operation
Line 1: Line 1:
 ===== Node.js ​ ===== ===== Node.js ​ =====
-[[dido:​public:​ra:​xapend.stds:​defact:​linuxf| return to the Linux Foundation ​ ]]+[[dido:​public:​ra:xapend:xapend.b_stds:​defact:​linuxf:start| return to the Linux Foundation ​ ]]
  
   : **Note:** The following is an excerpt from the official [[https://​nodejs.org/​en/​about/​|About Node.js]] site. It is provided here as a convenience and is not authoritative. Refer to the original document as the authoritative reference.   : **Note:** The following is an excerpt from the official [[https://​nodejs.org/​en/​about/​|About Node.js]] site. It is provided here as a convenience and is not authoritative. Refer to the original document as the authoritative reference.
Line 18: Line 18:
  
 ==== About ==== ==== About ====
-  : //As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. In the following "hello world" example, many connections can be handled concurrently. Upon each connection, the callback is fired, but if there is no work to be done, Node.js will sleep.//+  : //As an asynchronous event-driven ​[[dido:​public:​ra:​xapend:​xapend.a_glossary:​j:​javascript|JavaScript]] runtime, Node.js is designed to build scalable network applications. In the following "hello world" example, many connections can be handled concurrently. Upon each connection, the callback is fired, but if there is no work to be done, Node.js will sleep.//
  
-  : //Node.js is similar in design to, and influenced by, systems like Ruby's [[https://​github.com/​eventmachine/​eventmachine|Event Machine]] and Python'​s [[https://​twistedmatrix.com/​trac/​|Twisted.]] Node.js takes the event model a bit further. It presents an [[https://​nodejs.org/​en/​docs/​guides/​event-loop-timers-and-nexttick/​|event loop]] as a runtime construct instead of as a library. In other systems, there is always a blocking call to start the event-loop. Typically, behavior is defined through callbacks at the beginning of a script, and at the end a server is started through a blocking call like ''​EventMachine::​run()''​. In Node.js, there is no such start-the-event-loop call. Node.js simply enters the event loop after executing the input script. Node.js exits the event loop when there are no more callbacks to perform. This behavior is like browser JavaScript — the event loop is hidden from the user.//+  : //Node.js is similar in design to, and influenced by, systems like Ruby's [[https://​github.com/​eventmachine/​eventmachine|Event Machine]] and Python'​s [[https://​twistedmatrix.com/​trac/​|Twisted.]] Node.js takes the event model a bit further. It presents an [[https://​nodejs.org/​en/​docs/​guides/​event-loop-timers-and-nexttick/​|event loop]] as a runtime construct instead of as a library. In other systems, there is always a blocking call to start the event-loop. Typically, behavior is defined through callbacks at the beginning of a [[dido:​public:​ra:​xapend:​xapend.a_glossary:​s:​script|script]], and at the end a [[dido:​public:​ra:​xapend:​xapend.a_glossary:​s:​server|server]] is started through a blocking call like ''​EventMachine::​run()''​. In Node.js, there is no such start-the-event-loop call. Node.js simply enters the event loop after executing the input script. Node.js exits the event loop when there are no more callbacks to perform. This behavior is like browser JavaScript — the event loop is hidden from the user.//
  
-  : //HTTP is a first-class citizen in Node.js, designed with streaming and low latency in mind. This makes Node.js well suited for the foundation of a web library or framework.//​+  : //HTTP is a first-class citizen in Node.js, designed with streaming and low [[dido:​public:​ra:​xapend:​xapend.a_glossary:​l:​latency|latency]] ​in mind. This makes Node.js well suited for the foundation of a web library or framework.//​
  
-  : //Node.js being designed without threads doesn'​t mean you can't take advantage of multiple cores in your environment. Child processes can be spawned by using our ''​child_process.fork()''​(([[https://​nodejs.org/​api/​child_process.html#​child_process_child_process_fork_modulepath_args_options]])) API, and are designed to be easy to communicate with. Built upon that same interface is the ''​cluster''​(([[https://​nodejs.org/​api/​cluster.html]])) module, which allows you to share sockets between processes to enable load balancing over your cores.//+  : //Node.js being designed without threads doesn'​t mean you can't take advantage of multiple cores in your environment. Child processes can be spawned by using our ''​child_process.fork()''​(([[https://​nodejs.org/​api/​child_process.html#​child_process_child_process_fork_modulepath_args_options]])) ​[[dido:​public:​ra:​xapend:​xapend.a_glossary:​a:​api|API]], and are designed to be easy to communicate with. Built upon that same [[dido:​public:​ra:​xapend:​xapend.a_glossary:​i:​interface|interface]] ​is the ''​cluster''​(([[https://​nodejs.org/​api/​cluster.html]])) ​[[dido:​public:​ra:​xapend:​xapend.a_glossary:​m:​module|module]], which allows you to share sockets between processes to enable load balancing over your cores.//
dido/public/ra/xapend/xapend.b_stds/defact/linuxf/nodejs.1590179579.txt.gz · Last modified: 2020/05/22 16:32 by char