Slashdot Mirror


Another J2EE vs .NET Performance Comparison

Starting yesterday, we received a bunch of story submissions about a performance comparison between J2EE and .Net. It didn't seem all that exciting, and we sort of ignored the story. But as usual, it appears that some people take issue with the methodology and conclusions.

196 of 480 comments (clear)

  1. Some of us by Anonymous Coward · · Score: 3, Insightful

    Some of us are not in a position to dictate policy. Love Linux or not, some of us will have to use .Net or look for another job.

    Not a good option during these bad economic times.

    1. Re:Some of us by Anonymous Coward · · Score: 2, Insightful
      Astroturfing.

      Ever wonder why MS is putting .NET ads on Slashdot?

      Well, posts like these are the other shoe dropping.

      Rest assured, many many many companies are evaluating MS technologies vs. OSS technologies for a number of good reasons; Security, reliability, scaleability, non lock-in, no subscription plans, etc.

      For example, see the story posted on Slashdot just yesterday where the US DoD is advocating the use of FOSS (Free & Open Source Software). Read the report and the recommendations.

      What's remarkable about this report is that it's written by Mitre and DISA (Defense Information Systems Administration), both very conservative groups when it comes to new technologies.

      I'm posting anonymously because my employer has close ties with MS and after what happened to Bruce Perens for speaking his mind...

    2. Re:Some of us by Twirlip+of+the+Mists · · Score: 2

      Did you read either of the articles? Nobody lied. At worst, some of the stuff TMC said is open for interpretation and debate. There's no clear evidence that anybody deliberately misrepresented the facts.

      Hell, the TMC web site even says (paraphrasing here) that this doesn't mean J2EE is slower than .NET. It just means J2EE was slower than .NET in this case.

      Don't jump to conclusions.

      --

      I write in my journal
    3. Re:Some of us by Lumpy · · Score: 2, Insightful

      but if you are in a position to influence the decisions you should have already been doing so.

      i am a lowly technician/specalist that cover's only 5 offices.. Yes I am able to influence infrastructure decisions because of two main factors...

      1- I learned Suit speak.. talk in numbers, money... grubby ol' money is what they want to hear... that's it.. show them savings, increased performance and increased revinue...

      2- if you open your mouth then take ownership of it... If something blows up, stand up and say "My fault! it was my decision!" Many of you think "Ohhh I'll get fired instantly!!!" and that is only true if your boss is a complete moron and idiot. any employee that takes ownership of their work and will admit mistakes needs to be rewarded... I have been, with 2 promotions because of it. (Failures promoted me!)

      i have no problem swaying corperate policy.. just start working on your sales skills as that is all it really is... sales.... can you outsell the microfot rep? I sure can.

      --
      Do not look at laser with remaining good eye.
    4. Re:Some of us by Twirlip+of+the+Mists · · Score: 2, Informative

      Yes, the article does clearly state that TMC should be called to task... but then it fails to give any good reason for it. Every criticism of TMC's methodology is a debatable one. They point out, for example, that the LOC comparison is unfair, but then they speak only in vague terms about "excessive exception handling" to explain why.

      Why don't you read the article, and then why don't you fuck off.

      --

      I write in my journal
    5. Re:Some of us by MAXOMENOS · · Score: 2

      Speaking as a Linux lover, I don't mind using .NET. In fact, I would encourage more people to write C# code, and to test it against Mono. Then report any bugs and/or contribute new classes.

    6. Re:Some of us by Jeppe+Salvesen · · Score: 2

      I'll find my new job in a governmnent position where I can use technology I care about and will be allowed to contribute to for not-so-great pay when I get fired for using Linux.

      <sidetrack>All platforms have limitations. It's just all about identifying and correcting those. That also goes for the current economic platform.</sidetrack>

      --

      Stop the brainwash

    7. Re:Some of us by Laura_007 · · Score: 3, Interesting

      Absolutely ridiculous. Note the fact that Slashdot ignored submissions up until the point that someone rebutted it, and then suddenly it had validity. Everytime you take a single study as proving something, without doing your own research, you risk falling for advertising (not "false advertising", but advertising. Car A might be a piece of junk, while Car B is superb, but if Car A has 20HP more you can be damn sure they'll mention that in their ads).

      As Microsoft stated with the first one: Before all of the anti-Microsoftarians (of which Slashdot offer a tremendous number) slam this, GO AHEAD AND MAKE A SUPER OPTIMIZED PET SHOP APPLICATION ON THE PLATFORM OF YOUR CHOICE. The Java community, in this case, seems amazingly capable of criticizing this review, while failing to offer alternative proof.

      --
      I am looking to accumulate friends. Please click on the circle and add me as a friend. Thanks!
    8. Re:Some of us by malfunct · · Score: 3, Informative

      You can use a simple text editor to edit .NET software and compile with a command line compiler (distributed with the .NET SDK).

      --

      "You can now flame me, I am full of love,"

    9. Re:Some of us by gmack · · Score: 3, Insightful

      That's the whole problem.. the pet shop example app was never designed to be efficiant or even used.

      It's an *example* app that demonstrats how to implement certain java features. They did not allow or ask anyone to make a new app they did it
      themselves then asked MS to make a competing one.

      Even if there exists a "UPER OPTIMIZED PET SHOP APPLICATION" it's doubtfull they would have used it and optimising the current app would kill it's usefullness as a teaching aid.

      The whole comparison is completely bogus and it reminds me of someone comparing a ferrari with one of those trainer station wagons with random extra wiring the Canadian millitary used to use to train their mechanics.

    10. Re:Some of us by Laura_007 · · Score: 2, Interesting

      It's an *example* app that demonstrats how to implement certain java features. They did not allow or ask anyone to make a new app they did it themselves then asked MS to make a competing one.

      Sun has promoted the PetStore application as an example of Java best practices, and how to implement a Java ecommerce site. Whether they are really trying to make it so burdensome that extra Sun servers are required is beyond the point: It's an example of how Sun recommends that an ecommerce site be implemented in Java. It seems entirely relevant to me.

      Even if there exists a "UPER OPTIMIZED PET SHOP APPLICATION" it's doubtfull they would have used it and optimising the current app would kill it's usefullness as a teaching aid.

      You have got to be kidding.... If Sun, who hold their own responsibility for putting their platform in the best light (the whole BS on here as if Microsoft should go to great lengths to polish Sun's code is just hilarious), could make a optimized PetStore application, you don't think they would have? They would have it slathered all over the net, and every anti-Microsoftarian would be screaming it from the highest mountaintops (indeed, I'd wager that many of the same busily tried to make just such an example after the last hoopla...strange that we never heard from them). Mind you of course they'd put haughty disclaimers about how they'd whored down the design to Microsoft's standard, but they'd readily do it.

      --
      I am looking to accumulate friends. Please click on the circle and add me as a friend. Thanks!
    11. Re:Some of us by chown · · Score: 2, Insightful


      I suppose there's always the possibility of some people actually liking .Net ;-)



      As someone who's used .NET a bit, but not a whole lot, I have to say I'm not terribly impressed. Had it come out say... 6-7 years ago (in a somewhat stripped-down form, granted), then maybe. I'd have the anti-MS bias going, but at least it would have been semi-innovative.



      All it is is Java, except they're calling it "Visual Basic .NET", "Visual C++ .NET", and "Visual C# .NET". Oh, and while there's no technical basis for me disliking it "Visual C#" gets mad demerit points on name alone :)



      What I will give it, is that from a programmer's point of view, I think it's probably better than VS6, all things considered. There's a lot of new APIs to learn, most of which are at least a little more intuitive than the older ones (but that's not saying much).



      I still find the documentation to be abysmal. There certainly is a lot of it, but have you ever tried to FIND anything on MSDN? And the class reference pages, while being not terribly difficult to find, occaisionally neglect things such as what header file or library things live in - which is important if you're an old-fashioned C++ programmer like me. Not all of them are this way, but I have found a few.



      And of course, the main driving force behind all of this is XML Web Services. Which I am in fact, a big supporter of. And I think their integration with SOAP and UDDI is "neat", although it's still a little early for it to be entirely practical on a large scale, but that's the whole point of releasing .NET in the first place, isn't it? But heck, there are reference implementations (free ones, beer and speech) of this stuff in Java if you want it. Sure, it's not all automagically integrated into an IDE, but if you can't work outside of something like Visual Studio, then what kind of a programmer are you?



      In conclusion, why use .NET over Java? The main reason you'd write something in native Win32 over Java in the past is that Java would just run slower than a native Win32 app most of the time. So why would you want to compile your code to an M$ specific VM? At least if you wrote it in Java, it would be [mostly] platform-independent. .NET still seems to run faster than something in straight Java, but there is a difference, and I think it's reaching the point with computers getting as fast as they are, and with more and more people using "Alternative" OS's, that the benefit of having something run faster on Windows, but ONLY on windows is greatly diminished.



      Just my $0.02, anyway.

    12. Re:Some of us by yog · · Score: 2

      I read both articles and it seems to me that Rickard Öberg raised some valid objections. Your assertion that "At worst, some of the stuff TMC said is open for interpretation and debate" seems a bit understated.

      I would like to see him quantify his LOC statements; what is "a lot"? If the excessive code in the J2EE version accounts for at least 70% of the difference, then I'd say Middleware's LOC comparison is completely discredited. If it's only 10-20% then the comparison should stand.

      More importantly, if the J2EE version was coded poorly and the .NET version was coded well, then the tests are invalid, pure and simple. Indeed, if it's true that Microsoft paid Middleware Co. to do the work, that's enough reason to suspect bias. It's like asking a political candidate whom to vote for.

      --
      it's = "it is"; its = possessive. E.g., it's flapping its wings.
    13. Re:Some of us by Twirlip+of+the+Mists · · Score: 2

      Geez, dude, did you just use grep or something?

      Read the article a second time, critically this time. When he says things like "THAT is clearly a lie," do you really think he's literally correct? Of course he isn't. He says they "lied," but what he really means is, "I disagree with this interpretation of the facts."

      "Lie" has a very specific meaning: it means deliberately and knowingly saying something contrary to the truth. There's no evidence that anybody involved with this lied. There are different interpretations of the facts-- obviously-- but that's not the same as a lie.

      I reiterate my point: don't jump to conclusions. And I add a second point: use your brain as you read.

      --

      I write in my journal
    14. Re:Some of us by ray-auch · · Score: 2, Funny

      Well, sourcesafe stores everything in a proprietary database format, so a little bit of db corruption can easily eliminate "50,000 lines of legacy code". Unintentionally.

    15. Re:Some of us by Twirlip+of+the+Mists · · Score: 2

      Yes, some of his objections are certainly valid. If I ever implied that I think otherwise, then I misspoke. But saying "they lied!" as Neumann did is just going too far.

      --

      I write in my journal
    16. Re:Some of us by Twirlip+of+the+Mists · · Score: 2

      It's going to be pretty difficult for you to prove that the TMC report was intentionally misleading. For that matter, it seems that the report itself isn't misleading at all. Some of the overly simplified conclusions that others have drawn from the report have been misleading, but I doubt that those were intentional either.

      In the absence of any evidence of intent, I remain unconvinced.

      --

      I write in my journal
    17. Re:Some of us by spongman · · Score: 2

      mathematical proofs are irrefutable. either that or they're incorrect. there's no debate, they're sttements of fact.

  2. Performance isn't most important by Faggot · · Score: 4, Interesting

    The beast most of us have sitting on our desk these days is so fast as to make language performance not such an issue. What should be focused on to support the future of computing is a well-typed, well-structured language to allow programmers to think at a higher level of abstraction than previously. That's why I love Mac's standardization of Objective C so much -- it allows high-level control of programs. Performance only matters if it sucks.

    --

    But what do I know. I'm just looking for anonymous gay sex.

    1. Re:Performance isn't most important by kpansky · · Score: 2, Insightful

      Actually languages still continue to matter a great deal even now. While computers are getting ever faster, do you really want to offset speed gains by using languages that are inefficient for many tasks?

      Don't get me wrong. I love high-level languages. Python is one of my favorite languages. However, I would not ever consider doing driver implementation or operating system work in python. Something must be said for low-level languages and their ability to relate directly to the hardware they are running on.

      --

      --Kevin
    2. Re:Performance isn't most important by NitsujTPU · · Score: 2, Insightful

      Uhh...

      Performance is an issue in enterprise applications. The difference between buying 50 servers and 100 servers matters.

    3. Re:Performance isn't most important by Twirlip+of+the+Mists · · Score: 5, Insightful

      (Given your user name and other info, I expected a troll. Turns out you said something reasonable. Weird.)

      What you say is true on the desktop, but this comparison is between two server technologies. Desktops are fast enough these days for what we want to do with them, but servers are still often heavily overloaded. If you build a big n-tier web application, chances are it's for a commercial purpose, right? So your goal in life is to get more and more people to use that web application, so you can make more money and whatever whatever. If your application can't scale as far as you need it to, it's bad, bad. So performance is very important in situations where the size of the application user base needs to scale dependably.

      --

      I write in my journal
    4. Re:Performance isn't most important by PhysicsScholar · · Score: 2, Funny

      But what do I know. I'm just looking for anonymous gay sex.

      Wait, let me get this straight (no pun intended) -- you're a gay man who says "performance" isn't important.

      Christ, next thing you know you'll be saying that size doesn't matter!

      --

      Department of Physics and Atmospheric Science, Dalhousie University, Halifax, N.S., Canada, B3H 3J5
    5. Re:Performance isn't most important by __past__ · · Score: 2
      The beast most of us have sitting on our desk these days is so fast as to make language performance not such an issue.
      You really think people upgrade their hardware so that lazy programmers can get away with sloppy inefficient coding? Not for me, thanks anyway.

      By the way, there is nothing wrong with high-level languages, au contraire. Just use those with efficient native-code compilers. (Objective C in its half-smalltalkness may be nice as well, but personally, I don't really like it.)

    6. Re:Performance isn't most important by SirSlud · · Score: 4, Interesting

      Patently untrue. Microsoft is FUD-dy, not stupid. They wouldn't be touting performance reports if it didn't matter to purchasers and adopters.

      Whether or not it _actually_ matters is a whole other ball of wax, but I contend it still does. We're not a big business by any stretch of the imagination, but we need 20 servers to handle the load we do (400-600 'requests' per secondwith each request resulting in anywhere from 2 to 4 additional connections made for each request generated) .. if we ever moved to .NET or J2EE, you can bet your ass performance would be a big issue in making our selection.

      You might try rewording: In the *majority* of cases where people are selecting platforms, performance is not always the #1 issue.

      That might approach the truth, but to say performance only matters if it sucks assumes you can afford the hardware to meet your demand with room to spare on the first day you go live. In enterprise applcations (lots of customers) and high load applications (less customers but each customer generates tons of load - like an ad server), performance is _exactly_ where you're going to make or break your ability to supply the demand without buying the Noah's Ark of hardware.

      --
      "Old man yells at systemd"
    7. Re:Performance isn't most important by targo · · Score: 2

      The beast most of us have sitting on our desk these days is so fast as to make language performance not such an issue

      Troll, troll, troll... I write server applications for living. Performance is absolutely critical to customers because it translates directly into money. Enterprise servers are usually running near peak thruput, making something to perform twice as fast means that the customer needs to spend just half the money (which is often hundreds of thousands of dollars) on their servers.

    8. Re:Performance isn't most important by fusiongyro · · Score: 5, Insightful

      I completely agree. In fact, that's why Python is my language of choice--I get more done faster, and unless I write a shitty algorithm I really don't notice a speed problem.

      However, when it comes to this particular benchmark, it has more to do with performance on a server somewhere handling thousands of simultaneous connections. Web applications, if you will. And in this particular case, a performance difference of 10% could mean a hundred users get locked out, and responsiveness to the others will be very bad.

      If you ask me, it's one of the great mysteries of the computer industry why desktop apps are written in C/C++ and web apps are written in Java, Perl, or .Net. After all, we've been admitting for years that scripting languages are OK unless you need the extra performance, and these guys do need that extra drop. So why aren't they writing these programs in C or C++? :) Clearly it isn't the libraries or types involved, since these are almost always available to C or C++ also.

      That's the $15 million dollar question, now isn't it? We seem to optimizing for RAD and performance, rather than just performance. Perhaps we should rethink our priorities, move scripting languages onto the desktop, and compiled languages onto the server...

      --
      Daniel

    9. Re:Performance isn't most important by greenrd · · Score: 2
      Only the fastest Java desktop applications are usable on my PIII 1.2GHz, namely NetBeans and Eclipse, and that's because they don't use Swing.

      Troll. Netbeans isn't one of the fastest Java apps, and it does use Swing.

      I wrote a Hello World app in C# and it took 2 seconds to start.

      If you don't know why Hello World is an invalid performance test, you have no business pronouncing on the relative efficiency of different platforms/languages.

    10. Re:Performance isn't most important by mosch · · Score: 3, Insightful
      Web Servers tend not to be expensive machines. A decent software engineer is going to have a loaded cost of somewhere in the neighborhood of $150k/year, a good one will be more than that. If I can keep from hiring two of these people by buying $300,000 in hardware, I'm even money in year one, and saving $300k/year every year afterwards.

      People on slashdot have some really, really odd ideas about what's expensive and what's not. Here's a clue: web servers are not expensive.

    11. Re:Performance isn't most important by maraist · · Score: 2

      Even if the core was loaded, there's still the JIT. But serious, I can't imagine that it would affect run-time performance.

      I'm no expert, but it's likely that many core components are written in C for the .NET server, where-as the java community shuns this (via native calls).

      -Michael

      --
      -Michael
    12. Re:Performance isn't most important by Twirlip+of+the+Mists · · Score: 2

      Dude, do you understand that we're not talking about serving up static web pages here? We're talking about enterprise applications. These sorts of things are (1) extremely important to the companies that run them, and (2) very hard to cluster-ize. If your bank uses an enterprise app for its online banking service, a failure in the app means lost revenue through customer loss. If an airline uses an enterprise app for online ticket sales, a failure in the app means lost revenue through lost ticket sales.

      The revenue generated-- directly or indirectly-- by the enterprise app will be far in excess of the costs associated with building it. Therefore, the reliability of the app once it's deployed is of paramount importance. If the app doesn't scale, or doesn't scale as well, the costs in lost revenue-- again, direct or indirect-- will be huge.

      You're just not thinking, here.

      --

      I write in my journal
    13. Re:Performance isn't most important by zephc · · Score: 2

      I second that! Python is my language of choice, and wxPython (with PythonCard or without) my preferred GUI API.

      Win32 and really almost any other C/C++ API (except maybe BeOS' app API) leaves a bad taste in my mouth. Too much manual mem management, and too many other low-level things that distract from what I actually WANT to do! (app-specific logic). Objective-C (except for the syntax) gets it about half right, but it still has its problems.

      Graphics in Java (AWT and/or Swing) is unacceptably slow. Not having a stndard cross-platform back-end like wxWindows (or even - gag - Tk), as native-code libs, is one of the areas where Java really dropped the ball.

      That .NET's GUI framework is just a frontend to Win32 is kind of cool (for speed and a stanadrd look-n-feel) but it's very much tied to Win32, and I'm guessing will be a beast to port to other platforms.

      Plus, I just LOVE the Python syntax and all the little other jems that make programming with it a joy - like how powerful dicts and lists and tuples are, how easy threading is... I could go on and on. Python has been my lang of choice for longer than any other language (I've only known C and C++ longer out of ignorance of other choices)

      --
      "I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
    14. Re:Performance isn't most important by maraist · · Score: 2

      Language performance is complex. While increasing overhead by a constant amount is perfectly acceptible (e.g. every aspect of the language takes between K and M times as long) (this could be due to extra conditional-checks to validate run-time-data such as null pointers, etc), it's not acceptible for languages to have larger big-O notational times. e.g. instead of O(k) you have O(n), O(nlog(n)) or worse O(n^2).

      In simple languages like C, you natively do efficient things (like variable manipulation, memory allocation (usually)), function calling, etc. But for example, in perl, method invocation is O(n) at best, and often involves dynamic memory allocation and thus can be O(nlog(n)). Note that this is JUST for invocation, to say nothing of what the function might try and do. It's effectively a constant operation in most other languages. Thus any tight loops really requires performance tuning possibly involving native libraries.

      The whole point of big-o analysis is to determine the scalability. O(n) inside an O(n^2) loop is O(m * n^2) which could approach O(n^3) in the worst case. Imagine a client-side email reader dealing with thouands of emails per mailbox. Your numbers of transactions become impossibly large and any arbitrary computer speed will not suffice.

      While I'm not up to speed on .NET, it facilitates C#, so I assume it handles struct-like data-structures. Java has heavy-weight data-structures, so it's much harder to write performant high data-volume-throughput algorithms efficiently (sometimes the JIT can make life happy at least).

      Since our processors are only about 2,000 times faster (VERY loosly speaking) than we were 20 years ago, but we're dealing with data-sets thousands of times larger (amplifying the effects of O(nlogn) and O(n^2)), I suggest that performance always has, and always will matter. Thus we should never blindly trade functionality for inherent performance reduction. There should be a valid argument for each instance.

      --
      -Michael
    15. Re:Performance isn't most important by pivo · · Score: 2

      I don't think he was advocating writing all code in higher level languages. There is a huge segment of coding projects being written today in languages that are lower level than necessary and this reduces productivity. No, you still don't write device drivers in Python, but you might really benefit from using a high level language for an enterprise application. Any extra hardware required to compensate for speed is trivial compared to the payoff of having the app and having it sooner and more robust.

    16. Re:Performance isn't most important by mosch · · Score: 3, Interesting
      Could you try responding to points that I actually made? The fact of the matter is that servers, even db servers, aren't expensive compared to developer time. I can buy a mid-range SunFire 4810 for about the same financial cost as one or two man-years (a couple hundred grand). So if that 20 man development team can cut 2 weeks off of the project, but it'll require a SunFire 4810 to run afterwards, that's a good deal for the bottom line.

      I look forward to seeing what words you point into my mouth in your next response.

    17. Re:Performance isn't most important by tshak · · Score: 2

      I think the point is that RAD is still the most important factor, and as we optimize RAD platforms (like J2EE and .NET) we get close to the performance of natively compiled languages so we essentially get the best of both worlds.

      --

      There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
    18. Re:Performance isn't most important by nadador · · Score: 2

      So performance is very important in situations where the size of the application user base needs to scale dependably.

      Its not entirely clear to me from the articles that the performance gap is very large, or if it exists, or if it does, who is in the lead. I think that its safe to argue that for a given application, a proper implementation in .NET or J2EE would have nearly equal performance (when performance is your weighted notion of resource utilization, scalibilty, etc.). As long as that gap is realitively small, or manageably sized, I think that it will not be part of the equation driving the choice of tools.

      Where I work, we spend boat loads of money on hardware that most fanboys and slashdot addicts would scoff at. We take a major performance hit and it sucks budgets dry. Why? Because the software costs associated with buying different hardware is so high, it would make you cry.

      I feel confident saying that as long as the percieved performance gap is small, or at least manageable, performance will not drive decision making. Tool efficiency and developer training will (or should) drive the decisions made.

      Remember, too, that its hard to compare the costs of additional capital equipment and additional software labor. While additional capital expenditures for hardware can hit your budget and your cash flow like a ton of bricks, its software costs that nickle and dime even the best budgets to death.

      --

      Outside of a dog, a book is a man's best friend. Inside a dog, its too dark to read.
    19. Re:Performance isn't most important by Pfhreakaz0id · · Score: 2

      Congratulations! that's why the VAST majority of business automation applications are written in Visual Basic! I've been trying to explain that to people on Slashdot for YEARS. The reason is (unless you care about cross-platform, which 99% of businesses don't care about because their desktops are standardized on Win32), Visual Basic is THE BEST TOOL FOR THE JOB. No question.

    20. Re:Performance isn't most important by Fugly · · Score: 3, Informative

      Only the fastest Java desktop applications are usable on my PIII 1.2GHz, namely NetBeans and Eclipse, and that's because they don't use Swing. I wrote a Hello World app in C# and it took 2 seconds to start. Language performance will continue to count until we all have 3+ GHz machines.

      That's funny because my laptop is a PIII 1.2GHz and I use JBuilder 6 (considered to be one of the slower java IDE's) every day for java development. I thought it was usable but I guess all the applications I've written with it don't actually exist. Damn, I guess the last year of my life has been a figment of my imagination...

      I'm not arguing that java and swing perform as well as native code in GUI environments. However, they've come a long way and they are clearly "usable". I'd even venture to say that the performance is "acceptable". Coupled with the fact that the applications can run on multiple operating systems without so much as recompiling the source, I might even call it "useful".

    21. Re:Performance isn't most important by joib · · Score: 2

      I'd say one reason scripting languages are popular for web development is that web apps spend most of their time waiting for IO (either file or DB) and pushing data to clients. Usually, they don't have to calculate very much. So it doesn't really matter that scripting languages are slow at tight inner loops etc.

    22. Re:Performance isn't most important by dnoyeb · · Score: 3, Informative

      Point of clarification for the ignorant.

      J2EE is not a language. .NET is not a language.

      Objective C is irrelevant in this comparison.

    23. Re:Performance isn't most important by Twirlip+of+the+Mists · · Score: 2

      Ohhhhkay. You're not following the reasoning here. You invest $X in your server hardware. In order to save money, you spend more on hardware so you can use a software framework that doesn't perform or scale as well but for which the developers can write the application faster. You deploy the application-- which had a fixed development cost of $Y-- on the server, which had a fixed capital cost of $X.

      Six months later, your customers start going elsewhere because your web application is too slow. It's not scaling under load the way it needs to. That's okay, because you can just invest in more hardware, right?

      Wrong. If the application or the application framework doesn't scale, then more hardware won't help. You have to go back to the developers again (at a cost of $Z, which as you point out is significantly more expensive than simply buying new hardware) so they can optimize or refactor or, in the worst case, just rewrite whole sections from scratch to improve scalability.

      If-- and I'm not saying this is the case-- the J2EE framework or the .NET framework is fundamentally flawed in some way, not knowing it and not acting on that information at the beginning of your project can cost you a fortune later on. How can we tell if J2EE or .NET or whatever else is flawed? Test it. Do side-by-side performance comparisons to tell us how the two frameworks compare in terms of reliability and scalability. There's really no other way to judge which of them is a better long-term investment.

      In other words, mosch, if you cut two weeks off of your project now, but have to invest two more months in it a year from now, your net cost is higher than if you took two extra weeks and used the better framework in the first place.

      Of course, the whole point is kind of moot because in this case there's no conclusive evidence for either J2EE or .NET being a better choice. But that doesn't mean that benchmarks and comparisons are meaningless.

      --

      I write in my journal
    24. Re:Performance isn't most important by Twirlip+of+the+Mists · · Score: 2

      Its not entirely clear to me from the articles that the performance gap is very large, or if it exists, or if it does, who is in the lead.

      I agree completely, and I think I would have avoided some confusion if I'd made that more clear in the first place. The point is not that either J2EE or .NET is better; the point is that it matters which one is better, if in fact one of them is.

      Now, both J2EE and .NET are complex frameworks. It's entirely possible, though maybe not probable, that one or both of them will have at least one significant flaw that's not immediately obvious. Given that it's possible, I think it's worthwhile to do this kind of testing to see if it's true. The argument that performance doesn't matter isn't really a very good one, in my opinion.

      I think that its safe to argue that for a given application, a proper implementation in .NET or J2EE would have nearly equal performance

      Unfortunately I'm not sure it's safe to say that. Until more side-by-side testing is done, it's not reasonable at all to say that .NET and J2EE are equivalent. They may be, they may not be. We don't know yet.

      I feel confident saying that as long as the percieved performance gap is small, or at least manageable, performance will not drive decision making.

      But, as I've pointed out elsewhere, enterprise applications are different from other kinds of applications. While desktop applications have basically unchanging user requirements, enterprise applications will be called on to handle ever-increasing user requirements. (Today we need to be able to handle 100 concurrent users of the system. In six months, we need to be able to handle 100,000 concurrent users. Can we do that without making any code changes to the application, or will we have to rewrite as we discover performance bottlenecks?) Because enterprise apps have to scale, the choice of tools and frameworks you use at the beginning is a much more important decision, if you want to avoid painting yourself into a corner.

      --

      I write in my journal
    25. Re:Performance isn't most important by mosch · · Score: 2
      Okay, since you insist on making applying all sorts of conditions to my example that obviously change the outcome, ummm... sure you're right. the point was that a 10% or even a 50% or 80% performance penalty isn't neccessarily a reason to abandon a solution, if that solution offers other benefits, such as increased maintainability, decreased development time, increased scalability or what not.

      i look forward to reading yet another contrived reply which ignores every fucking thing i've said, and/or adds on all sorts of shit that i didn't say. you fucking retard.

    26. Re:Performance isn't most important by Twirlip+of+the+Mists · · Score: 2

      Christ, dude, there's no reason to get nasty. If you don't agree with me, fine, argue with me. Calling me names, though? That's just kinda childish, isn't it?

      What you said in this post is basically unarguable. You said, essentially, that performance isn't the only important factor. Um... duh. But that's not what you originally said. You originally said that web servers are not expensive, which missed the point entirely. (If you can't solve your scalability problem by throwing more hardware at it, then the cost of the hardware is immaterial.) Then you said that trading performance for initial development time makes sense because you can buy more hardware for the money that you would have spent on software engineering. Which also misses the point, because you can find yourself in a situation where you saved money on development in the early stages, but you have to spend more money on development now to solve a scalability problem that can't be solved by buying more hardware. In that case, you save money on development at the beginning, but spend even more money on it later, which does not make sense for the bottom line.

      So... how exactly am I ignoring "every fucking thing" you've said, and/or adding "all sorts of shit" that you didn't say?

      --

      I write in my journal
    27. Re:Performance isn't most important by j3110 · · Score: 4, Interesting

      Which brings another point to the table actually. J2EE is a spec, not a product. It makes no sence to say that J2EE is slow. There are no implementations of J2EE using Java's new asyncronous IO (NIO) libraries. Someone implemnted a webserver using NIO and it blew away Apache performance as well at raw serving. Of course it was so fast that it had to be run on a loopback interface so it doesn't matter at all. The big performance hit this takes is to the database. The DBMS in this Java version requires an SQL statement to return all the keys, and then one to retrieve each line from the DB. It doesn't have to be that way, it just is because they are dumb appearantly :) The SQL server has to parse the SQL for every single statement. That's not exactly CPU friendly either :)

      --
      Karma Clown
    28. Re:Performance isn't most important by Twirlip+of+the+Mists · · Score: 2

      I don't think-- and I've said this elsewhere-- that it's as simple as you make it out to be. The most rock-solid web application in the world is useless if it fails under load. Given two equally suitable enterprise application frameworks, the only reasonable choice is to go with the more efficient one. ("More efficient" can mean different things in different contexts; faster, less memory-hungry, more secure, whatever you need.)

      Performance absolutely matters, because without it, you have no application.

      --

      I write in my journal
    29. Re:Performance isn't most important by mosch · · Score: 3, Interesting
      Your original post states:
      So performance is very important in situations where the size of the application user base needs to scale dependably.
      It doesn't take a genius to understand that scalability and initial performance have nothing to do with each other. In fact, highly scalable solutions are often slower because they're designed with the understanding that 'perhaps there wil be a load balancer in front of this application someday, and I will not be able to handle session state in the simplest way'.

      Originally I said web servers aren't expensive because most performance problems can be solved by throwing hardware at them, which tends to be an appropriate solution for web-based applications, thus the current popularity of the 'rack of 1U webservers, and a fast db box' configuration, or some similar variant.

      P.S. If you want somebody to refrain from referring to you as a fucking retard, try to engage in a debate, instead of just flinging shit around like a retarded monkey.

    30. Re:Performance isn't most important by Twirlip+of+the+Mists · · Score: 2

      It doesn't take a genius to understand that scalability and initial performance have nothing to do with each other.

      Hmm. Evidently you don't understand that "scalability" means "the ability to maintain acceptable performance under varying degrees of load." These things should be clear from context. I'm not quite sure where the breakdown in communication is coming from. In any case, it's obvious that scalability and performance are, in fact, tightly coupled characteristics, because scalability is essentially defined by performance under varying conditions.

      P.S. If you want somebody to refrain from referring to you as a fucking retard, try to engage in a debate, instead of just flinging shit around like a retarded monkey.

      Doesn't really bother me if you want to be profane and personally offensive. I was merely pointing out that it's childish. It is getting tiresome, though, so I think it's safe to say that we're getting very close to the end of this exchange.

      --

      I write in my journal
    31. Re:Performance isn't most important by mosch · · Score: 2
      I can write an app that handles 1000hits/second on a single machine, but cannot scale to two machines. Or I can write a scalable app which handles 900hits/second on a single machine, but I can get 900 MORE hits/second by adding a second machine, and so on.

      This is what I'm referring to when I say that there's often an initial performance drop with scalable software.

      Anyway, here's something for you to try, stop being mad that I called you a fucking retard and insinuating that your ability to communicate effectively was on the same level as a shit-flinging monkey. Instead, ask yourself what changes you'd make in your optimization strategy if you're designing code for: a) a single-cpu machine, with no possibility that the code will ever be on multiple machines, or b) a large cluster, potentially with multiple types of machines.

      Once you're done pondering that you'll realize that I am far smarter than you, not to mention better looking.

    32. Re:Performance isn't most important by MrBlack · · Score: 2

      Its not entirely clear to me from the articles that the performance gap is very large, or if it exists, or if it does, who is in the lead

      How can you even _SAY_ that? I'm not trying to be troll here, but did you read the MiddleWare article? the .NET PetStore beat the optimized J2EE PetStore in every benchmark. Sometimes by a factor of 2 or more. I agree with a lot of things other posters have said, that maintainability, developer productivity etc. are often more important than raw performance, but the J2EE PetStore got killed there too. 14KLOC vs 3~4KLOC. Maybe the J2EEs exception handling is a little verbose (I haven't looked), possibly there were some optimisations that could have been made that weren't (J2EE is evolving pretty quickly, and you don't whip together a benchmark like this over a week-end) but is it equally possible that for each of these gripes on the J2EE side there is some .NET developer out there shaking his head going "Y'know they really could have done THAT better". I don't think pretending there is no difference helps.

    33. Re:Performance isn't most important by Thomas+Charron · · Score: 2

      Your looking at thge short term. I can promise you that in the long run, people always pay off over timer.

      What happens when suddenly your expensive machines munges your database? When suddenly, that one engineer that wasn't very good, but wrote a fairly important, yet archaic past of your backend, leaves?

      Code cannot really be picked up out of the blue. People need to pass that on. Yes, indeed. Expensive people.

      I have YET to see a compiler that accepts a buisness drawing in Powerpoint and turns it into a stable, scalable solution to generate revenue. I have, on the other hand, seen those expensive people your saying are replacable with machines, do it.

      --
      -- I'm the root of all that's evil, but you can call me cookie..
    34. Re:Performance isn't most important by Sentry21 · · Score: 2

      I think the issue with compiled languages on the server-side is that there's a larger problem than just RAD vs. speed. For example, writing your web apps in C could work fine, until some obscure pointer bug reared its ugly head and overflowed a buffer. This could hypothetically result in, for example, making an online store think you had x number of dollars in store credit, or think you'd already paid when you hadn't.

      This problem arises because the deep magic is only run by one company (likely), so it may take longer to rear its head - and when it does, when an exploit is realized, it needs to be fixed immediately. This can also be a problem in that people don't necessarily understand the code someone else might've written, and they have to learn entire sections of code, or entire projects, just to fix.

      PHP also takes time to learn about and so on, but you don't have pointer errors and buffer overflows (in that app specifically), since buffers are resized dynamically. You might pass bad data to something else, but you should be checking data once you have it all collected.

      Then there's load times. On Apache, mod_php.so is loaded into memory, and then all that needs to be done is to read the page, compile, and execute, or (if pre-compiling/caching) just to execute. JSP is precompilied by default by Tomcat, and the JVM is always running. With a natively-compiled system, if you're not writing your own DSO or server software, it has to be executed for every page hit, and it's a lot harder to get someone who understands your setup than someone who understands JSP/ASP/PHP.

      That all being said, I think the main factor is that the Internet moves at 'internet speed' - when you have an idea, it needs to get done now, with as little fuss, trouble, and debugging as possible. Scripting languages offer this by being highly abstracted and widely used (if a million people use PHP, it's more likely that people will find bugs. Slow but rapid beats fast and latent six days of the week.

      Scripting languages on the desktop would be cool though, but for mainstream apps, there has to be a lot of garbage collection, because variables in scripting languages (can) take up more memory than their C/C++ counterparts, which can get laggy.

      --Dan

    35. Re:Performance isn't most important by Avumede · · Score: 2

      Why don't we write server code in C++? Because it tends to crash more (due to programmer error). Microsoft's ISAPI filters are to be in written in C++, and, from my limited experience, they are a complete pain. One bug in an ISAPI filter can bring down the entire server.

      Also, Java is far from a scripting language. It basically runs natively, due to the hotspot compilers. I say basically because there are still situations in which sections of the Java code cannot be compiled, but this should not have too much of an effect, and with each release things are getting better.

    36. Re:Performance isn't most important by zmooc · · Score: 2

      Real life example: an application is developed for 120K, hosting requires 5 servers instead of 1. So what does the hosting cost? 1) SLA: 250/mnt 2) server: 200/mnt 3) Colocation: 140/mnt 4) Administration: 100/mnt/server. That's 690/mnt for 1 server, 2450/mnt for 5. That's 29K/year which is not even that expensive for enterprise-level applications. That's easily enough money to optimize the application enough to make it to run on 1 server (in this case). That's 29K which you get back within a little over a year.

      --
      0x or or snor perron?!
    37. Re:Performance isn't most important by mosch · · Score: 2
      y'know, it takes a special kind of retard to interpret my post as meaning that i want to replace all neccessary staff with mid-level sunfire.

      of course you still need people to write the code to run on the boxes, people to test it, people to document it and people to monitor it. but if spending on money allows you to hire two fewer engineers (or lately, to not lay off two engineers), that's a good thing. after all, companies that don't make money go out of business, and then nobody has a job.

  3. J2EE by Anonymous Coward · · Score: 3, Informative

    We used all java technology on www.bayoubid.com and had no problems with speed. In fact from our initial tests java was quicker than C#.

  4. Hmmmm. by The+Bungi · · Score: 4, Insightful
    So essentially this boils down to actually, that thing we said was killer in fact sucks, so your comparison is unfair. We also ain't fixing it, so there.

    I mean, "...excessive exception handling"? WTF?

    This only underscores the by now expected knee-jerk reaction these types of pissing contests bring. There's always some expert who can refute every single point of the whitepaper, who in turns gets dissected by someone else ad nauseaum.

    In the end it's never been about benchmarks or raw speed. It's about how productive you can be writing these applications, time to "market" and total cost. It doesn't matter if J2EE is 14.3% faster than .NET or viceversa.

    1. Re:Hmmmm. by Twirlip+of+the+Mists · · Score: 2

      Actually, in this case, it's pretty much about benchmarks and raw speed. Unlike a personal desktop computer or a desktop application, when you're programming an enterprise app your own productivity isn't what's important. The overall reliability and quality of the finished app is what's important. If you choose an enterprise framework that doesn't scale-- or that doesn't scale as well-- then you're in a bad spot. So it's important to know how these two frameworks compare so you can make an educated choice at the front end about which one is better to use. All other things being equal, the faster one is better.

      Of course, in this situation all other things are most definitely not equal. If you want to deploy your enterprise app using a non-Microsoft OS, or if you want to avoid licensing fees for app servers, Java is pretty much your only choice. (Unless you go with a different type of framework altogether, like PHP or something like that. In some cases that's okay.)

      --

      I write in my journal
    2. Re:Hmmmm. by gosand · · Score: 2
      In the end it's never been about benchmarks or raw speed. It's about how productive you can be writing these applications, time to "market" and total cost.

      And freedom, don't forget freedom.

      Oh, wait. It has never been about that.

      --

      My beliefs do not require that you agree with them.

  5. Re:The sad thing is... by GreyWolf3000 · · Score: 3, Insightful
    It's not about loving Linux. It's about loving Freedom (TM). And that means not having a centralized conduit for information exchange. It means my computer being mine.

    On a side note, I wish the 'net were never called the 'Information Superhighway.' That single analogous dubbing has spurred the acceptance of rhetoric in Congress that allows all sorts of regulation.

    --
    Slashdot: Where people pretend to be twice as smart as they really are by behaving like children.
  6. Final Conclusion by Anonymous Coward · · Score: 4, Funny

    The only things TMC actually proved are that they are

    NOT J2EE experts

    but they

    ARE MS shills.

    Everybody knows "benchmarks lie" as the old cliche goes. It's just funny that a chest-thumping "enterprise software" consultancy would so blatantly pitch a relatively un-scientific benchmark as a serious study.

    1. Re:Final Conclusion by truth_revealed · · Score: 4, Insightful

      Why on earth would Sun put out such a horribly performing example J2EE program (Pet Store) when it knows damn well that 99% of the programmers out there will copy this program as a shining example of how to code in J2EE correctly?
      For God's sake, Sun - get a clue! Give the world a better official J2EE example!
      The J2EE optimization rebuttal seemed awfully complicated to expect a new Java programmer to understand.
      Nevermind benchmarks optimized by experts - average shops don't have such experts. Think about the lowest common denominator. I'd rather see a benchmark of how average systems perform when designed by novices as an indicator of how good the underlying technology is. If a system has to be designed by leading experts then it is not cost effective for the average shop and I would want no part of it. Object orientation be damned - just give me something that works and does not cost an arm and a leg to extend and maintain.

    2. Re:Final Conclusion by j3110 · · Score: 2

      There's nothing wrong with the way they did the java pet store. The problem is that it is a pet store, not a bank :) Besides, even a bank wouldn't want to use all of J2EE. It's a HUGE technology. Some ppl call it bloat. I would call glibc a bloat because I've never used the entire library before. However, if someone didn't NEED those functions, or in this case API's/features, they wouldn't be there. SUN could have written a lot of small programs, but then developers wouldn't have seen how they can work together to perform a task.

      SUN doesn't need to make a good example, developers need to RTFM or by a GOOD book to tell them when and where things SHOULD be used, not where they can. J2EE isn't for pet stores to begin with. It should have been painfully obvious to anyone that knew that J2EE was an acronym for Java 2 _Enterprise_ Edition. I don't know of anyone that has a pet storage facility such that they can mail order them or not know exactly what they have just by looking. If any of you reading this need that explained to you, or you don't see the irony/humor in choosing a Pet Store for an Enterprise demonstration, then there is no hope for in you :) You could try to get a book telling you when to use certain API's, but if you're that lacking in common sence, then a book isn't likely to help.

      I see what you are saying about leading experts, but don't think that the Java programmers who made the revised pet store needed to be experts to do better than they did. It looks like it was written by a team of monkeys. One good developer is better than any quantity of monkeys. If you are looking for a technology that allows monkeys to make a working enterprise systems, then you'ld be more likely to find a pot of gold at an end of a rainbow. Seriously, you really would. It just might happen that a midget dressed in green is smelting gold there. Much more likely than a monkey writing code that could work in the enterprise.

      Really... how many of us have had to trouble shoot that POS legacy system that a certified MS VB monkey with 2 years of high school wrote?

      --
      Karma Clown
    3. Re:Final Conclusion by truth_revealed · · Score: 3, Interesting

      If Sun's Pet Store application is not highlighting J2EE "best practice" then what the hell is it for, then? Are you saying that Sun with a billion dollars in cash in the bank could not find a suitable expert to write a decent J2EE example? They invented J2EE, afterall!
      First Entity Beans were good - and now they are bad. What other surprises can we expect? Who should an average Java programmer believe?

    4. Re:Final Conclusion by j3110 · · Score: 2

      It's a demo of how the API's work, and how they work together. It's not meant for you to cut-and-paste to your own enterprise system. You have to design an enterprise system. Alan Cox is a great programmer, but you couldn't clone him 5 times and have the 6 of them just sit down and make an enterpise application. If there was a best way to do enterprise programming, there would be a wizard and all you enter is some VB code that computes the tax for area or some such. It's a set of bloody tools. You use them the way that you need them. The demo is so you don't use a monkey wrench to drive a nail, that's all.

      Entity beans are good! BMP Entity beans are bad. They have always been bad. You use them when you can't use CMP. If you really want speed, you use JDBC directly in the session beans. Stateful session beans are bad. Only use them if you can't use Stateless session beans. How hard is it to understand that each one is relatively bad to another, but if you should run into a problem using one, you still have the good old sledge-a-matic that will do the job for a price.

      --
      Karma Clown
  7. Re:Save your time by Thomas+Charron · · Score: 3, Insightful

    Lines of code has nothing to do with ease of use, reliability, or scalability.

    This isn't some sort of a 'I can do that task in *3* lines of code, Jack!' contest.. ;-)

    --
    -- I'm the root of all that's evil, but you can call me cookie..
  8. Much more interesting - a leaner JPetStore by slamb · · Score: 5, Informative

    jPetStore is worth checking out. These people decided that the J2EE pet store is way too complex, which I'm inclined to agree with. They produced, using Jakarta Struts, a Java pet store web application that is much leaner. It's comparable in size to the .NET pet store but better in several ways - there's no SQL embedded in the code, there's no HTML embedded in the database, no code was automatically generated, and it's MVC-based.

    I've always thought that Enterprise Java Beans are overengineering to the extreme. It's nice to have something to back that up with now. There's no question in my mind that this JPetStore beats out both the original J2EE one and the .NET one in maintainability.

    They didn't do any benchmarks - performance wasn't what they were going for - but it would be interesting to see some. I'd be inclined to believe this simpler approach would also have much better performance than J2EE.

    1. Re:Much more interesting - a leaner JPetStore by steve_l · · Score: 2

      yes, comparing a lightweight struts/JDO impl running on Jetty would be more interesting.

      I think sun have got into a mess pushing EJB as the be-all and end-all of server side java coding. I dont know whether that was because they wanted to enable client server apps using the EJB api too, justify to customers the purchase of premium j2ee servers over free servlet engines, or encourage sales of multiway solaris boxes.

      But because EJB is wierd, ugly and so limited, I dont think it is the right design for many apps. The fact that it can take weeks of 'tuning' the app server to get acceptable performance out of it is a fatal flaw in its own right. nobody has time to do that.

    2. Re:Much more interesting - a leaner JPetStore by joib · · Score: 2

      Well, considering that you have been bashing OOP and evangelizing your "table-based" programming (or whatever you were calling it) for God knows how long, here's an excellent chance for you to demonstrate the superiority of your approach. Are you still going to implement it on DBASE with file-polling for "clustering"? :)

  9. Price/Performance page 25 says it all by Pov · · Score: 5, Insightful

    Regardless of how you argue the testing parameters, it's pretty clear the .NET implementation won out. Even if it didn't, the Price/Performance chart makes this a pretty easy pick for most businesses.

    You can probably get much higher performance out of the J2EE stuff at the very top end, but only by running it on the 'big iron' that most companies can't afford and even fewer actually need.

    M$ has a lot of problems, but this .NET stuff is cool and people should take notice. Even the evil empire can raise the bar. And competition helps us all in the end. Lower those prices SUN and Oracle!!

    --
    --- Don't be a player hater: I meta-mod ALL negative mods as Unfair.
    1. Re:Price/Performance page 25 says it all by steve_l · · Score: 5, Insightful

      That's what comes of BEA and WebSphere pricings; if they'd used jboss or HP-app server (still a free download, I believe), app server cost becomes zero, leaving only hardware, OS and database. Move to hypersonic SQL or postgres to take oracle out the loop and you start to get economic performance. Sure, per-cpu perf may be less, but what if all those CPUs are just blade mounted PIII-8000 parts running your favourite linux distro?

      NB, after development costs, the biggest expenses in my last projects were operational costs and hardware depreciation. This review didnt look at either of those, but everyone I know is scared of IIS management, so its operational cost is probably higher.

    2. Re:Price/Performance page 25 says it all by Pov · · Score: 2

      That's a very good point, but a difficult sell to management. From my experience if management gets sold on J2EE or anything Sun related, they swallow the whole damn load.

      The companies I've worked for have never had much trouble with IIS (maybe just lucky if you believe what you hear around this site) and they are definitely cheaper labor. .NET is very easy to code with and it's very fast to develop in. That's why I would go that way, but there are always good alternatives.

      --
      --- Don't be a player hater: I meta-mod ALL negative mods as Unfair.
    3. Re:Price/Performance page 25 says it all by CommandNotFound · · Score: 2

      M$ has a lot of problems, but this .NET stuff is cool and people should take notice. Even the evil empire can raise the bar. And competition helps us all in the end. Lower those prices SUN and Oracle!!

      Yes, and they (MS) are creating their own monster by focusing on price. The more they train the market to look at "lower cost" vs. Oracle and Sun, the more legitimacy they give to Linux, MySQL, PostgreSQL, and PHP vs. Microsoft. Bring it on, I say.

      On the other hand, I seriously doubt the 2K vs. 14K lines of code is legitimate. If it is, there is a lot of opaque, drag-n-drop, hope-it-just-works development in the smaller one. A size ratio like that might happen when comparing against maybe C and stdlib for web apps; then again, I think even using printf's and socket calls one could get closer than that.

    4. Re:Price/Performance page 25 says it all by iSwitched · · Score: 2, Insightful

      While I agree that .NET concepts are cool, the reason is because much of the concept is so obviously based on Java, only the names have been changed to protect the innocent.

      I further believe that the .NET implementation would probably turn out to be marginally faster even in a truly fair comparison. It doesn't surprise me that Microsoft engineers working on a Microsoft platform could optimize more heavily than java, which at some point must run up against the constraints of the JVM implementation on the given platform.

      BUT -- raw speed isn't the issue all the time. A quick google turned up the fact that MS has between 40% and 49% of the server OS market (depending on whose figures you believe). Linux at about 25% and everyone else. I write java code for a company with a significant number of customer who are either wholly in the 51% or run mixed environments.

      Here's the kicker -- it is totally possible for java to realize the write once run anywhere promise on the server side, we're doing it. The fact that we don't have to port the app from platform to platform is a significant saving for us. Our customers enjoy greater compatibility, faster updates, increased feature set and LOWER PRICES. Our more adventurous customers then lower their TCO even more by running the app on any of the extremely well-written open-source app servers available.

      MS trained us to view discussions such as these in business terms, not technical ones -- and they loose the argument on business terms.

      (and yes, I do know .NET is being ported to other platforms, but if I can't use it today, it may as well not exist).

      --
      "That naive cube! How long must I suffer this!" --Sheldon J. Plankton
  10. Starting off strong by sootman · · Score: 3, Funny

    Quote from the article: It contains both errors, halftruths, and lies.

    Unfortunately, the article contains both spelling errors, grammatical errors, and errors of style.

    --
    Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
    1. Re:Starting off strong by glwtta · · Score: 2

      I actually found this rather heartening - the author just might be an actual developer :)

      --
      sic transit gloria mundi
    2. Re:Starting off strong by yog · · Score: 2

      Actually, I think it's pretty well written, considering that Rickard's from Sweden. In fact, his English is so idiomatically good you were fooled into thinking he's a typical semi-literate American, haha!

      --
      it's = "it is"; its = possessive. E.g., it's flapping its wings.
  11. Re:Save your time by interiot · · Score: 5, Informative
    Actually, it's the other way around. Look at the PDF, page 40.
    • The Middleware Java Pet Store 2.0 implementation uses the same basic EJB-recommended architecture as the original Java Pet Store (except fully optimized for performance). Hence, its code count remains largely unchanged over the original at 14,004 lines of total code.
    • With the .NET Pet Shop 2.0 implementation, Microsoft has done some further optimizations to reduce its overall line count, while also extending the application with new features for distributed transactions and Web Services. The new .NET Pet Shop 2.0 contains a total of 2,096 lines of C# code (the 1.5 version had a total of 3,484 lines of code, a 40% reduction).

    This is covered right away in the rebuttal, as there seem to be some tricks played to get the discrepancy so large.
  12. Re:Save your time by Yankovic · · Score: 3, Interesting

    you got that backwards. Java required 14k lines of code and .NET required 2k.

  13. hmm... by SpanishInquisition · · Score: 3, Funny

    this is like trying to make a race between a tortoise and a snail, only to realize that your stopwatch doesn't go over 15 minutes.

    --
    Je t'aime Stéphanie
  14. J2EE, EJBs vs "JSPs" by kisrael · · Score: 3, Interesting

    I've heard some word (admittedly not many datapoints) that some companies are still embracing Java/J2EE, but are going for "JSPs" (hopefully a euphamism for good use of regular java objects, maybe some wrapped JDBC) instead of the fullbore EJB. In my experience, this is a very smart thing. I've had successes with using a lot of the same patterns recommended for EJB with the lighter-weight stuff, and have heard of at least 3 really collosal EJB failures.

    EJB makes it easier to have physically seperate tiers, and adds enough systems-needed overhead that you'll probably need 'em...

    --
    SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
  15. Benchmarks for tasks with N-number of variables... by Art+Popp · · Score: 4, Interesting

    ...are interesting when well researched, but basically useless to anyone who would actually have to choose between these two development environments. If you work for a company that designs applications of this kind there will be a host of more important things to consider than raw transactions per machine. The simple fact of e-commerce is that if a user is actually going to buy something at your site, you can waste tremendous processing power making them happy. If you make 2 dollars profit on a transaction and had to use 20% of the CPU on a 2Ghz processor for 40 1 second bursts (like you will if they shop using RH interchange), it's still worth it. What this benchmark argues well is that the MiddleWare product is probably worth buying if you have processor constraint problems. No amount of increased performance would warrant changing a staff of experienced Java programmers into a staff of inexperienced .net programmmers. Extra processors are just too cheap....

  16. Yeah, but... by Schnapple · · Score: 5, Insightful
    Isn't The Middleware Company the same one that produced this report for SUN Microsystems and concluded that J2EE is the better of the two platforms for a variety of non-performance-related reasons? I think this report is one of the best, most coherent reports on what exactly J2EE and .NET really are and what the differences are.

    So is it that The Middleware Company will just claim that the winner is the one that paid them? Or is it that .NET really is the performance winner whereas J2EE wins most of the other awards?

    And why is it surprising that the performance winner is the one whose entire platform, from the operating system to the SQL server to the framework, is made by a single vendor? Of course it will perform better - they're all in the same building (or complex in this case).

    1. Re:Yeah, but... by tshak · · Score: 2

      Have you even BEEN to the Microsoft Campus? it doesn't matter that they're all in the same campus - you can't just run over from Building 3 to Building 42 when you have a performance question :-)

      --

      There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
    2. Re:Yeah, but... by styrotech · · Score: 3, Funny

      Well you're right, the average slashdot geek probably couldn't run from building 3 to building 4 anytime.

  17. Lies, damned lies by PhysicsScholar · · Score: 3, Interesting

    OK, first off, I don't care how many lines of comments or exception-handling routines you take out, the Microsoft solution was still 7 times smaller. If a sub at two different stores costs the same $5.00, I would definitely buy the 7-inch one over the 1-inch version for the same price; essentially, it's better no matter how you cut it (no pun intended).

    Furthermore, if Yahoo moves from C++ to PHP for the majority of their Web applications, I think that's saying something. Perhaps J2EE and .NET are irrelevant at this stage in the game, and a PHP vs. ASP review would be more relevant.

    --

    Department of Physics and Atmospheric Science, Dalhousie University, Halifax, N.S., Canada, B3H 3J5
    1. Re:Lies, damned lies by gnovos · · Score: 2

      If a sub at two different stores costs the same $5.00, I would definitely buy the 7-inch one over the 1-inch version for the same price;

      But if you were buying an anal supposetory for your hemmerhoid flare up, would you still be so eager to chose the 7" over the 1"?

      --
      "Your superior intellect is no match for our puny weapons!"
    2. Re:Lies, damned lies by Sentry21 · · Score: 2

      Perhaps J2EE and .NET are irrelevant at this stage in the game, and a PHP vs. ASP review would be more relevant.

      PHP doesn't offer the same things J2EE and .NET do though. PHP is a scripting language, J2EE and .NET are web application development platforms. The difference, in the easiest way I can think of it, is that PHP & ASP let you make pages, while J2EE & .NET let you make applications with web interfaces, basically. The distinction is a tricky one to make, but it's there nonetheless.

      --Dan

  18. Couldn't Resist Though, Eh? by 4of12 · · Score: 3, Funny

    It didn't seem all that exciting, and we sort of ignored the story.

    Maybe we could get a bunch of people to whip up a controversy about a benchmark whitepaper comparing performance of rcp and ftp.

    --
    "Provided by the management for your protection."
  19. Re:Starting off strong - Future slashdot editor by Camel+Pilot · · Score: 5, Funny

    Unfortunately, the article contains both spelling errors, grammatical errors, and errors of style.

    Great! The the author is sufficiently qualified to become a slashdot editor.

  20. Regus Reporting? by Yankovic · · Score: 3, Interesting

    Anyone find it particularly hilarious that the Register couldn't even report the results correctly? Fine that they get anti-MS people to put in quotes, but the facts of the case (namely 14k lines of code for java v. 2k lines of code for .NET) were reported in reverse? Ugh... how these guys have a website is beyond me.

  21. Sheesh by Reality+Master+101 · · Score: 5, Insightful

    Starting yesterday, we received a bunch of story submissions about a performance comparison between J2EE and .Net. It didn't seem all that exciting, and we sort of ignored the story. But as usual, it appears that some people take issue with the methodology and conclusions.

    So let me get this straight. A report comes out (that looked pretty fair to my eyes) where .Net kicks the crap out of Java, but that's not interesting. But as soon as someone puts out a (pretty silly IMO) refutation of said report it's suddenly interesting?

    Yeah, yeah, I know -- it's Michael and it's Slashdot. But sheesh, come on.

    Anyway, is anyone really surprised that .Net is going to be much faster than Java? It would be hard to make it slower, and if I were in charge of the .Net project, that would be one of the first issues I would address if I was making a competitor to Java.

    --
    Sometimes it's best to just let stupid people be stupid.
    1. Re:Sheesh by zenyu · · Score: 2

      Anyway, is anyone really surprised that .Net is going to be much faster than Java?

      Have you used .NET? It's slow as a dead dog. Intrepreted Java is faster. The only reason it hasn't been published is that the friggin EULA doesn't allow you to publish the numbers.

      I hear people saying how neat it .NET or C# is and I just wonder. If this were '91-92 sure, but it's friggin 2002, and their flailing about trying to implement a Java 0.9 lookalike, with an extra special JNI pre-processor.

    2. Re:Sheesh by dnoyeb · · Score: 2

      Yes of course, I would be surprised in a fair comparison that the young .NET would be faster than Java. Running natively of course .NET code will be faster, but running inside the VM as it should be for a comparison I would expect .NET to be slower since its so much younger.

      Its appearently that so many hear are defending C++ and therefore M$. Very strange phenomonon. The report showed how rediculously LOADED the comparison was, but nobody seems to RTFA.

    3. Re:Sheesh by j3110 · · Score: 2

      Yeah... that's driving my crazy too. Does no one understand what BMP means? It's slower because it is uncached AND there is a seperate call to the database for each row + 1 to get the keys. I don't care if it was writtin in assembler, that's gonna be SLOW! :) Then on the MS side, they cache data as well as 1 big SQL statement to return rows. That's about as fair as comparing the P4 to the Athlon when the Athlon has L2 cache turned off. Yet the parent poster doesn't see the obvious and gets modded up knowing nothing about the technologies at hand. And what's worse is they had to go out of their way to make it BMP, because CMP is so much easier. No legitamit claim will ever use BMP.

      --
      Karma Clown
    4. Re:Sheesh by Fjord · · Score: 2

      Actually, it's even worse than that. Getting the keys and then getting the data for each key is O(log(n)*m) while getting the data and iterating is O(log(n)*log(m)). If you're getting back 50 results, that can mean the calls take about 20 times longer. There is a pattern called "Fat Key" which deals with this (essentially, you return the key with the data you fetched, and instead of doing another db lookup, you get the data out of the fat key). Unless you're careful, this can still take O(m) memory, whereas using a stateful session bean and iterating through will give you O(1) memory use.

      --
      -no broken link
    5. Re:Sheesh by j3110 · · Score: 2

      In my previous post I meant to say that the data isn't cached on the client, BMP/CMP is cached on the server.

      hehe... but fat key design isn't exactly up to best practices though. :) I never thought about the stateful session bean idea you mention. That's very clever. If ever my data access model doesn't fit Entity Beans, I'll be doing that :) Right now, people loading a bean(avg 10 stddev 10 so 70% chance 20) will usually end up changing it or accessing it again in the very near future.

      --
      Karma Clown
  22. Re:Save your time by WolfWithoutAClause · · Score: 2
    Lines of code has nothing to do with ease of use, reliability, or scalability.

    It does correlate fairly well with programmer productivity however.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  23. I have no problem with microsoft's coders.. by tenchiken · · Score: 5, Insightful

    It's their business ethic I can't stand. .NET is the most exciting thing in distributed component programming since Objective-C and NeXT. Unlike, Microsoft has enough influnce to acutally make a new programming language part of the vernacular that programmers use.

    I have deployed two different production systems off of .NET, and have been utterly amazed at the API. While C++ has about 50/50 curve (50% of the things are really easy to do, the other 50% suck) and Java raises that to about 70/30, C# and more importantly the .NET framework allow programmers to naturally write good n-tier applications. (In fact, my biggest critique on .NET is that it tends to force people to n-tier when that is not completly appropriate).

    J2EE is a horrific mess in many ways. The abstractions don't map well to real world concerns (for example, a bean represents a row, not a business object, unless your business object is a row, in which case you are probably over exposed to changes in the database), and the API's for SOAP et all are poor (unless you use Glue which rocks beyond anything else I have seen in Java).

    Java's basic trade offs are part of the problem. Remember that Java was created for the purpose of running on embeded systems. This makes very simple tradeoffs (for example, optimizing for size in the bytecode instead of performance) that are not real good for large applications.

    Finally, Java is object oriented. .NET is component oriented. Refliction, delegates, events, emission, cross domain calls and third party language itneroperability are all first class in .NET...

    Now, if Microsoft's business guys would just follow suit.

    1. Re:I have no problem with microsoft's coders.. by plumby · · Score: 3, Informative
      for example, a bean represents a row, not a business object, unless your business object is a row, in which case you are probably over exposed to changes in the database

      I'm assuming that you are referring to Entity EJBs, as a 'bean' is basically any java object with a null constructor (and usually setter and getter methods), and can represent anything you want. But even for Entity EJBs, it's only true if you use CMP (container managed persistence). If you implement BMP (bean managed persistence) you can use them to represent any kind of business entity. We are currently implementing an entity bean that represents data that has been pulled off a mainframe (not an RDBMS in sight), with the EJB/container providing the cacheing/security/pooling etc for us.

    2. Re:I have no problem with microsoft's coders.. by tenchiken · · Score: 2

      Someone would prefer to use a model that does not require me to think beyond simple business rules in the first place. Thinking about the difference in "beans" in kinda absurd.

      Oh, and that model is faster, semantically cleaner and more interopable? I can't understand why more people don't use it (yet)....

      Just like Carbon, C++, this stuff will take a bit to catch on, but catch on it will.

  24. Re:Save your time by spencerogden · · Score: 2

    No, but LOC does impact developer productivity, and bugs. There have been a few studies showing that programmers write the same number of lines in a given time no matter what language they are using. Also, less code means less stuff to read to find bugs. I would think a 7-fold increase would have some serious reprecussions on easy of developement.

  25. Show me the money by evilpenguin · · Score: 2

    The important question to me is does each application platform scale with commodity hardware? If so, then the more important question is which takes less time to develop and what is the availability and price of programmers for each platform? Hardware is cheap. Development time is expensive.

    Benchmarks, while to completely useless, are almost completely useless.

    I don't recall anyone EVER claiming that Java's execution speed kicks ass... I don't think execution speed was ever a big selling point for Java.

  26. Apples and Oranges by moogy · · Score: 5, Insightful

    The original J2EE version of the Petstore application was meant as an EDUCATIONAL example for those new to J2EE. As such, it was not built with performance in mind, but rather was built with the mentality "How can we use every aspect of J2EE to implement this incredibly simple problem." No one in their right mind would use J2EE or EJBs to implement the Petstore app. It would be overkill in the extreme. And even if the J2EE version of the Petstore app was modified for performance, it's unlikely you'll be able to beat something that was built from the ground up with performance issues in mind. I'm sure this was the case with the .NET version.



    If you want a good comparison of a .NET and Java version of the Petstore app, check out JPetstore which was built from the ground up with simplicity and performance as high priorities. Hopefully in the upcoming weeks we'll see some good benchmarks using this version instead of the J2EE version.


    --
    Blah Blah Blah
    1. Re:Apples and Oranges by CaseyB · · Score: 2
      The original J2EE version of the Petstore application was meant as an EDUCATIONAL example for those new to J2EE. ... No one in their right mind would use J2EE or EJBs to implement the Petstore app.

      Wrong. Pet Store was built as a demo illustrating the "best practice" implementation of J2EE. It's Sun saying "This is how you should build YOUR apps.". As such it's fair game (and the perfect choice) for platform performance comparisons.

      From the site:
      "The JavaTM Pet Store Demo is a sample application from the JavaTM 2 Platform, Enterprise Edition ("J2EETM") BluePrints Program at Java Software, Sun Microsystems. It demonstrates how to use the capabilities of the J2EE 1.3 platform to develop flexible, scalable, cross-platform enterprise applications.

      The JavaTM BluePrints Program program helps developers create robust, scalable, and portable applications by providing guidelines, patterns, and code that illustrate best practices on how to build end-to-end applications using Java technology.

  27. It's the query that matters by vanguard · · Score: 5, Insightful

    I've been building web applications since 1997. In nearly every app I write most of the time is spent gathering and sorting the data, not in presenting the page.

    If one of my pages takes 7 seconds to come up, I can almost guarentee that the query is 6.x seconds. For that reason, I agree, language speed isn't that critical to me. What matters is: How easy is it to write/maintain? Will the language be supported? Can we hire guys that know it? Is it hard to learn?

    --
    That which does not kill me only makes me whinier
    1. Re:It's the query that matters by Pfhreakaz0id · · Score: 2

      Yeah, because a "default document" for a web server actually gives a 302 - moved return header, along with the default.asp filename. The browser then requests this document, so it involves an extra response/request cycle.

    2. Re:It's the query that matters by Pfhreakaz0id · · Score: 2

      I may be confusing it with what happens when you do a response.redirect in ASP. I remember tracing headers (to resolve an authentication issue... don't ask) and being surprised at the 302 header. I always just figured IIS just switched the document, but actually, it sends the 302 back and the browser requests the new document.

      I tried going to this http header viewer, but I couldn't really find a site to verify, but I think you are right, and I'm confusing it with the above situation.

    3. Re:It's the query that matters by Pfhreakaz0id · · Score: 2

      http://www.rexswain.com/httpview.html

    4. Re:It's the query that matters by Thomas+Charron · · Score: 2

      The largest eCommerce site, yet doesn't handle the traffic of amazon or yahoo?

      Ok, I'm confused now..

      Your facts do not make sense.

      --
      -- I'm the root of all that's evil, but you can call me cookie..
  28. Abstraction at nauseum by gdeciantis · · Score: 2, Interesting

    One point about the refuting article is that it talks about the merging of data and business logic layers stretches the idea of object oriented. Although the code be less reusable, merging the two layers is in fact a very intuitive way to piece an application together and doesn't overload a project with excessive classes. As well the GUI will tend to dictate what functions can be performed. If the code is just gonna be used in that one page I don't think code should be anywhere than in that page.

  29. performance of programmers by axxackall · · Score: 3, Interesting
    Run-time performance is really a concern for system administrators, integrators and IT managers. The difference in run-time performance should be compensated by faster hardware, which gives a difference in cost of ownership. I expect such difference will be significantly less comparing to the difference in cost of software production, which is in essence a difference in performance of programmers, which in own turn time is very expensive.

    Therefore, it is much better to compare how both technologies help individual programmers as well as their teams to work faster and to produce a code with less errors (debugging time and QA resources). That would be a function of how API is structured, how concerns could be separated, how customizable code can be and will programmers tend to hardcode "business logic" riles.

    Does anyone know such comparison of J2EE and .NET?

    --

    Less is more !
    1. Re:performance of programmers by dodobh · · Score: 2

      Hmmmm, I would rather pay for the better programmer.
      Run time might not matter for the desktop, but on the server side, it does matter a whole lot.
      Unless you are just comparing web applications, server side performance matters a whole lot.
      There is a *significant* cost difference between high performance apps and low performance apps in runtime. On low end hardware, Perl is 2-3 times as fast as Java for the same application (daemonized SNMP monitor for a few devices on a switched network). Oh, and Perl used less resources too.
      And I don't want Perl doing the truly high performance stuff either. I prefer to use C code.

      --
      I can throw myself at the ground, and miss.
  30. well duh by papskier · · Score: 4, Insightful
    Microsoft wrote the .NET version, while these "experts" wrote the Java version - I stopped right there. Of course if you actually have the people who created the technology in the first place they're going to be able to build a faster app - they know everything inside and out of the technology. It's ridiculous. Show me a comparison between a team of Microsoft employees and a team of Sun employees and I might consider it good enough to be annecdotal at best.

    Besides that, look at the line comparison in code - the .NET version was 11,000 lines and the Java version was about 2600 lines. Clearly what happened here is that the Microsofties decided to be smart about it and write all their functions inline - not pretty but fast. Whereas the Java coders invoked class after class after class - which looks better but all the instantiations and memory allocations of classes are a big performance hit.

    Why not just take an Intel chip architect and tell them to come up with something in byte code, I'll bet it'll knock the crap out of everything else!


    The point is, if you created the technology, of course you're going to be able to make it faster because of your intimate knowledge. Unfortunately, I didn't create .NET or Java, so I guess I'll have to judge them on the merits of their realistics pros/cons.

    --
    Crowded elevator smell different to midget. -Chinese Proverb
  31. Here are the reasons why this comparsion is BS by darthaya · · Score: 5, Insightful

    BS stands for bullshit.

    a little history of pet fight.

    the petstore was originally a demo application written by sun. it was a tutorial tool to demo how to use some new j2ee technologies, some best
    practices and good design patterns, a 101 course for j2ee. Nothing involved to run as a real world applicaiton or optimazed for that.

    then came the MS petstore for .Net. a design clearly aimed at performance and competition, MS declared their petstore is much faster than Sun's. It is a absurd and ridiculous marketing trick only MS could think out. (when they hire poople, they do ask them to think out of box by asking some stupid tricky questions, do they?)

    Since it is a marketing trick targeted to nono technical managers, j2ee camp reacted by their own performance petstore, Oracle has their own version
    running under oracle app server and db. I can not remember exactly the figure of the result, but it is at least 10 times faster than the .net one.

    MS lost this round, they must have thought very hard for a while, now we have this new report.

    The report published by TMC, the company has a web site theServerSide.com which has very high reputation in java community. MS obviously put a big money in the boss's hand and forced the report to be published. Some tricks they used now:

    1. a brand new beta version of .Net VS two outdated version of j2ee app servers.
    2. using Wintel machine for .Net. VS linux for j2ee. (linux version of j2ee usually is the slowest one because other venders always tuned to their own hardware first, then windows, last resource is given to linux, recently IBM
    and Oracle changed their priority i think.)
    3. using extensive cache for .Net VS using the slowest and now abandoned BMP Entity Bean for j2ee. (the new CMP Entity Bean not only faster, but also has very good cache machanism.and directly jdbc perhaps even faster if you only
    care about the speed. )
    4. MS invited to tune their application VS IBM, BEA, SUN have zero idea of this project.
    5. running db and app server in same machine. (J2ee is designed for distributed computing, that is why a high overhead for EJB technology etc)
    6. trying to give a impression that TSS j2ee experts joined this competation, but the fact is none of them involed. so they just fighted with a dummy made by themself.

    1. Re:Here are the reasons why this comparsion is BS by djaxl · · Score: 3, Informative

      Couldn't find the 10 times faster than .Net comparison by Oracle, but:

      http://www2.theserverside.com/resources/article.js p?l=PetStore

      http://www.oracle.com/features/9i/index.html?9iasf ast.html

      The latter gives a measurement of 538ms response time for 600 users on the Petshop. Since the Middleware Company PDF lists response time as 14ms for "J2EE AppServer A" and 10ms for .Net, at 750 users, there's obviously some difference in benchmarking practices. If anyone has a link to the "10 times faster" propaganda, please post.

  32. Re:J2EE vs. .Net by Twirlip+of+the+Mists · · Score: 2

    Are you trolling? Java server stuff isn't interpreted. Servlets and beans are compiled by the developer, while JSPs are compiled by the server (into servlets, incidentally) on demand. Some servers automatically compile all JSPs at start-up, while others wait for a request before compiling. Once all the JSPs have been compiled, Java server applications run as native, compiled Java bytecode.

    --

    I write in my journal
  33. Thought it was illegal. by www.sorehands.com · · Score: 3, Flamebait

    I thought that this type of benchmark was breaching the EULA from Microsoft. But, after reading the report I found it to be legal. Since the benchmarks put .NET into a good light, then it is ok. If the benchmark put .NET in a bad light, then the benchmark is not allowed.

  34. Re:Save your time by harvardian · · Score: 3, Informative

    Lines of code has a little bit to do with reliability. It's a well-known fact that the more lines of code you write (called SLOCs), the more bugs you will have (notes on this here). Although more SLOCs means more bugs, density of bugs does not increase with code length (IEEE report here).

  35. Lines of code has nothing to do with reliability? by Scotch+Game · · Score: 2

    Well ... that's not *entirely* true, no.

    Taken as a sole measure I would agree, LOC counts must be considered strictly in context with a number of factors: proper exception handling, feature implementation, platform constraints and requirements, chosen language ... to name a few.

    But all else being equal, and given equally "correct" implementations -- that is, two sample given implementations work equally well and according to requirements -- lines of code *can* be a valid statistic. Context is the key.

    Fact is, if you've got one "correct" implementation -- and I'll grant that correctness could be subject to debate in this instance -- and it takes 14,000 lines of code and you've got another that takes 2,000 ... Well, if the implementations truly were correct and fair examples, then it's a no-brainer to state that 2,000 lines of code is a helluva lot easier to maintain than 14,000, therefore making it more reliable and, possibly, scalable.

    LOC counts have been used in many, many code studies because they do represent a statistical measure of relative difficulty in implementation in certain respects.

  36. Re:Infringement.... by loconet · · Score: 2

    Well, thats why .NET came up on top, because they probably _did_ ask MS for permission ;)

    --
    [alk]
  37. Re:Save your time by Gaijin42 · · Score: 2, Informative

    There weren't tricks to get the descrepancy large. Sun wrote the original J2EE version. MS wrote the .net version. If Sun chose to write their code in an inefficient manner, (and you care about lines of code) then perhaps that tells you something about OTHER apps that sun writes?

  38. Re:J2EE vs. .Net by loconet · · Score: 2

    Compiled Java Bytecode != Interpreted.

    php,perl == Interpreted

    --
    [alk]
  39. Not exciting? by targo · · Score: 3, Insightful

    You would have been jumping up and down with excitement, had the results been the other way around. Let's try to have at least an illusion of objectivity, OK?

  40. Re:Infringement.... by pbranes · · Score: 2, Informative

    If you were to read the article, you would find this text at the bottom, "Update 2002-Oct-30 Several independent sources have now confirmed that The Middleware Company was indeed paid by Microsoft to conduct this report." Therefore, they obviously had approval from Microsoft to conduct the benchmark.

  41. Re:Save your time by LoRider · · Score: 3, Insightful

    So you don't think that maintaining 2000 lines of code as opposed to 14000 makes any difference in the scalability, reliability or ease of use.

    What's more scalable an application which is 7 times larger than it's counterpart? An application that new-to-the-project developers aren't afraid of because it's some big huge pile of code that takes countless hours to become familiar with.

    How about which application is more reliable. Is the one that is 7 times the size going to be more reliable and be easier to fix bugs.

    And our old friend ease of use. Let's see we have here 2 applications and one is 7 times the size as the other, which one will be the easiest and most fun for people to poke with a stick to fix all those annoying problems useability invariably comes up with.

    Now of course the 14000 lines in the .Net application could be the best designed application that is has everything well abstracted and adheres tightly to the MVC model of programming, but I don't give a shit 2000 lines of code always going to better then 14000 if they both accomplish the same goal.

    Writing efficient intelligent code is the way to go, not Microsoft's write tons of shit code and hope for the best mentality towards the development process. I am talking out of my ass a bit here, but I think I make sense - or do I?

    Peace

    --
    LoRider
  42. Maybe, except by tkrotchko · · Score: 2

    Since in MS's eyes, the ASP world should move to ASP.NET, how do you divorce ASP from .NET? You really can't.

    As to the rest of the article, it seems as if only the hopelessly naive or people with an axe to grind will pay much attention to reports like this.

    --
    You were mistaken. Which is odd, since memory shouldn't be a problem for you
  43. Re:Infringement.... by MORTAR_COMBAT! · · Score: 2

    prior consent from Microsoft might be assumed, when Microsoft is paying the company to run the benchmarks in the first place.

    --
    MORTAR COMBAT!
  44. Re:Save your time by Gaijin42 · · Score: 5, Insightful

    I disagree. If I write an elegant solution that takes up 500 lines, and you write a clunky solution that takes 1000 lines, who was more productive?

    Now if we come up with the same solution, but I just type faster, so i have 1000 lines done, and you have 500 lines done, who is more productive?

    Performance of a developer should be measured in (features implemented - bugs found)/time * some_constant_for_how_maintainable_the_code_is

    anything else, and you are lying to yourself.

  45. Uhhh, why is it suddenly newsworthy? by coupland · · Score: 3, Insightful

    Soooo..... When .NET beats the pants off J2EE it's not newsworthy, but when someone questions the results it is? Surely if one is worthy of posting on /. they both should be...

  46. You've got it reversed. by nobodyman · · Score: 5, Interesting


    Did you intentionally reverse the figures? The .NET version was 2000 lines of code, and the Java version was 14,000 lines of code

    Why not go to the source and draw your own conclusion. I looked at the report and it seemed more than fair. This was a straight up "best practices vs. best practices" competition, using Sun's recommended coding standards.

    It is helpful to note that this is the second such test that The Middleware Company performed. The Java folks squawked because the .Net version used stored procedures instead of dynamic SQL statements (Sun advises dynamic sql for easier portability and because they are idiots). This time, they addressed the Java camps' gripes and J2EE still lost!

    In my opinion you can pin the blame squarely on EJB's. They are bloated, the environments are a royal pain to configure, and they are S-L-O-W. Sun recommends that people use them, so it's totally fair that it was used against them in this comparison.

    Hate Microsoft if you want (I do), but you can't wear blinders and ignore the competition. J2EE blows. Get over it.

    1. Re:You've got it reversed. by rnd() · · Score: 2

      .NET is a very well designed platform. Did you notice that the Middleware Company's business is dependent on their Java knowledge?!? Sounds like they're saying "Sun, get your act together".

      --

      Amazing magic tricks

    2. Re:You've got it reversed. by Fugly · · Score: 2

      I have to disagree with a few of your statements. J2EE has its place. It's the best tool out there for many enterprise jobs IMHO. EJB's come at a cost but you get something back for that cost.

      I know that when you're doing work for myWannabeEcommerceSite.com, they might not appear to be very useful. However, when you're working in a real enterprise environment where you need assorted systems to interoperate and the flexibility to tie them together in new ways in the future, EJB's are a sound investment. There's a difference between having a 2-way intel box in the corner of your basement running a site with a couple thousand visitors per month and selling products to hundreds of thousands of customers per day on your website while taking phone orders, catalog orders, serving people in over 2000 retail stores and handling your own warehousing/shipping.

      EJB's are exceptionally useful in this environment. That's not to say that .Net isn't useful btw, I just feel much more comfortable running our mission critical servers on Sun and IBM hardware and operating systems. Until I'm sold on intel and windows as a reliable and secure server OS, .net will not me an option for me. And being as I would likely use Linux or FreeBSD first on intel hardware, it's probably going to be awhile :)

    3. Re:You've got it reversed. by pvera · · Score: 2

      You sir are completely correct. It takes an idiot to recommend dynamic sql over a stored procedure on a SQL Server 2000. Portability my ass, after you buy a license for SQL Server 2000 on a server farm you are not going to scrape it off and move on to Oracle, so all that crap about portability is an old scare tactic by Oracle.

      I spent a long miserable year building asp apps and being forced to use dynamic sql because my company was an Oracle shop and they were counting on charging the customer more a few months down the road to move up to Oracle. Once one of our high profile products started to choke under load so they let us switch to stored procedures. We had pages that used to load in 50+ seconds that as once switched to stored procedures started loading in 5. That's a 1000% improvement. The day I walked away from that job I promised myself that any and all future work I do on a SQL server environment is going to exploit stored procedures and user functions, portability be damned.

      Read the PDF, the Java folks had plenty of chances to rewrite their stuff. Had the second version of the .net app kept the stored procedures the results would have been much more embarrassing.

      --
      Pedro
      ----
      The Insomniac Coder
  47. Error rates by Animats · · Score: 3, Interesting
    What went wrong with "J2EE App Server B"? After two hours, it choked completely. But they don't say why. Even "J2EE App Server A" got 40 errors. The .NET servers supposedly completed the 24 hour load test without errors.

    Incidentally, all this stuff was run on Windows 2000. Somebody should try it on Linux.

  48. Re:.NET is a lot faster by Jugalator · · Score: 3, Funny

    .NET is a lot faster

    plenty of benchmarks on http://dotnetguru.org/


    Yeah, I see that... from the URL.

    --
    Beware: In C++, your friends can see your privates!
  49. The real question by Melantha_Bacchae · · Score: 2

    Speed isn't the issue. These are two different beasties with different purposes:

    J2EE is a language/platform on which to build tools to run your business.

    Microsoft's .Net is a johnny-come-lately Java-alike that is designed to be a last minute substitute for the Borg JVM (I kid you not, they actually called it that). It is the platform to run Millenium on so Microsoft can finally achieve world domination. Microsoft Research didn't spend all that time and money on an "operating system for the next millenium" just to scrap it, you know.

    So what do you want to do? Run your business? Or be a loyal vassal and bow to King Microsoft?

    Funny thing about thousand year kingdoms by tin plate dictators: they don't last a day when the one true King of Monsters comes to town. ;)

    Shinoda: "The age of Millennium."
    Io: "What does that mean?"
    Shinoda: "A thousand year kingdom. It wants to create a home for itself. There is one flaw in its plan: Godzilla."
    "Godzilla 2000 Millennium" (Japanese version)

    1. Re:The real question by rodgerd · · Score: 2
      J2EE is a language/platform on which to build tools to run your business.


      That'll be why the Java app servers kept throwing errors and crashing, while the .NET stuff just worked, right?
  50. I'm just waiting. by glh · · Score: 3, Interesting

    There will probably be another J2EE implementation that can "beat" the .NET benchmark. However, I think there is some degree of truth to this particular one. At our .NET User Group Meeting last night, we had someone from Microsoft actually talking about this benchmark. He didn't go into much detail on the J2EE side, but said that the MiddleWare company spent 10 weeks trying to get the J2EE implementation tweaked. So either these consultants are really incompetent on the Java platform, or there really is a significant performance difference.

    It's even more convincing in reading the article posted in the link (the "review" that is). Basically it was bringing up how the lines of code count was not correct because J2EE could have done a better job. Bah, that's a silly argument. LOC can't just be brushed off because it really does have something to do with the cost. More lines of code isn't just for "lazy programmers", it's also a factor when you have to think about MAINTAINING that code.

    However, I do buy the argument about not using the "latest and greatest" J2EE. So, I get back to my original point.. I'm just waiting for the next benchmark.

    So since the author complains about the PetStore app as being such a bad design, how about coming up with a new one and then comparing those? It seems to me like, no matter what, the author of the article doesn't believe .NET could *ever* be faster/better/etc. than J2EE. So really, it's a religious thing and I don't think any amount of proof will convince him. And I'm sure there are certainly others out there thinking that way. Of course the other camp also believes .NET is "all that".

    1. Re:I'm just waiting. by cs668 · · Score: 2

      It is interesting to see how the funding of benchmarks/reports can impact the outcome.

      Look at Ibatis JPetstore to see what one guy did with jpetstore in response to the .net version and its over inflated LOC difference.

      When looking at his example and documentation you can really see how easily you can sawy one of these benchmarks/reports.

    2. Re:I'm just waiting. by glh · · Score: 2

      I'd like to look into it a little more, but that's cool he got it down to a decent LOC. I wonder what he did to reduce the LOC from the TMC version?

      In addition, here is the "criteria" that TMC had to follow according to their report. I wonder if some of the criteria forced certain design decisions that caused more code.


      1. The J2EE and .NET implementations had to be 100% functionally equivalent with
      no behavioral differences.
      2. Both applications had to be created according to best-practice coding standards
      such that each serves as a valid design pattern that real customers can follow
      when building their own applications.
      3. Each application had to be a logical three-tier implementation, with the use of
      well-partitioned components to encapsulate middle-tier business and data access
      logic.
      4. The applications had to be designed such that they can each be easily clustered
      across multiple middle tier application servers for scale-out.
      5. The benchmarks had to be run with realistic application server and database
      deployment settings that reflect a real-world production deployment.
      6. All source code, data load and test scripts for the benchmark applications (both .NET and J2EE) have been published on the Serverside.com so that customers can
      replicate and verify the results. The source code, database schemas, and test
      scripts used in the benchmark, can be downloaded from: http://www.middlewarecompany.
      com/j2eedotnetbench /.

  51. was MS involved? by loconet · · Score: 4, Informative


    From their FAQ about the benchmark..

    Was Microsoft involved in this, did they fund this, where were the tests done?

    Yes, Microsoft was certainly involved, as the paper describes. The Middleware Company approached Microsoft regarding performing such an experiment. Microsoft provided the lab, which was located in Seattle, funded the setup costs, and reimbursed us for expenses, including travel expenses. The Middleware Company invested several man-months in this project for which it received no compensation. The activity took much long than we expected, and at various points, we also hired independent consultants experienced in appservers A and B to tune them or provide recommendations, at our own expense. The parameters of the lab were under the control of TMC. TMC controlled the testing process. TMC stated up front that TMC would write a report about the real results, no matter what they were. These experiments are time-consuming, and require resources. Without permission and some support from Microsoft, we would not have been able to conduct the experiment. We would like to have conducted many more experiments than we did, and hope to in the future. TMC stands behind the results of the tests that were conducted.

    Does the fact that Microsoft gave permission for this experiment and provided some support, invalidate the results?

    That is for you to decide. TMC stands behind the results of the tests that were conducted. Should there be other such experiments to be arranged in the future, we will not be able to do them without some assistance with the lab, setup, expenses, and we would hope for more support than Microsoft provided us with for this experiment.

    --
    [alk]
  52. They used BMP by vlad_petric · · Score: 5, Insightful
    ... and claim it's gotten them better performance ? With bean-managed persistence the developer writes the SQL code for accessing the beans; this gives a lot of flexibility, but prevents the container from doing a lot of optimizations.

    Anyway, such a comparison is flawed from the start. Bench suites should be developed by independent 3rd parties, or consortiums like SPEC and NOT by vendors.

    I actually don't find the results surprising. Microsoft's pet store is heavily optimized for an app server/SQL server; the standard EJB pet store should work with minimal tweaking on any EJB-compliant app server / SQL server pair.

    The Raven

    --

    The Raven

  53. Jackal Feed by waltal · · Score: 2, Interesting

    When a report is as complete and direct as this benchmark, it is interesting to see what the jackals go after. What body parts are worth flaming/roasting? In this case, ya'll missed two notable points:

    1. Two J2EE platforms by major vendors were tested. One really sucked for air (yeah, tell me performance doesn't matter!). Who were the vendors, all you Java experts reading between the lines? Would you buy that system?

    2. I understand that the .NET versions did not leverage stored procedures on purpose (apparently the first round of benchmarks got criticized for "non-portable" use of the DB!). I'd like to see that performance, because we are talking performance and not portability.

    Chew on this for awhile...

  54. Re:Save your time by mosch · · Score: 2
    Yeah,
    @k=unpack('C*',pack('H*',shift));for(@t=@s=0..255) {$y=($k[$_%@k]+$s[$x=$_ ]+$y)%256;&S}$x=$y=0;for(unpack('C*',<>)){$x++;$y= ($s[$x%=256]+$y)%256; &S;print pack(C,$_^=$s[($s[$x]+$s[$y])%256])}sub S{@s[$x,$y]=@s[$y,$x]}
    is much more efficient than
    mcrypt_ecb(MCRYPT_RC4, $key, $input, MCRYPT_ENCRYPT);
  55. Re:Save your time by LoRider · · Score: 2

    Actually I couldn't care less which one you use .Net or Sun but writing efficient code is the way to go. And my response was to someone suggesting that 14000 opposed to 2000 lines of code makes no difference.

    I am suprised though that .Net was less code, but what do I know.

    --
    LoRider
  56. Are there any reviews that show the opposite? by AxelTorvalds · · Score: 2

    Not surprised by the rigged review but are there any that show the opposite?

    1. Re:Are there any reviews that show the opposite? by the+eric+conspiracy · · Score: 4, Interesting

      Oracle did a study showing the reverse with their app server and database.

      http://otn.oracle.com/tech/java/oc4j/pdf/9ias_ne t_ bench.pdf

      In Oracle's study, they achieved results that were as much as 22x faster than .Net

  57. Re:J2EE vs. .Net by rodgerd · · Score: 2

    Perl is not interpreted and has not been for a long, long time.

  58. Re:J2EE vs. .Net by Svartalf · · Score: 2

    Bytecode == Emulated CPU == Interpreted...

    --
    I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  59. Re:Save your time by jaaron · · Score: 2

    Okay, this is a troll, but I'll bite.

    First off, you obviously didn't take time to read the articles. Do you have any idea what application we're talking about? It's the java "petstore" application, which specifically was not written for preformance, but for readbility and as an example for proper coding practices. MS wrote the code as an example in performance, but not as an example of good design patterns (although they claim it is).

    From the article: It's quite amusing: Sun released the initial PetStore in order to show good architecture and use of design patterns but not performance, and now MS releases a PetStore that *does* have good performance but which is completely awful as far as use of good design patterns is concerned but which is supposed to show how to build .Net apps. Ironic.

    How Sun writes a tutorial has nothing to do with how Solarius or their other apps are written. If anything, it shows that Sun was actually trying to teach developers about it's product, while Microsoft was just competing for headlines with no care about proper coding practices and about teaching such practices to the developers using .NET.

    --
    Who said Freedom was Fair?
  60. Because the original report was -1 Troll by TheConfusedOne · · Score: 2

    The idea was to not feed the Troll. The methodology of the whole benchmark was at the very least compromised by the active participation of one side and the complete lack of participation from the other.

    (MS did all the code writing and tuning for the .NET implementation. The other side was labeled App Server A and B since they couldn't even be bothered to get permission to publish benchmark results let alone have the App Server companies come and do some tuning.)

    Even if the rest of their claims about "pain staking optimization" of the J2EE code is true they would have to optimize it separately for the two App Servers to be comparing apples to apples.

    So, the original thought was to ignore it and hope it would go away. Obviously many people weren't ignoring it so it hit the "newsworthy" threshhold.

    --
    --- I wish I could hear the soundtrack to my life. That way I'd know when to duck.
  61. Developers, developers, developers! by Inoshiro · · Score: 2

    Lines of code has everything to do with ease of programmer replacment, maintenance costs, and flexibility.

    This is about being able to replace your programmers easily if one of them is a pompous ass, being able to move the code base around and adapt it quickly if your OS provider is a pompous ass, and being able to keep maintenance costs down because the overal structure is smaller.

    --
    --
    Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
    1. Re:Developers, developers, developers! by Fugly · · Score: 3, Insightful

      Lines of code has everything to do with ease of programmer replacment, maintenance costs, and flexibility.

      This is about being able to replace your programmers easily if one of them is a pompous ass, being able to move the code base around and adapt it quickly if your OS provider is a pompous ass, and being able to keep maintenance costs down because the overal structure is smaller.


      Bullshit. Organization, design and documentation of code has everything to do with ease of programmer replacement, maintenance costs, and flexibility. It's about quality, not quantity. I can have 50,000 lines of code that are split into well concieved, well documented modules that conform to accepted standards. A new programmer can come on board and maintain this code easily. I can have 3000 lines of crap code that they guy who wrote it can't maintain a year later.

  62. Re:Save your time by Fugly · · Score: 3, Insightful

    I disagree. If I write an elegant solution that takes up 500 lines, and you write a clunky solution that takes 1000 lines, who was more productive?

    Now if we come up with the same solution, but I just type faster, so i have 1000 lines done, and you have 500 lines done, who is more productive?

    Performance of a developer should be measured in (features implemented - bugs found)/time * some_constant_for_how_maintainable_the_code_is

    anything else, and you are lying to yourself.


    I've said it here before and I'll likely say it again. Lines of code is an absurd measure of anything. It means nothing. A 1000 line source file can be more "elegant" and more readable than a 500 line source file and visa-versa.

    And as for your typing speed comment. Anybody who thinks that even 5% of programming is typing the code in has a lot to learn. Good programming is design, documentation, testing, and refactoring. Typing in code should be a relatively small part of your job as a programmer. If it's not, most likely you're doing something wrong. If you're worried about your typing speed, you're doing something wrong. If you can tell me how many lines are in a single source file you've created without checking, you're probably doing something wrong.

  63. Re:Register was Wrong by jaaron · · Score: 2

    Apparently I'm a sucker for trolls today.

    The article has nothing to do with linux. It's about JAVA vs .NET which is a whole different ballpark. You're arguement about MS and their fine products makes no sense in this case. The Java programming language and environment is much more mature than .NET and is being used for many critical applications. When it comes to enterprise computing, Microsoft is a newbie and is just starting to produce something to consider, and if you would take time to really investigate the matter, you'd see that the benchmarks which suggest .NET as faster are generally flawed.

    --
    Who said Freedom was Fair?
  64. Re:The sad thing is... by pmz · · Score: 2

    It's about loving Freedom

    Yes it is. Microsoft is frustrating to no end. They are like a playground bully that kicks kids down every time they try to get up. They are the class clown that twists and repeats other people's words to nullify any chance at an intelligent argument. Microsoft's behavior invokes an irrational emotion that in a natural setting results in such a bully being slaughtered in revenge.

    Microsoft to many software engineers is the conceptual equivalent of industrial-age barons, factory housing, and company stores. They are corrupt, everyone suspects or knows that, but so many people are financially enslaven to Microsoft's business model that a revolt is unthinkable.

    I predict that the next decades of the "information age" will mirror the aftermath of the 19th and 20th century industrial monopolies, where only intense victimization of tens of thousands of workers stirs a largely ignorant and sluggish Congress into action.

    As long as the masses of people implementing IT "solutions" are so damn ignorant of how thoroughly they are being so stabbed in the back by Microsoft's breadth of lock-in and leeching contracts, we will not see freedom of information, press, academia, nor social equality in the software and internet industries.

  65. Re:Save your time by Thomas+Charron · · Score: 2

    Not really. I've seen several line apps that aren't maintanable specifically becouse they rely on functionality provided by the platform, so when things change, as they quite often have in the J2EE world, keeping up to date pretty much requires scratch rewrites..

    --
    -- I'm the root of all that's evil, but you can call me cookie..
  66. Damn... by Find+love+Online · · Score: 2, Insightful

    It seems like these guys spent a lot of time optimizing for Java, only to see it get the smack down. Of course, there is the issue of how competent they were, but the fact remains that .net is apparently faster for this kind of thing.

    Its kind of crappy that they couldn't name app servers due to 'server B's license, especially since Server B sucked so bad...

  67. Did no one read the other article linked to? by j3110 · · Score: 5, Informative

    I've been using J2EE now for a while, and they made some hideous performance mistakes. The #1 mistake they made was BMP. BMP, for those of you who don't know, is an object persistance model where each object manages it's own storage. It's pretty obvious that for N rows of a database that map to N objects, you will need N SQL statements. That's just wrong and bad. Not only is it the slowest way to access the database, but it requires 10x the amount of code to work with. The other two (common) choices are CMP and JDBC in session beans (others are JDO and other ADO-ish Java API's that wrap JDBC). CMP would require 1 SQL statement to retrieve N rows, and requires no SQL be written, works on all RDBMS's, and you only have to write a skeleton object. It's about a magnitude of 3 faster than CMP. Directly connecting from the Session beans(pretty much a CORPBA object) will make you write your own SQL, but will increase performance yet further(since you can use stored procedures or just do mass updates and still maintain database independance).

    The next thing they did is exclude JBoss, one of the most popular J2EE servers. It's open source, and easy to use. One can only conclude the intentionally left it out because .Net could never hold up to best price/perf. against free. JBoss may not be a speed deamon(it's not slow at all though), but if you disable debugging(on by default), use IBM JDK 1.3.0 and MySQL with innoDB, it will easily win price/performance.

    After reading that TMC had taken money from MS, the only conclusion that I could come up with is that it was rigged. No real J2EE expert would ever make those mistakes. Even free E-Books on TSS will tell you not to make mistakes like that.

    Basically, this really hurts the Java community to see TMC take stabs at J2EE after all it's put into it. Either that or we are to conclude that TMC is unfit for the J2EE educational services they offer. Either way, they may have helped .Net get a foothold, but they are loosing theirs fast.

    Anyone that doesn't know that much about J2EE or doesn't take a look at the code will think this is like the florida recount fiasco, but it really is a legitamit claim that this version of the petstore was really written by A) a monkey, or B) a MS fundee.

    --
    Karma Clown
  68. Fix it then! by jdevons · · Score: 2, Interesting

    If there is a problem with the Java version, can someone fix it?

    Everyone here is all bothered that MS was able to work on their version, but that Sun wasn't asked to do the same for its version.

    Sun can take both the code used in the .NET version and the code used in the J2EE version and compare them and THEN FIX IT.

    If they choose not to do so, or are UNABLE to do so, then we know which is better FOR THIS PARTICULAR TYPE OF WEB APP.

    Middleware did GREATLY improve the performace of the J2EE app, but there are obviously quite a few flaws in their design (from the comments). So someone who is pissed off about this should stop wasting their time ranting about it and correct the problem, then publish the code and the benchmarks.

    --
    I do everything the voices in my head tell me to...
  69. Bytecode by toriver · · Score: 2

    Bytecode == intermediate code fed to a just-in-time compiler == native code on the other end.

    It has been that way for years. You may force the VM to use interpreted code with -Xint, but why would you?

    After all, the bytecode (MSIL) -> native code is EXACTLY what Microsoft does in .Net as well. Except that the .Net runtime caches the native binary for later use, something Sun's Java VM doesn't.

  70. Re:J2EE vs. .Net by toriver · · Score: 2
    the JVM itself still has interpreted code in it

    No, the JVM is all native (it has to be in order to run). You must be thinking of the "system classes", but they, too, are JIT-compiled.

  71. Re:Save your time by Frank+of+Earth · · Score: 2

    Haha I know the answer to this question!

    100 lines of .NET code weights the same as 100 lines of java code

  72. Re:Apples and Oranges - not quite by richieb · · Score: 2
    More nitpicking - Struts is a framework that uses JSPs (actually TLDs). JPetstore connects to a database, so it has to use JDBC. The only thing that's missing is EJBs (maybe there is a good reason for this ;-))

    --
    ...richie - It is a good day to code.
  73. About scalability by Fugly · · Score: 2

    One thing that never seems to be taken into account when it comes to scalability...

    I'd rather maintain a cluster of 5 high end Sun boxes than 50+ wintel machines. Maybe most people don't view this as much of a difference but to me it sure feels like a huge savings in cost and frustration even though the initial purchase price is higher.

    1. Re:About scalability by Fugly · · Score: 2

      I have the luxury of not arguing it to by boss. We've been using sun servers since long before I was hired at my company. If I did have to argue for it, I'd obviously go out to sun's site and grab a bunch of meaningless statistics regarding cost generated by sun - it seems to work for the microsoft guys.

  74. Re:The sad thing is... by Junks+Jerzey · · Score: 3, Interesting

    It's not about loving Linux. It's about loving Freedom (TM).

    Realistically, though, we're talking about internet application development platforms here, not basic human rights. Being all high and mighty about not uing .NET is trifling at best, to say the least.

  75. Re:Save your time by sfe_software · · Score: 2

    Oh, one interesting fact, "the .NET version required 14,004 lines of code, while the Java version featured 2,096."

    Hm... the PDF document, as well as this page, both say the opposite: .NET had 2,096 LOC, while J2EE required 14,004 LOC. The dreambean link goes into detail about why the J2EE solution has so much more code, etc...

    It looks like you were quoting something -- where did you copy that quote from? Or was it just a misquote from memory?

    --
    NGWave - Fast Sound Editor for Windows
  76. Re:Save your time by sfe_software · · Score: 4, Informative

    Now of course the 14000 lines in the .Net application...

    I'm extremely curious, as many people have mis-quoted this figure. Where did you get this information? Is there another article that quotes this incorrectly?

    The .NET solution only had 2096 lines, while the J2EE one had 14,000+ lines of code...

    So much for Microsoft's write tons of shit code and hope for the best mentality :p

    --
    NGWave - Fast Sound Editor for Windows
  77. Did you read the other article? by sterno · · Score: 2

    I read the middleware company's conclusions and was sad to see that Java lost. It looked like everything was pretty legit (certainly more so than some past endeavors like this). But then I read the article refuting it. It seems that there's a substantial amount of optimizations that were not done on the J2EE code that could have had a huge impact.

    Basically when you get down to it, this is an impossible comparison to make. The architectures are different, the app servers are different, and the people writing the code are different. Trying to yield objective results out of such subjective measurements is impossible.

    --
    This sig has been temporarily disconnected or is no longer in service
  78. Precisely! Re:Save your time by WolfWithoutAClause · · Score: 2
    I disagree. If I write an elegant solution that takes up 500 lines, and you write a clunky solution that takes 1000 lines, who was more productive?

    That's exactly my point; perhaps I should have said negatively correlated. The 500 line solution is better- and the same thing written in certain languages tend to be more compact, and hence those languages are generally more productive. C isn't especially, C++ is often a little worse if anything, Java is more compact, Perl even more so.

    Of course compactness isn't everything; APL programs are very compact, but can be totally unreadable. Still, more compact languages are usually better, upto a point.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  79. Get a grip people by f00zbll · · Score: 2, Insightful
    Not everything in the world is a stateful application server. It makes absolutely no sense to compare a stateless application server to a stateful one. Go to .NET application server page and look at what it says. For those too lazy, it states emphatically .NET application server does not support stateful persistence management.

    if you want something stateful, you have to do it yourself. Anyone with a clue would never use EJB when all they need is a simple cache of Hashmap. The only thing that tells me is the consultants and the company that did the benchmark are either 1. idiots or 2. doing a poor job of hiding their bias. The fastest way to get blazing speed would have been to use a custom cache in resin with a simple hashmap that handles it for the webapp. Doing transaction in the database isn't the same as an application server that manages transaction in memory using Container Managed persistence.

    It's just the usual marketing bs, move on, nothing to see here.

  80. Criteria are no good if you don't follow them. by TheConfusedOne · · Score: 2

    Well, if you read the rebuttal supplied by one user then you'll see that they didn't live up to those items.

    1. There were behavioral differences with App and Display code combined on the .NET side.
    2. Best practices in J2EE are now aimed at the CMP EJB's in the updated EJB spec. Those weren't used.
    3. Why not a physical three-tier implmentation?
    5. They used a Beta version of MS code versus unknown versions of shipping J2EE servers.
    6. The code was reviewed and some major points were raised with the rebuttal.

    --
    --- I wish I could hear the soundtrack to my life. That way I'd know when to duck.
  81. Re:Save your time by sfe_software · · Score: 2

    ...in case you missed it in the hurry to flame me.

    I wasn't trying to flame, honestly. I wasn't aware of the Register's article when I posted that (nor did I see the other replies to your post). I was just curious why you (and a few others) had posted comments with the numbers swapped. Both sources that I read said something different, so again I was curious.

    Now you've answered my question. No harm, no foul :)

    --
    NGWave - Fast Sound Editor for Windows
  82. Yes. Re:Save your time by WolfWithoutAClause · · Score: 2
    After the thinking 1 or 3 lines of code doesn't really matter. Just the fact that it's 1 or 3 lines of wellplanned bugfree code.

    Yes, but experienced programmers tend to spend less time thinking and more time typing; and the thinking you do is often the same or similar for the different languages.

    Also, there are some subtle issues that increased program length gives- the chances of a typo increase with program length- compact code is often easier code, for example in TCL it can take one line to create a button on the screen, whereas in Java it takes about 4- and the Java code is more obscure, and you probably have to check the API to get it right. In C you may have to discard storage after use; in Java you don't need that code- less to break, less to think about. And so on.

    There's lots of little things- and it's not inevitable, it's just a correlation; that is mentioned in the literature.

    Making cross language comparisons is quite difficult; you'd have to take lots of software engineers, normalise for experience and give them the same task to write in different languages, and measure how long they took and how many lines popped out.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  83. Re:Save your time by WolfWithoutAClause · · Score: 2
    No. You're wrong. The software literature contains cross language comparisons- it shows programmer productivity is correlated with software brevity.

    There's lots and lots of reason- debugging is easier, the programming language is usually closer to the problem domain if the program is shorter, typing is easier, less typos mean that successful compilation happens more quickly, often looking up the APIs in books is needed less, etc. etc.

    Bottom line, everything else being equal, I'll take the shorter programming language in a heartbeat.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  84. The Java PetStore was never a benchmark by carlfish · · Score: 4, Interesting

    Here's the basic story.

    Once upon a time, Sun wrote a sample application, called PetStore, as a demonstration of various capabilities of the J2EE platform, and various techniques that might be helpful when writing J2EE applications. As such, it was deliberately over-engineered. A tiny shopping site doesn't need all the techniques they threw at it, it was just a context in which to deliver examples of coding pratices that might be useful in other situations. It was example code.

    Speed wasn't a goal. Keeping the LOC low was counter-productive to an application which is basically an example of different coding techniques.

    Microsoft saw this, and realised they had a cheap marketing opportunity. By rewriting the Pet Store in .NET, with completely different goals (speed and low LOC), they could score points just by issuing press releases. It's the marketing equivalent of saying "Hey! Our car is smaller and faster than your truck!" It's true, but meaningless.

    No matter that it was an apples to oranges comparison. No matter that the Pet Store could be rewritten in Java using Open Source frameworks with about the same number of LOC by one guy in his spare time. This is marketing, not reality.

    Charles Miller

    --
    The more I learn about the Internet, the more amazed I am that it works at all.
  85. Why No JVM On Windows Test? by cmholm · · Score: 2, Interesting
    Using Redhat 7.1 with jdk 1.3.1, the experience of our project team has been that the Linux jvm defaults to FORKING a new process for each java thread. If that's the behavior of the Linux jvm TMC was using, it could have skewed their results.

    What I'd really like to know is why TMC didn't test J2EE on the same Windows OS they tested .NET on. Were they getting paid to bash two opponents at once (Linux, J2EE)? If they really wanted to test J2EE, why not JUST test J2EE?

    --
    Luke, help me take this mask off ... Just for once, let me butterfly kiss you with my own eyes.
    1. Re:Why No JVM On Windows Test? by Znork · · Score: 2

      However, if you read the documentation on threading and forking under linux you would realize that it's actually not forking a new process. Read up on clone(2).

  86. Re:Save your time by Gaijin42 · · Score: 2

    which specifically was not written for preformance, but for readbility and as an example for proper coding practices

    Are you saying that performance shouldn't be taken into consideration when deciding what "proper coding practices" are?

  87. Plastic Puppy Poop by MaggieL · · Score: 2
    Astroturfing
    Or whatever properly calls the kind of FUD factory that TSS has turned out to be.

    It's not so much "astroturf", which looks like nice grassgoots from a distance but turns out to be bogus when you get a close look.

    It's more like fake plastic dog shit...looks unpleasant from a distance, but turns out to be phony.

    When I first encountered the site, I dropped them a note asking why all their streaming video was Windows Media when there were perfectly good Java streaming video applications.It seemed awfully curious at the time for folks claiming to be part of the Java community, ,and their response was extremely...well...

    From: Rickard <rickard@middleware-company.com>
    To: Margaret Leber <maggie@voicenet.com>

    Margaret Leber wrote:

    > Doesn't it seem a little ironic that your Hard Core Tech Talks are only
    > available streamed in Windows Media Player format?

    Cynical, yes, ironic, no.

    > Are there plans to
    > present this material in some more platform-independant format?

    Nope.

    However, we're investigating other ways of doing these kinds of interviews in the future, and your feedback is of course valuable.

    regards,
    Rickard

    --
    Rickard Öberg
    Author of "Mastering RMI"
    Chief Architect, TheServerSide.com
    The Middleware Company - We Build Experts!
    So...apparently the debunker of the "benchmark" used to be Chief Archetect at TSS. I have the feeling there's an interesting story behind all this...Rikard's blog should be interesting over then next few days.
    --
    -=Maggie Leber=-
  88. Re:Save your time by Fugly · · Score: 2

    I have no clue what you're talking about when referring to "The software literature" (and I don't really care frankly). I have been writing code professionally for a long time and have worked in shops with very easy to maintain code and very hard to maintain code. Documentation and the way code is broken apart and modularized is what matters. Not how much of it there is.

  89. Apples and Oranges by jaaron · · Score: 2

    using the design that Microsoft proposes as best for their product (apparently they forgot to consult you, though) versus the design that Sun proposes for their product.

    That's the problem though. These "benchmarks" are comparing different applictions designed to do different things. Sun does an app for an example of how to use J2EE technology. It wasn't designed for performance, in fact, in many cases the petstore approach is complete overkill. Sun knows that, most Java programmers know that. The petstore app has been heavily criticized for it. However, Sun's point was to show new Java programmers how the different J2EE API's work together. If some poor sap thinks that every app needs designed this way, well, they'll learn quickly otherwise I hope.

    Microsoft then takes an app designed for performance and compares it to one that isn't. It's apples and oranges here folks. That's the point. The arguement made here is that when the Middleware company redid the benchmarks and the Java petstore app, that they still didn't do it properly.

    If it turns out that .NET is faster, so be it. But let's have a fair race. That's all I'm trying to point out. That's all Rickard Öberg is trying to point out in his review.

    --
    Who said Freedom was Fair?
  90. Websphere is a load of crap - that's it proves.. by Axe · · Score: 2
    In case you did not noticed - server A is Weblogic, server B is Websphere.
    While comparison with custom coded .Net is a load of donkey shit indeed, comparison between A and B is entirely valid (same code, same optimization and tuning).

    So websphere is indeed crap performance wise..

    --
    <^>_<(ô ô)>_<^>
  91. Quite a leap by jaaron · · Score: 2

    Java is not perfect, granted. EJB's are not always best, granted. But to say that just because EJB's aren't always a good solution therefore "J2EE blows", isn't that a bit of a leap? There are alternatives to EJB's you know. It's possible to write a full J2EE app without ever touching them.

    --
    Who said Freedom was Fair?
  92. Re:Save your time by WolfWithoutAClause · · Score: 2
    I have been writing code professionally for a long time and have worked in shops with very easy to maintain code and very hard to maintain code.

    Me too. More than 15 years. And I have read the literature that you have no clue about. Still, there is a difference between writing code and maintaining code I suppose. Writing code is more to do with the language, maintaining code is more process oriented/limited in my experience. I have worked on several projects with very large systems (more than 10 million lines of code, more than 500 software engineers) there is very definitely a superlinear relationship between software size and maintenance difficulty. YMMV.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  93. Tutorials versus Production Applications by jaaron · · Score: 2

    Are you saying that performance shouldn't be taken into consideration when deciding what "proper coding practices" are?

    Yes. Now let me explain:

    You're right that performance is important, and teaching performance techniques is important; however, there are times when that's not what you want to teach.

    Example 1: Let's say we're going to teach a "hello world" application that displays "Hello World" in a web browser. Let's say I decide to do it with PHP or JSP or ASP and get the string from a database. Is that really the best way to print "Hello World?" No. Absolutely not. You'd just write the HTML and be done with it. In this case, you're trying to show how a technology works, not the best way to solve the "print 'hello world'" problem.

    Example 2: For my work I recently did a simple Jakarta Struts example. It basically just queried a table from one of several databases and printed it out in HTML. It was overly complicated for just this task (did validation, internationalization, muliple views...). Now if I really wanted to put this application in a production environment, is this how I would code it? Probably not. It's overkill for this particular example. But what I was teaching was the techniques of database transactions, validatation, etc. We have other applications in development that do need these features. So what I was teaching was not "How to overly complicate your application." but "A trivial example using complicated techniques you will one day need to use." The problem with this comes when developers cannot understand when such features are needed and when they're overkill.

    Back to our Java vs .NET example. I think the argument being made here is that Sun did a 'trivial' example to show how things work. Microsoft just wrote the (to use my previous example) 'html' version of 'hello world'. Is Microsoft's approach wrong? No, that's probably how you should write such an application. The problem comes when you try to compare and benchmark the two. So Middleware tries to rewrite the Java version to optimize it and it's still bad. Conclusion? Well, the whole point of this discussion is that Rickard Öberg claims that Middleware didn't do a proper job of rewriting it.

    I do agree with some other posters that it would be nice to see someone take the java petstore example and really do it right. Perhaps .NET would still win. Fine. That's great. But until then, spreading inconclusive results is only spreading more FUD.

    --
    Who said Freedom was Fair?
  94. Results Analyzed and Refuted. by occam · · Score: 2

    DreamBeans has analyzed the results and published their findings. They found a variety of biased reporting and outright lies in the original report. Their analysis is available at:

    http://dreambean.com/petstore.html

    In particular, the J2EE application has not been optimized and some obvious optimizations (e.g., not using deprecated, inefficient API calls!) have been ignored. The J2EE application has been designed to do much more work storing data than the streamlined .NET version. Finally, they note that the .NET app is far from a model of application design (as MS claims).

    Read their report for the juicy details (not very long).

  95. Re:Save your time by a_n_d_e_r_s · · Score: 2

    The interesting thing is that every time a Micosoft story are shown on Slashdot several people come out and proclaim time and time again that it's all part of huge Slashdot anti-Micosoft conspiracy.

    I wonder why so many people seams so interested in pointing out that non-existant conspiracy instead of the real facts.

    They complain and writes a lot of off-topic posting about this proclaimed great conspiracy. Strangly it makes me come to think of advertising - by repeating someting very many times some people will start to think that what they say might be true - even though it looks more like Micosoft usual FUD tacticts. Like the time thay had a ad-person from a firm they hired switch from Mac to MS software so that she could write a positive review of the experience.

    This whining loooks more like an anti-Slashdot compaign from Microsoft fanatics.

    I think the problem is that you and a lot of other people should know that if Micosoft stopped being a bully and became a more well-behaved company - it would not get so mush bad press on Slashdot and other places.

    Any company that use illegal business practice will have to bear their own self-inflicted burden of badwill.

    --
    Just saying it like it are.
  96. Here are the reasons why you are wrong. by sheldon · · Score: 2

    I actually read the report, and am familiar with the Loadrunner tool they used.

    1. They tested both version 1.0 and 1.1 of .Net to show the difference.

    2. They actually used Windows 2000 machines for J2EE, it's mentioned on Page 15. They stated they benchmarked both linux and Win2k, and then picked the best result. For App server A, Win2k performned better. For App server B, they were both the same(i.e. equally bad from the looks of the results).

    3. I encourage you to rewrite the app using this new technology and run some benchmarks to prove your hypothesis.

    4. The people running the benchmark were familiar with the J2EE world and did involve other experts to aid in tuning both J2EE and .NET.

    5. According to the test lab configuration on Page 12, there were two Proliant 8500s for the database servers and another 8500 for the web/app server. I'm going to assume you meant web and app on the same server, or you just don't know how to design n-tier apps. BTW, .NET is also designed for distributed computing.

    6. Except for the Middleware group's experts. Check their website, they are a well regarded Java training/consulting company.

    I remember the same type of outrage when the Mindcraft benchmark showed IIS faster than Apache. Everybody claimed they were biased, they did it wrong, whatever.

    The truth was... They were right, and some intelligent people in the Linux community looked at the bottlenecks and tried to fix them.

  97. Re:Save your time by Fugly · · Score: 2

    Gee, thanks for the references. "the literature" is so much more specific than "the software literature". I'm sure everybody knows exaclty which works you're talking about now. There can't be more than what, 5-10 books written on the subject of software development.

    Any argument that says code size is relevant is inherantly flawed. Difficulty of both writing and maintaining code increases and decreases with many factors. From my personal experience, the number of lines in your source code is not one of those factors. Major factors I've found include but are not limited to the following:

    1) How well the problem is defined and communicated by the people demanding the software. (HUGE deal - probably more important than anything else I've encountered regarding the success of a programming endevor)
    2) The inherent complexity of said problem.
    3) How well that problem is divided into managable and intuitive smaller taks by the software architect.
    4) How well the system is documented outside the source
    5) How well complex areas of the code are documented within the source
    6) How much planning is put into development enviroments and development processes (choice of IDE's, build environments, test enviroments, source management, etc.)

    There is an obvious correlation between code size and several of these factors. However, correlation is not causation and good design in some of these areas may make code larger while other may make it smaller.

    I have worked with applications that have had comparatively small codebases but were extremely hard to manage due to how poorly that code was broken up and documented. The codebase I currently work with on a day to day bases is enormous. I don't know how many lines of code it surely spans thousands of lines of code. It is the easiest code I've ever worked with in terms of maintenance and extension. Did it take us longer to create than the original code? Maybe a little but the cost savings to the business in maintenance and extension will be huge.

  98. Re:Save your time by WolfWithoutAClause · · Score: 2
    Any argument that says code size is relevant is inherantly flawed.

    In a sense true, but also any argument that says that code size is irrelevant is inherently flawed also. In fact as you point out:

    There is an obvious correlation between code size and several of these factors.

    But that's exactly my point. And if it correlates over parts of your list, then the sum of the factors correlate also. It is not a perfect correlation, but the correlation is there.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  99. Re:Save your time by Fugly · · Score: 2

    You either didn't read my post well or you're choosing to not respond to my argument. I said, there is a correlation but it is not as simple as code size goes up = bad, code size goes down = good. Some good practices may increase code size where other ones may decrease it. You end up with a valueless measure.

  100. Re:Save your time by WolfWithoutAClause · · Score: 2
    You either didn't read my post well or you're choosing to not respond to my argument.

    Mostly the latter, your argument is missing the point, still.

    Some good practices may increase code size where other ones may decrease it.

    Mostly or completely irrelevant. We are talking about different languages not different designs.

    Ok, based on your argument, if I'm not interested in portability I might as well exclusively use assembly language for everything. More lines of code, but since lines of code is a valueless measure that doesn't matter. Right? Wrong!

    If you've done any assembly language you'll know it takes considerably longer than, say C; for the same algorithm.

    Why? What is it about certain languages that makes them harder? Why do scripting languages exist? Why is a program in Java very often shorter and more reliable than the same program in C++?

    Another question is why do scripting languages like Perl exist? Answer, because many times it's quicker to use than to do the same thing in C, again you end up with less lines of code for reasonably big classes of designs.

    I'm not claiming that lines of code is the answer, I'm saying it is well correlated with the answer; the true answer is things like, in C++ I have to remember to free the memory, sometimes I forget, but in Java it does it for me and I can't forget, and I don't have to write extra code to do it.

    But the bottom line is, two programs coded for the same algorithm (in DIFFERENT languages), have different reliabilities and different lengths. The shorter is usually more reliable, needs less coding, less debugging, less bug fixes. Design time is about the same, of course.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"