Jonathan, I'll try to provide a more helpful answer for you and others
who are wondering along these lines.
Node isn't just about async connections. All i/o operations in node
should be asynchronous (obviously with exceptions where necessary).
The benefit of Node as a platform is that it exposes apis that
actually make it difficult to do sync i/o in your code. It would be
nice to take advantage of the mountains of useful Java libraries out
there. But as Bradley points out, most of them have blocking i/o
calls and thus aren't suitable for the environment Ryan has created
with node.
Also, node is built for programming with javascript. It's not only a
great language once you get away from the warts of the browser
environment, it also has first class functions and a familiar callback
paradigm that work great for async programming. With that in mind,
node is built on Google's v8 javascript engine because it's the
fastest, most advanced js engine available right now. I love the
seamless Java integration that Rhino offers, but IMO those heavy apis
don't mesh well with the javascript programming style. In contrast,
the v8 api allows wrapping fast C libraries in a sensible way and
exposing the with native javascript interfaces. That's pretty
awesome.
At the risk of irritating the others on this list, I think it would be
awesome if these ideas were ported *sensibly* to another platform.
Rhino is a great js engine despite being slower than v8 (it's still
faster than JRuby and Jython I believe). And Jetty does have nice
facilities for async network i/o. But other pieces still need to be
filled in. And ideally it would also provide some api and paradigm
for using existing sync java libraries in an async fashion (see Node
addons, libeio, etc).
With all of that being said, check out RingoJS. I've heard good things
about it.
http://ringojs.org/wiki/
:Marco
On Jul 3, 10:54 am, Marak Squires <
marak.squi...@gmail.com> wrote:
> I like apples, why do you guys like oranges?
>
> On Sat, Jul 3, 2010 at 10:50 AM, Bradley Meck <
bradley.m...@gmail.com>wrote:
>
>
>
> > In a large part the advantages to using Jetty are against the concepts
> > of Asynchronous behavior. Most Java libraries are blocking or
> > threaded. The ability to run on app engine is a plus however. Java and
> > Javascript are also vastly different in rapid prototyping an
> > application (they aren't even related).
>
> > On Jul 3, 8:38 am, "wewe.tom" <
cook...@gmail.com> wrote:
> > > oh 汉字
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nodejs" group.
> > To post to this group, send email to
nod...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
nodejs+un...@googlegroups.com<
nodejs%2Bunsu...@googlegroups.com>
> > .