Concurrent, non-blocking, JIT, VM for running JavaScript as a scripting language on a server. The non-blocking event based IO on one thread drastically reduces memory overhead which increases speed allowing massive throughput. A simple "hello world" web server on NodeJS has been nearly 6 times faster than Apache on the same hardware... and that's comparing a script, with compiled code.
Google Coder Web Development uses a Raspberry Pi as the web server, and development environment.
Also: On the Microsoft IIS platform: Javascript in ASP, Jscript in ASP is faster than VBScript
See also:
npm install -g autocannon npm install -g clinicAutocannon generates sample requests. e.g. autocannon -c100 url will generate 100 concurrent random requests. Clinic clinic doctor --on-port='autocannon -c100 url' -- node index.js opens an HTML file with all sorts of profile data. clinic flame --on-port='autocannon -c100 url' -- node index.js generates a flame graph, which you can drill down into in order to find the slow parts of a script.+
Note that this does NOT mean NodeJS can't take advantage of multiple processors or multi-threaded work:
Use cluster when you want to parallelize the SAME flow of execution and server listening.
http://nodejs.org/api/cluster.htmlUse child_process when you want DIFFERENT flows of execution working together
http://nodejs.org/api/child_process.html
and take advantage of built in Inter-Process Communication to pass objects between the processes.
http://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options
.
file: /Techref/language/java/script/server.htm, 5KB, , updated: 2019/4/1 10:30, local time: 2024/11/19 09:30,
18.218.75.222:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/techref/language/java/script/server.htm"> JavaScript as a Web Server Language</A> |
Did you find what you needed? |