On Tue, Jul 20, 2010 at 10:38 PM, Victor S <victor.s...@gmail.com> wrote:

> Thank you all for the input, it has made me understand some new
> things.
>
> I find node.js push for NIO as the de-facto mode of existence for web
> apps interesting, and I was trying to have my cake and eat it too.
> JS programming just doesn't look all that appealing.
>
> - V
>

Node.js's push for NIO is because it's single threaded (because JavaScript
is single threaded). If everything wasn't NIO, Node.js would perform
terribly. In fact it's not recommended for users of Node.js to do anything
CPU heavy inside a Node.js process as that will destroy overall server perf.
You have to offload that work to a WebWorker (and setup some callbacks). If
you're trying to build a Node.js app that takes advantage of multiple cores
you need to create as many Node.js processes as you have cores.
Communicating across processes for even something as simple as a counter
will incur more callback complexity as well as overhead (or you can avoid
IPC and use an in-memory store like MongoDB, and just pay the overhead of
communicating to the DB).

So while I find Node.js intriguing for simple projects, I'm looking forward
to seeing how that community builds around these issues in larger software
endeavors.

Clojure, because of the JVM, doesn't tie your hands this way. If you want to
do everything evented go ahead. Do everything with threads? Go ahead. Want
to mix the two designs together like Aleph? Sure. All while not losing the
elegant brevity of a Node.js app.

I like JavaScript, and I like Node.js. But I think Clojure opens up some new
avenues to explore when building web applications.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to