Another J2EE vs .NET Performance Comparison 533
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.
Some of us (Score:3, Insightful)
Not a good option during these bad economic times.
Hmmmm. (Score:4, Insightful)
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.
Re:The sad thing is... (Score:3, Insightful)
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.
Quel suprise (Score:5, Insightful)
One of the more interesting lines of commentary attached to the original article on TheServerSide was that "the community" should all band together and build a version of the Pet Shop which'd run faster in fewer LOC and on less hardware than the .Net equivalent while keeping to Sun's recommended best practices, thereby demonstrating the overarching superiority of Java and open source (or something like that.
Or, alternatively, they could choose to sit with their heads in the sand and spread fud about how Microsoft bought The Middleware Company, while waiting for the .Net train to run them over.
Sun shills, Microsoft shills, what's the difference?
Re:Performance isn't most important (Score:2, Insightful)
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.
Re:Save your time (Score:3, Insightful)
This isn't some sort of a 'I can do that task in *3* lines of code, Jack!' contest..
Price/Performance page 25 says it all (Score:5, Insightful)
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
Re:Performance isn't most important (Score:2, Insightful)
Performance is an issue in enterprise applications. The difference between buying 50 servers and 100 servers matters.
Re:Performance isn't most important (Score:5, Insightful)
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.
Yeah, but... (Score:5, Insightful)
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).
Re:Hot News Flash -- Java Slow! (Score:4, Insightful)
I've done some fiddling of some rough benchmarks myself..
This isn't really a
It's not a BAD way to do it. Just as CORBA isn't really a BAD way to handle RPC calls. It's just rather large and has significant overhead.
The numbers presented actually look pretty much on par, although my local fiddling only went to the extent of using 10 clients connected to the network to beat on the machines..
Sheesh (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.
I have no problem with microsoft's coders.. (Score:5, Insightful)
I have deployed two different production systems off of
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.
Now, if Microsoft's business guys would just follow suit.
Apples and Oranges (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 [ibatis.com] 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.
It's the query that matters (Score:5, Insightful)
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?
Re:Some of us (Score:2, Insightful)
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 [slashdot.org] 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...
well duh (Score:4, Insightful)
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
Here are the reasons why this comparsion is BS (Score:5, Insightful)
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
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
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
2. using Wintel machine for
and Oracle changed their priority i think.)
3. using extensive cache for
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.
Not exciting? (Score:3, Insightful)
Re:Save your time (Score:3, Insightful)
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
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
Re:Price/Performance page 25 says it all (Score:5, Insightful)
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.
Re:Save your time (Score:5, Insightful)
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.
Re:Performance isn't most important (Score:5, Insightful)
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
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
Uhhh, why is it suddenly newsworthy? (Score:3, Insightful)
Re:well duh (Score:1, Insightful)
So according to your theory, the Javaites used inline, and they were still slower.
But also pointed out, does length of code really matter beyond time of development?
They used BMP (Score:5, Insightful)
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
Re:Some of us (Score:2, Insightful)
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.
Re:Performance isn't most important (Score:3, Insightful)
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.
Re:Save your time (Score:3, Insightful)
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.
Damn... (Score:2, Insightful)
Its kind of crappy that they couldn't name app servers due to 'server B's license, especially since Server B sucked so bad...
Re:Price/Performance page 25 says it all (Score:2, Insightful)
I further believe that the
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
Re:Some of us (Score:3, Insightful)
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.
Re:Final Conclusion (Score:4, Insightful)
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.
Get a grip people (Score:2, Insightful)
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.
Re:Developers, developers, developers! (Score:3, Insightful)
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.
Re:Some of us (Score:2, Insightful)
I suppose there's always the possibility of some people actually liking
As someone who's used
All it is is Java, except they're calling it "Visual Basic
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
In conclusion, why use
Just my $0.02, anyway.