Might be interesting to compare the performance here vs https://github.com/amd/furious.js
On Saturday, January 17, 2015 at 7:02:21 PM UTC-8, Test This wrote: > > This is awesome. That would provide an easy way to scale a web-application > at least to some extent by outsourcing the CPU intensive calculation out of > Node. > > Currently, Julia takes a long time to start up. Does the Julia process > start when "include myjuliafile.jl" is called? If so, can one call this > line somewhere when the server starts. > Otherwise, the start up time will increase the wait for the web clients. > > > > > > On Saturday, January 17, 2015 at 12:32:36 PM UTC-5, Jeff Waller wrote: >> >> >> >> On Saturday, January 17, 2015 at 10:53:36 AM UTC-5, Test This wrote: >>> >>> Some basic questions: >>> >>> We know that Node is blocking on cpu intensive tasks. If I use the async >>> option, are the calculations run separately. That is does it allow the mode >>> process to continue with its event loop. >> >> >> The answer is yes, and the reason is though node is singly threaded, >> native modules can be multi-threaded, >> the main thread accepts work and then queues it along with the function >> to return the result to and returns >> immediately meanwhile a couple of other threads dequeue the work evaluate >> and then enqueue the result and >> finally the main thread is signaled using uv_async_send. >> >> >>> If the answer is yes, what happens when julia is busy with a previous >>> calculation and a new one is passed to it? >>> >> >> Currently there's good news and bad news. The good news is that >> node-julia async calls will not block and so >> node will not block, but the bad news is the the evaluator running in a >> separate thread waits for the result before >> moving on to the next thing. >> >> >>> >>> Thanks so much for creating this. >> >> >> Oh man, you're welcome, most definitely. >> >> >