node.js - G-WAN, NodeJS, and Streaming -


does g-wan spin new nodejs instance every user request? (i.e. if you're using javascript servlet) instance, if 100 users request action @ same time that's handled specific script.

my primary question goes scripting g-wan non-c/c++ languages... can sendfile used javascript servlet? want stream large files clients won't in www folder, rather specified file path on server. possible? if not, can nodejs's streaming used in g-wan?

does g-wan spin new nodejs instance every user request?

unlike other languages (c/c++, objective-c/c++, c#, ph7, java, , scala), javascript not loaded module , rather executed cgi process, zend php, or perl.

so, yes, node.js scale poorly unless use caching (either g-wan's or yours).

can sendfile used javascript servlet?

yes g-wan having own asynchronous machinery it's more efficient "the g-wan way" (as suggested ken).

if insist using sendfile() javascript keep in mind have use in non-blocking mode , manage asynchronous events (synchronous calls blocking current g-wan worker thread).

can stream files clients won't in www folder?

yes, can use system symlink map foreign folder /www resource - or can stream contents within g-wan handler or servlet.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -