Earlier quoted context omitted.
This. The biggest difference is in the two cultures: blocking is anathema to the Node.js community - they will literally reject libraries or code that blocks because it destroys the entire model; the JVM community does not value non-blocking code - most of the core (JDBC, Networking in general, File system operations) is all written in a blocking style - the JVM community accepts this with the implicit assumption tha…
What are you talking about? libevent invented everything Node.js uses and Python's Twisted had and has everything Node.js could dream of. Node.js is just a reinvention of old technologies in Javascript. Edit: Removed flame about Javascript because I don't want to have this debate again.
Vert.x – JVM Polyglot Alternative to Node.js
31–40 of 83 posts
Re: Vert.x – JVM Polyglot Alternative to Node.js
#32> InfoQ: What about running a real-time app on the JVM vs. on Node.js, with respect to debugging, monitoring and operations?
> Answer: I'd say monitoring and operations are really the concern of the environment in which you deploy vert.x than vert.x itself. e.g. if you deployed vert.x in a cloud, the cloud provider would probably provide monitoring for you.
This makes it sound like a toy. How can I deploy something to production when I have no way of seeing what it's doing? How is a cloud provider supposed to provide debugging/introspection for JavaScript running on the JVM (by means of a brand new facility)?
Re: Vert.x – JVM Polyglot Alternative to Node.js
#33Earlier quoted context omitted.
Java Executor s combined with Guava's ListenableFuture s easily turn any blocking operation to an asynchronous one. Netty's entire model is asynchronous, and Java 7 now has AsynchronousChannel s for IO which, I assume, Netty will make use of. All in all, the JVM has a much more solid and performant foundation than anything Node can provide. The whole difference will come down to a programming style preference. I am n…
There is no async MySDQL JDBC driver. If you encapsulate it in an async layer, you need to keep a thread for the connection.
Re: Vert.x – JVM Polyglot Alternative to Node.js
#34Earlier quoted context omitted.
it ignores those, for good reason
which is?
Also, the servlet API is crazy, partly because of all its baggage. There seems to be a lot of exploration around what the right API is right now, but its pretty clear the world wants something new.
Re: Vert.x – JVM Polyglot Alternative to Node.js
#35Earlier quoted context omitted.
Java Executor s combined with Guava's ListenableFuture s easily turn any blocking operation to an asynchronous one. Netty's entire model is asynchronous, and Java 7 now has AsynchronousChannel s for IO which, I assume, Netty will make use of. All in all, the JVM has a much more solid and performant foundation than anything Node can provide. The whole difference will come down to a programming style preference. I am n…
There is no async MySDQL JDBC driver. If you encapsulate it in an async layer, you need to keep a thread for the connection.
Re: Vert.x – JVM Polyglot Alternative to Node.js
#36Finagle works fine. Thank you. Love it. But it does not take off. Why? What all the JVM Node.js clones are missing and what Node.js sets apart are async libraries. There is no async (MySQL) JDBC driver for starters. If your IO drivers are not async, your async container is not very useful in real life.
Would you call Node.js's MySQL drivers "production quality"?
Re: Vert.x – JVM Polyglot Alternative to Node.js
#37Earlier quoted context omitted.
That's right. If you use the sendFile() method and you're on an OS that supports it, then the kernel will do the copying directly from file to socket for you. You can also serve files in the more conventional "node.js-style" way (i.e. pump the buffers manually from file to socket) if you like. It's just slower than getting the kernel to do the work for you.
But you have to dedicate a thread to sendFile() (by nature).
Re: Vert.x – JVM Polyglot Alternative to Node.js
#38Earlier quoted context omitted.
which is?
Every concurrent request gets its own thread, whereas this seems to be one thread per core. Also, the servlet API is crazy, partly because of all its baggage. There seems to be a lot of exploration around what the right API is right now, but its pretty clear the world wants something new.
No. Servlet containers use a thread pool (that grows and shrinks dynamically).
Re: Vert.x – JVM Polyglot Alternative to Node.js
#39Finagle works fine. Thank you. Love it. But it does not take off. Why? What all the JVM Node.js clones are missing and what Node.js sets apart are async libraries. There is no async (MySQL) JDBC driver for starters. If your IO drivers are not async, your async container is not very useful in real life.
This. The biggest difference is in the two cultures: blocking is anathema to the Node.js community - they will literally reject libraries or code that blocks because it destroys the entire model; the JVM community does not value non-blocking code - most of the core (JDBC, Networking in general, File system operations) is all written in a blocking style - the JVM community accepts this with the implicit assumption tha…
Really? So they reject any kind of library that does anything except call a callback? Because everything else, from calculating 2+2 to creating a template blocks. And it doesn't matter when it happens, when it happens it blocks.
Re: Vert.x – JVM Polyglot Alternative to Node.js
#40Earlier quoted context omitted.
Java Executor s combined with Guava's ListenableFuture s easily turn any blocking operation to an asynchronous one. Netty's entire model is asynchronous, and Java 7 now has AsynchronousChannel s for IO which, I assume, Netty will make use of. All in all, the JVM has a much more solid and performant foundation than anything Node can provide. The whole difference will come down to a programming style preference. I am n…
There is no async MySDQL JDBC driver. If you encapsulate it in an async layer, you need to keep a thread for the connection.