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 11:30, local time: 2024/10/10 22:06,
18.207.255.67:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©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://www.piclist.com/techref/language/java/script/server.htm"> JavaScript as a Web Server Language</A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.