Node.js is the software that allows you to run Javascript to create powerful server-side applications by using Google's V8 Javascript Engine. As a Node developer myself, I have always felt frustrated by seeing that Joyent, the company behind Node.s, was extremely conservative in terms of upgrading node to use the latest V8 version; the project was also struggling to get developers to actually contribute to code. This is why Fedor Indutny did the unthinkable: forked node and created IO.js. Today, the two projects are uniting possibly offering developers the best of both worlds
(Score: 2) by fleg on Monday June 22 2015, @02:32AM
interesting, thanks.
i'm now wondering if node.js would be a good fit for something i may have to do.
i have a java command line which takes some images (3 or 4), does some processing on the images (takes upto 5minutes) and spits out a result image. at some point in the future we may want to put that command line behind/in a server and have people send the images they want and receive the result back.
i had been thinking i would have to go the route of ejbs and some sort of app server like say jboss (which i have used before), but it feels like overkill, so i'd been considering just writing a simple server which just sits on a socket waiting for requests. but now i'm thinking maybe node.js is worth investigating.
(Score: 2) by deimios on Monday June 22 2015, @04:05AM
If your image processing algorithm is non-blocking or can be rewritten to be non-blocking then go for it.
Just beware: node.js runs in a single thread so if you do any synchronous heavy processing, it will hang the main thread's event loop which will pretty much hang the whole stack. This means: no pages served, no logs written until the processing is done.
Take a look here: https://github.com/glenjamin/node-fib/blob/master/app.js [github.com] to see an example of node.js style heavy processing. It calculates the Fibonacci tree in a non-blocking way. (not my code)
(Score: 2) by fleg on Monday June 22 2015, @05:08AM
understood, thanks.