Develop incredibly fast, and scalable cross-platform backend apps Today!
Node.JS's async I/O already benefits from multithreading. The problem is that the main thread (single thread) is limited to one operation at a time and all operations handled by multiple threads has to wait in the queue. Node's initial design assumes that the main thread will be fast enough to handle the queue. This assumption fails under load where the number of response/request is much bigger than a single thread can handle alone.
Async I/O lets Node.JS to handle all IO events without blocking the main application thread.
But the success of async I/O is limited to main thread's consume rate.
If the main thread is busy, all operations handled by libUV has to wait until the main thread is available again.
The situation gets even more tricky when V8 requires a secondary garbage collection that results in the whole event queue waiting and eventually getting bigger and bigger.
JXcore handles IO events using multiple V8 instances. Each V8 instance is isolated from another hence any application
can benefit from multithreaded Node.JS without a code change. JXcore performs even better with applications requiring more CPU power.
Each JXcore V8 thread has its own memory and limitations. Even if one of the instances start collecting the secondary garbage, the others will be functioning and keep the process responsive.
JXcore's approach to stability is mostly based on structural changes on both libuv and node.JS core, including: IO, wrapper, and request queues, extra measurements and prevention of assert backed crashes all over the solution, and finally safe wrappers around global members. We believe these structural changes are very important for the stability with or without multithreading since async I/O strictly depends on the queues. JXcore uses an external memory for source codes and related resources.
JXcore comes with a built-in multithreading support that can be enabled on your existing Node.js applications without additional changes. JXcore's multithreading can be considered as a multiple instances of Node.JS running under the same process. We optimized the CPU and memory usage as well as other system resources in order to improve the overall performance of an application. JXcore multithreading may bring aprox. 30 to 50 percent solid performance advantage over Node.JS cluster module.
JXcore's internal monitoring feature tracks each thread separately and saves both process and threads from unexpected crashes. In case of a failure, JXcore gives you a chance to restart the running instance and save any information needed. JXcore's monitoring also works as a service to track running processes.
JXcore comes with a cross-platform, fast and highly scalable messaging API including all the features needed for applications requiring real time communication with the server. JXcore messaging is already passed the test of handling 50 billion random requests without an issue.
Using the built-in memory stores, you can move beyond the memory limitations of V8. JXcore provides both per thread and cross-thread memory stores beneficial for different application scenarios. Each JXcore thread has its own maximum V8 memory limitation.
JXcore has a SQLite database engine embedded and ready to use on all platforms with multithreaded JX instances. Our intention is to reduce the overhead of installing/compiling SQLite on target platforms and ensuring efficiency & stability under multithreaded usage.
JXcore comes with a built-in package manager that helps you to download the 3rd party modules and cary them to the offline environments easily. You can both use NPM and JXcore package manager without installing anything special.
We have already tested and compiled JXcore for many platforms. Instead compiling Node.JS and popular native modules per each platform, you can simply download the corresponding JXcore binary and deploy/run your Node.JS solution.