5 ms·
The arguments against jvm vs node I'm not buying. You don't automatically get scalability for free with node any more than any other platform. If anything the J
by azinman2 12y ago
The arguments against jvm vs node I'm not buying. You don't automatically get scalability for free with node any more than any other platform. If anything the JVM has been further optimized, particularly for servers, for years over v8. You also don't see ram helping node not because node is so much more efficient -- it's because the design of the v8 limits how much ram it can use.
I'm not sure even why it serves to try and make this comparison if you're talking about node running well on modern arm processors.
There are a number of arm hosts out there now, but none seem to have caught on big. Perhaps in a generation of processor or two someone like aws will start to offer it and there might be a plausible shift.
- pjc50 12y agoThe only real advantage to node is that it doesn't have all the "enterprise" baggage: the apps people build with it are a lot smaller and a lot more decoupled.
- vonmoltke 12y agoThat baggage is concentrated in one particular JVM language and is largely self-imposed. I write NLP software in Java without resorting to the AbstractFactoryFactory nonsense prevalent in the enterprise world.
- tracker1 12y agoIt happens in both Java and the .Net world.. every time I see "Enterprise" with a product description it makes me cringe... A lot of those abstractions only serve to scenarios; 1) Unit Testing and 2) service/storage portability. In most cases, neither are actually done. In the first case, I find actually writing unit tests in JS to be SO MUCH* better than with .Net or Java. In the latter, YAGNI prevails in my mind. IT's entirely possible to work with "enterprise" platforms without using the excessive design patterns and abstractions, most simply don't. Not to mention that async being an option with C# for YEARS but most code I've seen even running on newer runtimes doesn't use it at all. Node works very well for I/O constrained loads, unless you're risking running out of memory. I actually prefer the node way, and when you favor functional flows over OO design patterns, it gets to be really nice.
- vonmoltke 12y agoJava certainly has its warts, but I still think nearly all of what you describe is cultural rather than technical. Whether it's slavish adherence to GoF patterns, or obsession with code coverage metrics, or religious devotion to OO purity it's about the culture of the developer and the team. Java and C#, unfortunately, are the predominant choices of the developers and teams who share this culture. It gives the languages an unfairly bad rap, one which I agreed with until I started my current job.
- hinkley 12y agoYou can take Java out of the enterprise, but you can't take the Enterprise out of Java. What's sad is a bunch of us saw this coming the moment a J2EE spec first came out, and complained loudly that it was a trap, to no avail. Version 1 was written by grad students who had no idea what the 7 Fallacies were. Version 2 was so complicated only a few big companies could implement it. It was a sad trainwreck that was hard to watch. And then Spring was supposed to save us all, and now it's more complicated than any of the things it replaced. Which is why I do a lot of front-end code these days.
- jessaustin 12y agoVersion 1 was written by grad students who had no idea what the 7 Fallacies were. At the risk of appearing a grad student, what were those?
- hinkley 12y agohttp://en.wikipedia.org/wiki/Fallacies_of_distributed_computing http://en.wikipedia.org/wiki/Fallacies_of_distributed_comput... The interesting thing about the 7 fallacies is that we constantly find new ways to make the same mistakes. If we've been doing decentralized computing, someone thinks they can fix all of our problems by centralizing it. If we're in a centralized phase, someone thinks we can solve all our problems by decentralizing it. Exactly like the node and microservices people are doing right now. If you want a front row seat to the next pendulum swing, start learning everything you can about centralized software models now. You'll be sitting pretty in three years when the backswing starts. Maybe we'll try software transactional memory again.
- wlievens 12y agoSame here! It's perfectly possible to write quality Java code, without trying to cram everything into Spring.
- vonmoltke 12y agoOr treating the GoF book as a bible, which is my personal pet peeve.
- MichaelGG 12y agoEh the insanely small size of individual modules (6 lines, I've seen!) creating huge nested node_modules is it's own type of hell. Seems like some programmers love ceremony and boilerplate, no matter the language.
- woah 12y agoWhat's the boilerplate involved with nested node_modules? Theoretically, it's a waste of hard drive space, but that's rarely a concern.
- iends 12y agoAre you also loading multiple versions of the same library in memory, or multiple versions with only a small minor version difference? There are also legacy windows bugs that make long file names not work when you have a bunch of nested node_modules folders.
- MichaelGG 12y agoJust the tend to take a simple function, then ship it as a package. There's overhead in having a manifest, a folder, a separate code file, tests maybe, readme.md, etc. (Or in some cases, an meme-related animated gif that's referenced in the readme, that's larger than the rest of the package combined. Neato!) It's obviously dumb from a technical perspective to break out individual functions (or even 20-100 line code files) into separate modules. But I think some folks really enjoy it. Just like the Java or C# folks that put every single type definition into its own file. So you get some lame IHasFoo with a single bool property - so really 1 or 2 lines of actual code. Along with comments and a file header etc. Same for groups of enums, etc.
- TheAceOfHearts 12y agoWhy not make lots of simple single-purpose modules? My policy is that if I find myself doing something over three times and it's easily isolated and contained, I'll make it into a module. Then I can write a few tests for that code, I know it'll always work, and I won't have to think about it again. Even if it's something that's not hard, you don't want to stop focusing on your main task to implement some helper that you've already done before. There's also a really strong argument when it comes to browser support: supporting and testing lots of things on old browsers is hard. But if you break stuff out into small modules you can test it easily in isolation and know it works in all your test browsers.
- nickbauman 12y agoRight. How do node.js apps horizontally scale better?
- woah 12y agoIt forces the developer to scale horizontally
- azinman2 12y agoSo how does that meet the definition of better? By only creating one direction vs two?
- hinkley 12y agoIt's a clear sour grapes scenario. They can't have a solution to shared state anyway, because of the semantics of Javascript, so they go with the idea that shared state is an attractive hazard. Which it absolutely is, but the one isn't sufficient to justify the other. Erlang seems to have this right. You can have all the shared state you want but it can't cross component boundaries, and therefore you can multiprocess your little hearts out.