2

I apologize if this is not the correct place to post this question or if it is similar to questions asked before.

I am doing some research into how to put a web interface on a C++ project I want to start. I came across Node.js and checked out a few of the addons using the V8 engine.

My idea is to route business logic (DB(sqlite), CRM, CMS, etc) to the C++ backend and handle stuff like websocket connections, form validations, etc. within Node.

JXcore has very appealing specs on paper so I am very interested in trying it out, but I am unsure about how my addon will be affected seeing that JXcore has a future objective to move from V8 to LLVM. Hopefully there will be options available to bridge JS with C++.

So, based on the above, I have the following options available:

  1. do everything in Node (no C++ addon)
  2. use JXcore or Node and c++ addon without multithreading
  3. use JXcore or Node and implement multithreading in my C++ addon using libuv for instance
  4. do everything in JXcore (no C++ addon)

Which one of the options above would be the better route to go with in regards to performance, in your opinion? I would also appreciate any alternative options to the above.

1 Answer 1

1

I don't think you will need C++ addons for performance (especially in your case) if you pick JXcore path. First of all, V8 is very fast and using multithreading you already have the whole CPU capacity behind. The second and most important part is, when JXcore updates V8 to LLVM, your Javascript sources will be compiled into native code.

As mentioned from here, they already embedded (beta2 and later) some of the popular c++ addons (multithreaded) and released a wrapper header file in order to develop multithreading friendly c++ addons easily.

More information on JXcore

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer, this was exactly what I was looking for. I also spoke to Oguz Bastemur at Nubisa Inc a few days ago and he told me the exact same thing. The document also cleared another concern that I had regarding static/global variables so thanks for posting the link :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.