3
votes

I have an existing eCommerce web application in JSF 1.2 framework . We wish to use node.js technology's benefits in our existing application .

Our Focus : Keep View[html ] part in JSF framwork and All I/O [Database-MySql] operation will be managed by node.js .

We can do CRUD operation using Node.js . But how do we send/receive data between java-managed-Bean and node.js ?

Is this architecture useful ? or any other better options/suggestion ? .Or do we need to completely switch to Node.js technology stack ..

With regards,
Sijo

1
Which benefits of node.js do you want to use? I am sure you can find java solutions for all features of node.js. - Alexei Kaigorodov
Correct me if am wrong. JSF in JBOSS use one thread per request . So doing CRUD in NODE.js re-leave thread from I/O and this leads to each thread to become faster . Another required feature : provide some realtime update of stocks and price .I request your expert opinion ? - Sijo Thomas
First, eavaluate how many simultaneous requsts you want to process. Take into account database throughput. If the result is >1000 requests per second (do you really have such a performant database?), then use async network library like Netty, otherwise a thread per request is ok. - Alexei Kaigorodov

1 Answers

2
votes

I don't think this is a good idea. If you absolutely want to use node.js, you should implement your presentation layer with node and keep the crud operations in java and communicate via json. node.js is only faster if you have small operations per callback, e.g. return cached html, json etc. If you have a lot of crud operations node.js is not particularly well suited for the task. You could also take a look at the play framework http://www.playframework.com/. It is a high performance asynchronous java / scala framework that may fit your needs.