Nodejs for community site?

25 views
Skip to first unread message

Benj

unread,
Apr 16, 2016, 4:38:51 PM4/16/16
to nodejs
Hi i like node and use it for async io and i'm thinking to expand its usage to more traditional web site such as forum and other social things.

Potential problem is that due to its single thread per process... Any cpu bound task is blocking.
I would delegate heavier tasks to a queue.... But i don't want to delegate ALL the little cpu bound tasks to a queue. This would complexifiy code too much.

So this is a question for those node devs with some experience using node for sites that are not pure io bound.

Can i keep node validating for example form fields? It goes over all submitted user fields server side and check against validation fields. Is this even too much cpu bound for a medium traffic site? What is your experience?
Any example site?

Matt

unread,
Apr 16, 2016, 7:50:25 PM4/16/16
to nod...@googlegroups.com
This kind of CPU use is trivial, and is zero issue for web apps. You can loop through 10k entries in a form field in microseconds.

The things you might need to farm out to a queue are more traditionally CPU heavy computations, like large matrix calculations.

A typical example in our (ideal.com) application is matching candidates to jobs. It's a large scale CPU calculation across hundreds of thousands of database entries. We do it using a queue system because it takes a long time. But validating form entries isn't something you'd ever put in a queue.


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/94360816-0c98-4409-8317-6c3be0e7517a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages