Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming

Ask Slashdot: Node.js vs. JEE/C/C++/.NET In the Enterprise? 304

theshowmecanuck writes "I'm working at a small- to medium-sized company that creates software for mobile devices, but came from a 'large enterprise' world before. I see node.js being used increasingly in smaller companies (including ours) or in web/mobile related software. Meanwhile we see languages like Java/JEE, C/C++, and .NET continue to be used for medium-to-large enterprise corporate software. Compared to the status quo in the enterprise (JEE/C/C++/.NET ... and yes, maybe even COBOL) maybe Slashdotters can chime in on how they see Node.js in this role. I'm thinking of things like complexity of business logic (dependencies, workflows, linear processes, etc), transaction support (for processes in general and database support), messaging services, etc. Also, what is the state of Node.js in terms of paradigms like application containers, where much of the 'plumbing' is already set up for you (one of the main benefits of JEE application containers)? But there is also the question of maintainability, deployment, and ongoing operations. What say you, Slashdot?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Node.js vs. JEE/C/C++/.NET In the Enterprise?

Comments Filter:
  • by gl4ss ( 559668 ) on Wednesday July 10, 2013 @05:37AM (#44235573) Homepage Journal

    node.js is strong when you don't actually necessarily want nginx or apache sitting in between. for web services and alike it's nice. for serving the actual site you might want to go with nginx.. as for serving, it doesn't exactly do all that much so there isn't that much to configure or iron out.

  • by effigiem ( 2558315 ) on Wednesday July 10, 2013 @05:39AM (#44235577)
    Nodejs is not trying to emulate PHP, because its intended usage is completely different - if you want to provide REST services for the frontend written in JS, why would you need to bother with passing stuff through apache? Not to mention that you can pass node through nginx. And in what world are the open source servers 'commercial http servers'?
  • Re:I think... (Score:5, Informative)

    by serviscope_minor ( 664417 ) on Wednesday July 10, 2013 @06:00AM (#44235653) Journal

    Well, obviously the right answer for the OP depends on precisely what he wants to do. That notwithstanding...

    C++ is what it is. It's fast, mature, complicated, and flexible.

    Going for the less mature end of things, C++11 is now pretty much done (GCC has almost full support, LLVM is close and amazingly even VisualStudio has most of the goodies).

    It also ain't you father's C++.

    It has taken great strides in the areas such as making the safe thing easier and quicker to write and generally less hassle and less faff all around. Additionally, the quality of implementation of things like the standard libraries has improved beyond measure. In the areas of security, other than making the secure things easier to write, between address space randomization, getting GCC to instrument pointer accesses and the NX bit, the space for exploitable (but not obviously DOSable) holes has shrunk considerably.

    C++ has changed immeasurably immeasurable since what was practical in 2003. That's not to say of course that C++ won't let you do bad things. Of course it will. But they're not all the easiest way of doing things now :)

    Still, like any material (I have seen an excellent argument that languages are more like materials than tools) one has to choose an appropriate one for a particular job. Given that I can't really tell what the OP is trying to do, it would be hard for me to commit to a given language...

    I'm not going to claim C++ is simple. That would be silly, but a rather fun fact is that the despite Java being promoted as simpler than C++ for so many years, the latest Java language spec (excluding libraries) is shorter than the latest C++ spec (excluding libraries).

  • by angel'o'sphere ( 80593 ) <angelo,schneider&oomentor,de> on Wednesday July 10, 2013 @06:44AM (#44235857) Journal

    I reply to you, not the followups that are similar brain dead.

    What is node.js? It is a server software you can download.

    Then you have a bash script and some config files to start it. And perhaps a book from O'Reeilly.

    When you write your code against it, you figure if it is "good enough" for you.
    When you deploy it in your enterprise you very likely consider to stick stable to the current version/release for YEARS.

    So, meantime node.js is no longer maintained. WHO CARES?

    You stick to your old version, and you are good. If you need new features that belong into node.js and not into your software you hire one for it. Or you write it yourself.

    BTW: do you really believe if it is no longer maintained it won't become an Apache project?

    What about all the other software out there that once was open source and was used by enterprises and is no longer maintained? I never heared about a company going bankrupt because of this.

  • by sproketboy ( 608031 ) on Wednesday July 10, 2013 @06:53AM (#44235897)

    That's much less likely to happen with Java apps. skovnymfe's point (since it flew way over your head) was that node.js is not backed by a big company so if you're doing important development you probably would want to use something safer.

  • by Capt.Albatross ( 1301561 ) on Wednesday July 10, 2013 @07:16AM (#44235983)

    What's the V8 Javascript engine written in?

    'nuff said.

    Code it in C or get out of the way and let a real programmer finish the project.

    What does the machine actually execute?

    'nuff said.

  • by stikves ( 127823 ) on Wednesday July 10, 2013 @07:19AM (#44235999) Homepage

    The paper is at the following link: http://www-cs.canisius.edu/~hertzm/gcmalloc-oopsla-2005.pdf [canisius.edu]

    I ran into it while reading the discussion at http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ [sealedabstract.com]

  • by Required Snark ( 1702878 ) on Wednesday July 10, 2013 @08:24AM (#44236347)
    The Google V8 JavaScript engine used in Node has a JIT compiler that runs native machine code.

    http://en.wikipedia.org/wiki/V8_(JavaScript_engine) [wikipedia.org]

    V8 compiles JavaScript to native machine code (IA-32, x86-64, ARM, or MIPS CPUs) before executing it, instead of more traditional techniques such as executing bytecode or interpreting it. The compiled code is additionally optimized (and re-optimized) dynamically at runtime, based on heuristics of the code's execution profile. Optimization techniques used include inlining, elision of expensive runtime properties, and inline caching, among many others.

    I know that facts are not fashionable on Slashdot, but please make the minimum effort for a reality check before you mindlessly repeat whatever drivel you've been listening too. I don't know about the Python requirements, but given your misinformation about V8 you are most likely wrong about that as well.

  • by mystikkman ( 1487801 ) on Wednesday July 10, 2013 @09:14AM (#44237011)

    > The only concern is that for C#, you'll most likely want to stick to Microsoft ecosystem (Visual Studio is a great development environment, but you'll have to deploy to Asure, whereas you have more choices with Java, including Amazon and Google Linux clouds).

    Err what? You can deploy to hundreds of hosting providers... including AWS.

    http://aws.amazon.com/windows/ [amazon.com]

  • by Xest ( 935314 ) on Wednesday July 10, 2013 @09:17AM (#44237049)

    As the AC said I'm talking about code scalability - the ability for a codebase to grow without becoming unmanageable. This is difficult to achieve with Javascript because it's prototype approach and lack of decent support for things like namespaces, libraries and so forth coupled with the inherently greater difficulty of capturing many classes of bugs in a dynamic language and Javascript in particular means it's a nightmare getting a Javascript codebase to scale beyond a point when compared to something like C#, Java, or C++.

  • by ttucker ( 2884057 ) on Wednesday July 10, 2013 @11:23AM (#44238953)
    The JIT compiler frequently optimizes code to run faster than than C++ because it knows statistical things at run-time that a static compiler could never know.
  • by DickBreath ( 207180 ) on Wednesday July 10, 2013 @01:55PM (#44241431) Homepage
    > Java and .Net are the last places to look for performance.

    You obviously do not know about Java.

    Since others have addressed other points, let me touch some not yet mentioned.

    There are production servers running Java workloads with heap sizes in the tens or even hundreds of Gigabytes of memory, with 10 millisecond GC pause times. I mention that because someone always brings up GC. But JavaScript (node.js) has GC, so instead I'll ask whether you think node.js garbage collector can do that?

    The JVM (java virtual machine) is one of the most amazing pieces of software engineering on the entire planet. It has some of the most sophisticated code ever written. It's JIT is an amazing dynamic compiler whose source language is the JVM binary code emitted by the Java compiler.

    Now, imagine if your node.js could do this.

    The VM notices that a particular function (A) is getting more than it's fair share of CPU, so the JIT compiles it to native code. During compilation, if function A calls function B many times, such as in a loop, function A may inline function B.

    Now, on the JVM you can dynamically replace and reload binary classfiles in a running system. So suppose the binary file containing function B is reloaded. But now the compiled version of function A has inlined an out of date function B. No problem, the JVM ditches the compiled version of function A, and very shortly, based on real time continuous performance monitoring and statistics, it will notice that function A deserves to be compiled to native code, and repeat the whole process.

    The JVM is perhaps one the best runtimes available for many different programming languages. It provides a huge number of highly evolved services right out of the box. GC. Binary portability. Native compilation at runtime, thus making the JVM bytecode portable. Choice of GC algorithms. Choice of JVM vendors, including ones with real commercial support for your Billion dollar business application. Remote monitoring tools and consoles.

    Pick the right tool for the right job.

And it should be the law: If you use the word `paradigm' without knowing what the dictionary says it means, you go to jail. No exceptions. -- David Jones

Working...