J
J
JIakki2015-03-10 16:37:27
JavaScript
JIakki, 2015-03-10 16:37:27

What kind of projects is node js used for?

Is it ok to write regular sites in nodejs?
Is it reasonable to write an online store in node ?
For what kind of projects is nodejs usually used?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bromzh, 2015-03-10
@JIakki

1) No. A normal site is one short connection per request to the server. The connection lifetime is limited to one request (a request came - the connection was created, a response was given - it died). There is no gain over conventional synchronous frameworks. And since the node is single-threaded, it may happen that the connection in which the error popped up will kill the entire application.
2) No. Take any developed MVC framework in any language, it's easier that way.
3) For those who need asynchrony: hook up a websocket chat for a finished site, work with message queues (to receive them in non-blocking mode), send notifications, write to the database without blocking, etc. Those. it is usually used where it is necessary to hold a lot at the same timeopen connections, each of which does not require a lot of CPU time, but can slow down due to IO.

T
tef, 2015-03-11
@tef

Nod was invented for those who are addicted to learning another programming language. Now you can write in Javascript and on the server! Hallelujah!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question