The Second Coming of Java

download The Second Coming of Java

of 26

Transcript of The Second Coming of Java

  • 8/3/2019 The Second Coming of Java

    1/26

    Search... Submit QueryMenu Tags Categories

    Home

    RSS Feed

    E-Mail

    2011 (120)2010 (98)Uncategorized (72)

    2009 (22)

    Apple (45)Google (37)Microsoft (27)cringely (21)Steve Jobs (16)IBM (13)

    iphone (12)Yahoo (10)Cringely Startup Tour (10)Obama Administration (9)

    Android (9)2011 predictions (9)Internet (8)Kauffman Foundation (8)

    data security (7)financial crisis (7)Sony (7)

    AOL (7)Intel (6)facebook (6)Oracle (6)

    AT&T (6)

    Netflix (5)2010 predictions (5)HP (5)Steve Ballmer (5)Leo Apotheker (5)Hewlett Packard (5)T-Mobile (5)Obama (4)

    Wall Street (4)recession (4)Adobe (4)

  • 8/3/2019 The Second Coming of Java

    2/26

    FCC (4)Bill Gates (4)

    I, Cringely

    SearchThe second coming of JavaOct 12th, 2011 @ 10:02 am Robert X. Cringely Skip to comments

    Theres a continuous revolution takingplace in web development as platforms and tools evolved first to handledynamic pages and now cloud services. But sometimes what goes aroundcomes around so Im predicting a resurgence of Java and Java-likelanguages as rotating storage goes into decline. Heres why.

    In the beginning of the web we wrote web apps with Perl and C++because thats all we had. This sucked.

    C++ is awesome for anything requiring intense performance but becauseit operates at a comparatively low level (closer to the silicon) C++ is veryhard for dopes like me to use. And in a way its an insult to the language,which gets bored waiting for databases and network requests.

    To avoid the complexities of C++ we turned to Perl which was fast towrite in but wasnt ready to be a web server. And Perl had no frameworksto help write web apps so we wrote a lot of boiler plate crap every time

    just to get started. Sure CPAN eventually brought libraries to help but itwas still fragmented.

    When Java arrived it wasnt so interesting that we had Java, it wasinteresting that we had the Java Virtual Machine. JVMs took care of

    cleaning up memory and automatically profiling and optimizing ourprograms tasks that had to be done by hand back in C++.

  • 8/3/2019 The Second Coming of Java

    3/26

    Java also had threading really well integrated from the start so we couldhandle many requests at once which was starting to become a problemby 2005 or so. Multicores introduction hit just at the right time for Java,too. Compiled Java is a very high-level machine code but is a standardthat JVM engineers have had more than a decade to tune so it works very

    well.

    .NET was really just another Java for Windows. Nothing is fundamentallyawesome about it over Java except that the engineers got to learn from

    Javas mistakes.

    Javas performance was no C++ but it was way better than perls andagain, we didnt needall that much. What we needed was faster

    development and we got it.Yet in the last few years since, say, 2007 weve been moving away fromJava and .NET for web development and back to interpreted dynamiclanguages like Ruby. These are slow as molasses (though now our CPUsare much faster) but easy to program for a broader, younger, and maybeless experienced crowd of developers. Prototyping new websites andapps has become very easy, which is why there are so many bad onesout there.

    The difference between the old days of Perl and today is that weve madethe realweb server in C++. So performance in Ruby is helped by a lot ofwork done in C++. Since every app needs to do that work, we can write itonce and lay Ruby on top to make connections, talk HTTP, etc.

    Under Ruby, we put C++. On topof Ruby we put the Rails webframework. Its not very common to actually code anything in Ruby. You

    pretty much only see people coding Ruby while using the Railsframework which governs the whole thing.

    You can replace Rubyhere with Python, Djangoor Groovyand it is stillcorrect.

    Notice the transition? We started with Perl, went to Java, then came backto Perl! The reason we didnt literally do that (actually go back to writing

    in Perl) is because the kids who wrote Rails were too cool for Perl, whichthey saw as old school. But Ruby has nothing on Perl. Whats brilliant isthe Rails web framework, which came about because of what peoplelearned writing web apps in Java. There are lotsof web frameworks in

    Java, but that was part of the problem knowing which of the many Javaweb frameworks were any good.

    Ruby is easier than Java. It runs something like seven times slower butwho cares? Were still waiting for the database. And if you are a newdeveloper you can learn Rails and be one of the cool kids.

    Java has all the fantastic data structures you learn about in school while

  • 8/3/2019 The Second Coming of Java

    4/26

    Ruby has only hashtables and arrays. But if you dont give a rats assabout performance you can shoehorn anything into hashtables andarrays. Thats why prototyping is so fast in Ruby.

    Yeah, but theres a problem looming for Ruby and Rails (Python, Groovy,

    etc.) and it is that web frameworks based on interpreted, dynamiclanguages only exist at all because disks are just so damned slow. Whathappens to these frameworks when disks get faster or disappearentirely?

    A modern disk seek is around five milliseconds. That means we can getonly about 200 disk seeks per second. Every non-cached database accesswill do several seeks (BTree datastructure, Mr. Smartypants) and every

    web page usually requires several database accesses to construct thepage. In other words, its not uncommon to take half a second in justdoing disk seeks for your local database! And of course it gets worse,much worse, if seeks across the network are involved.

    But if you replace spinning disks and moving read/write heads with SolidState Disks (SSDs) and no heads at all, local seek times drop to zero.Thats why Ruby and its surrogate languages will eventually disappear.

    When SSDs gain enough capacity there will be a shift from the Rubyworld back to the Java world. Not for prototyping, because, well, itsprototyping. But simply because the statement Ruby is incrediblyslowbut I dont care because my database is slower will no longer be true. Atthat point Ruby (Python, Groovy, you name it) becomes the bottleneck.

    The big story here (since from the comments below it apparently wasntobvious) is the JVM. Ruby is already migrating to that JRuby as will all

    similar tools. So far, it just hasnt mattered that much but it will.Categories: 2011Tags: .NET, C++, Django, Groovy, Java, perl, Python, Rails, Ruby, SSD, webdevelopment

    198 Responses

    Bryce1 mo, 3 wks ago

    1.

  • 8/3/2019 The Second Coming of Java

    5/26

    Wow no comments? Guess there arent manyprogrammers/developers out reading today.

    John Handelaar1 mo, 3 wks ago

    Youre assuming that, with interpreted languages that can writeHello to a web page in one line of code, and opcode caches inplace, we care enough about another 10ms to ditch a language thatlets us spit something out in a web browser in one line, and instead

    use one that needs 30 lines of boilerplate and a compiler to achievethe same end.

    I think thats a rather bad assumption, sorry.

    2.

    Henrique Lobo (Kico)1 mo, 3 wks ago

    Hi,

    this time I didnt get it. If slow database access is a bottleneck forthese interpreted languages, shouldnt the SSD solve this problemand, with this, get more traction for these languages like Ruby?

    3.

    Marcos1 mo, 3 wks ago

    But Ruby has nothing on Perl.Not a programmer, are you Robert?

    What is outstanding to me lately is the massive speed up thatinterpreted languages have had, fueled by none other than thenasty but ubiquitous JavaScript. Compare the performance of

    Apples Nitro or Googles V8 vs the speed of anyones JavaScript inthe mid-90s. Its unbelievable. And Facebook is coding in PHP andthen generating C++ from it, for crying out loud!

    Given all the research and effort going into speeding up interpretedlanguages, I dont think its fair to say that they are as inefficient asthey used to be. And often, developer efficiency trumps runtime

    4.

  • 8/3/2019 The Second Coming of Java

    6/26

    efficiency. I wouldnt count interpreted languages out just yet Isee more people using Python, Ruby, Tcl, PHP, JavaScript for largesoftware development efforts than we ever way with Perl some

    years ago.

    alsanan1 mo, 3 wks ago

    Horribly wrong. I see that this is not your strong area. Well, for astart you dont even talk about PHP (far more used than python,

    perl or ruby). No mention about Javascript, present in any browser.Even if you are specifically focused on server side, you make yourpoint about the speed of disk access. Well, some years ago a newlayer based on mem was placed in order to reduce the time of theresponses. Have you ever heared the word memcached? Just scoreone fail with this article. I hope the rest (where I dont have theknowledge of this) are not such wrong.

    5.

    muelnet1 mo, 3 wks ago

    bob, agree with most everything except one thing. Java isnt comingback, the JVM is. Just look at Twitter. Scala, clojure, etc., are the next

    wave of the JVM, not java.

    6.

    Big T1 mo, 3 wks ago

    I see Java surviving in the enterprise for a long time, but I dont seeits resurgence for web development, especially since theinterpreted cool languages are evolving faster than Java. Now, ifOracle releases a new version of Java with cool features (andremoves the crappy generics) thats not backwards compatible,then it might go somewhere. At my current job, new developmentis being done in Ruby and Erlang, and I have been moving non-corecode of my project to Groovy.

    7.

    8.

  • 8/3/2019 The Second Coming of Java

    7/26

    Neil O1 mo, 3 wks ago

    Theres one more piece to consider.

    I read this article as comparing the performance of the JVM versusany newer language interpreter, and there are many examples ofthose newer languages being ported to the JVM or the .Net CLR. e.g.

    Jython and/or IronPython and JRuby, Scala, Clojure, Bigloo, etc.

    If faster storage dictates faster web application frameworks, thenno reason why these alternate languages cant play in the samespace.

    Frankie DiBaker1 mo, 3 wks ago

    Bob,

    JRuby anyone?

    I think you are missing the point on Rails. While the framework isgreat for prototyping it also provides convention over configurationwhich a lot of java web frameworks prior to rails completely missedon (Struts anyone?). Its been a couple of years since I looked backinto Java web frameworks but my understanding is that not muchof this has changed as a lot of Java engineers that I know have

    shifted over to Rails.

    Ruby is just a language. The type system, syntax, testingframeworks are what make it powerful and efficient. All of this canbe run inside a JVM via JRuby so that removes a lot of thearguments you make in your column.

    There is even a JSR for support for dynamic languages runningwithin the JVM.http://en.wikipedia.org/wiki/JSR_292

    I dont see Ruby/Rails falling out. Just a natural competitor to theJava camp.

    9.

    CHLTX1 mo, 3 wks ago

    10.

  • 8/3/2019 The Second Coming of Java

    8/26

    Fundamental Law of Optimization: If you speed up whatever is youare doing by making something run faster, you get fairly smallimprovement in overall performance. If what you want is reallylarge improvement in overall performance, you need to figure outwhat it is that you are doing that is not needed, and quit doing that.

    That factor will overwhelm choice of language, often by severalorders of magnitude.

    Big T

    1 mo, 3 wks ago

    Agreed.

    11.

    Stephanos Piperoglou

    1 mo, 3 wks ago

    Im not sure I buy your argument and Im a Java coder by trade, soperhaps predisposed to do so. Java is way too constrained by itsrigid type system and the lack of closures rather than anything todo with frameworks. It was a great idea in the 90s, when it saved usfrom writing memory management code, but now we needsomething that saves us from writing 20 lines of boilerplate for aone-line callback. We also need something that treats database(preferably NoSQL) and network access code as first-class citizens inthe language. When was the last time anybody wrote actual filesystem access code? Yes, Java treats threading code as a first-classcitizen but compared to the elegance of node.js and its callbacksystem it feels clunky and cumbersome. In fact I think node.js isexactly where you should be looking to see the future ofdevelopment platforms.

    12.

    Robert X. Cringely1 mo, 3 wks ago

    This is a generic response to the preceding 12 comments. You mayall be correct and I could be totally full of crap. I did, after all,

    identify myself as a dope. But I do see a transition coming. Maybe Ihave it wrong in which case Im sure you folks will set me straightand well all learn something for it. But from a Big Picture

    13.

  • 8/3/2019 The Second Coming of Java

    9/26

    standpoint I still believe I am headed in the right direction.

    Ozten1 mo, 3 wks ago

    Java and .net have patent and/or cost issues, I dont see a secondcoming since this has gotten worse in the last year. Oh hai Oracle.

    Memcache, redis, and other in-memory caching systems make theSSD argument a moot point for many use cases. Why didnt

    memcache cause a surge in Java like language use?You analysis doesnt cover the C10K problem, which is the currentdriving change to web programming (evented architectures).

    Googles Dart is a Java like language, but I think the drivers are legaland organizational over performance characteristics.

    14.

    Phong Le1 mo, 3 wks ago

    Isnt the network and the browser the bottleneck in webdevelopment. I rarely hear anyone say the disk IO is the bottleneckin web performance. Steve Sounders made a career out of

    improving web sites by optimizing web page rendering.

    http://stevesouders.com/

    15.

    Stu

    1 mo, 2 wks ago

    Agreed. Plus Groovy is Java.

    16.

    Anonymous

    1 mo, 2 wks ago

    Hi Robert, whatever language your website is programmed in, thereis a mis-commented End ad tag string in it. (Look at the right of

    17.

  • 8/3/2019 The Second Coming of Java

    10/26

    the top ad banner on your page.)

    Stu1 mo, 2 wks ago

    Exactly, in fact with the likes of Groovy, Jython, JRuby etc Id say itsalready well on the way back.

    18.

    Kent1 mo, 2 wks ago

    Bob,

    Are you oblivious to the fact that Groovy compiles down to Javabyte code (just as if it had been written in Java) and runs in a JVM?Its a best-of-both-worlds scenario with the ease and flexibility ofdynamic languages (like Ruby or Perl) and the (relatively) betterperformance of Java. Bottom line is Groovy shouldnt be lumped inwith Ruby and Perl in your assessment of which languages arepending decline.

    19.

    Kent1 mo, 2 wks ago

    Basically, Groovy IS Java.

    20.

    Gareth Williams1 mo, 2 wks ago

    Most database/dynamic language websites today are made to scaleby using ram-based caches (e.g. varnish up-front and/ormemcached in the middle) to remove most of the database reads.SSD performance may make these redundant and simplify things,and speed up write-centric applications, but Im not convinced it

    will make the dynamic language speed enough of an issue to revertto more verbose and slightly faster Java. Newer JVM hostedlanguages are interesting though, and could bring the best of both

    21.

  • 8/3/2019 The Second Coming of Java

    11/26

    worlds.

    Hudin1 mo, 2 wks ago

    No mention of PHP? Like any language it has its weak points, but itsall over the place from Facebook to Wikipedia to this website withWordPress.

    22.

    Alex1 mo, 2 wks ago

    I agree with that. Unless oracle brings some big improvements injava 8, I dont see it having a second coming.

    However, the jvm ecosystem is very healthy and I could see alanguage like scala gaining more popularity. There is some definiteniceties about static typing (e.g. not having to step through adebugger just to figure out where the hell some method got duckpunched, etc). Clojure is also really cool and is gaining some goodtraction.

    23.

    Doug D1 mo, 2 wks ago

    Theres a development in this area that Im paying close attentionto, and its coming out of Apple. But first, lets talk about Facebook.

    You may recall that Facebook is written in PHP. My old startup

    company did a bunch of work with PHP in the mid 1990s, and insome sense its like a web-optimized flavor of Perl that usually getsembedded directly in C-based web servers. This makes stuff faster,but doesnt make it really *fast*. So, what Facebook does is, theyhave PHP *compilers*. They can, in essence, do all theirprototyping in PHP and then type make and have standaloneC++-level performance thingies that they use in production.

    So, Ruby is object oriented, but its not the same *kind* of objectoriented as C++ or Java. Its object model is much closer to the oldSmalltalk language than those other languages, which kinda makes

    24.

  • 8/3/2019 The Second Coming of Java

    12/26

    it the odd man out these days.

    Another language with an object model thats close to smalltalk isObjective-C, the language I used to program NeXT machines, andthat today is used to program MacOS and the iPhone.

    The Ruby and Objective-C object models are almost the same.

    So why not take Ruby, rip out the Ruby runtime, and slap theObjective-C runtime in there? You get a system where Ruby andObjective-C objects can toss messages back and forth with ease,where Ruby objects can subclass Objective-C objects and vice versa,and it works without being gross like JNI or (shudder) the way youextend PHP or Perl via C code (which I had to do back at my oldstartup company).

    Once youve done *that*, why not throw a Ruby *compiler* intothe mix? In essence, you can prototype in Ruby, type make, andget something thats got the performance of a compiled Objective-Capp. So, why not?

    Why not indeed. Apple did. Its not done yet, but its out there.

    http://www.macruby.com/

    This is exciting to me for two reasons. Once its refined:

    1) We may be able to get big fancy Ruby apps to have very nearlyC++ performance, and2) Since its only using Apple technologies, and is using the sameobject runtime as IOkit and stuff, we may well be able to programthe iPhone in Ruby instead of Objective-C if we wish. Which, oh, bythe way, may make a ton of Ruby gems available.

    Now, these days, my day job is as a (server-side) Java developer,and I do Ruby and Objective-C and iOS development and stuff as ahobbyist (and sort-of have been since NeXTstep 0.8, decades ago got to play with prerelease Cubes at Carnegie Mellon, which iswhere Mach was developed, so, well, if you know your OS history,

    you know why that makes sense).

    Which means, if youre right about Java coming back, I kinda win,but if this compiled Ruby on the Objective-C runtime thing reallytakes off, I *also* kinda win.

    Fun times!

    25.

  • 8/3/2019 The Second Coming of Java

    13/26

    HockeyBias.com1 mo, 2 wks ago

    There will be a continued first coming of .NET/C# in the enterprisewhere it is very common (at least here in the midwest).

    jason @ mobile website design1 mo, 2 wks ago

    My thoughts exactly as I read the article. Java as Java will not return

    a mutated version maybe.Mind you, with mobiles taking over the world, Java may still have apart to play due to it simplified acceptability on a mobile interface(or assumed!)

    26.

    Darwin1 mo, 2 wks ago

    Java is fine for large apps but not for mobile devices. Its uses toomany resources and is too insecure plus performance is iffy on

    various platforms.

    27.

    Orion1 mo, 2 wks ago

    With CPUs getting cheaper and faster and PaaS offerings allowingyou to scale horizontally with ease, developer productivity willtrump language efficiency in all but the largest scale projects.

    28.

    Kyle1 mo, 2 wks ago

    Couple points. First, you cant lump groovy in with the other

    examples because it compiles down into JVM bytecode same asJava. For the most part Groovy is just an alternative syntax of Java.Likewise Scala also compiles down into JVM bytecode. Secondly just

    29.

  • 8/3/2019 The Second Coming of Java

    14/26

    because Ruby has horrible horrible performance doesnt mean thatJava is the next logical choice. Java, via the JVM, has some really niceperformance without sacrificing a lot of the nice features that makeit easier to work with than something like C. Java however isshowing its age and is missing a lot of modern features (or has

    problematic implementations of certain features shoehorned in).Alternative up and coming languages such as Erlang, Scala, Clojure,Haskell, and to a lesser extent Python and Groovy, have similar, orsometimes better performance than Java, have a great manycompelling features Java doesnt have, and in some cases can evenleverage existing Java code. Now, with the exception of Python andGroovy all of the mentioned languages have fairly small developerbases and commercial support, but theyre actively growing, and

    any of them are possible candidates as the next big thing.

    Python is nice, and has definitely found a good niche, but Im notconvinced its compelling enough to displace Java. Likewise Groovyadds some nice improvements over Java, and could probablyreplace it in a lot of instances, but because its so close to Java itsuffers from many of the same drawbacks Java does. Of the JVMlanguages, Scala or Clojure seem like the most likely candidates to

    replace Java, but Clojure is hampered by the perception of Lisp inthe developer community, and Scala is fairly intimidating to newdevelopers. Likewise both Erlang and Haskell suffer from adaunting learning curve mostly due to the incredibly powerfulfunctional abstractions they provide that nevertheless require acompletely different conceptual approach to problem solving thanmost programmers are used to employing. If enough programmerscan overcome their Lisp prejudice, or man up and spend the time

    to learn the zen of functional, any of these languages could easilydisplace Java for web development.

    damour1 mo, 2 wks ago

    the future of programming is functional programming, all the new& cool languages are just adding functional programmingconcepts to their core, espcially the ones you cited + php. Its thebest way we know how to solve scale issues. OO & imperative was& is great for classic GUIs, but when 99% of code is service & UIsmore and more being just HTML or some other declarativeconstruct all the work is best covered by functional programming.

    ECMAScript (javascript) is a great functional language, and node.js isa prime example of how functional programming can lead tosimple elegant solutions.

    30.

  • 8/3/2019 The Second Coming of Java

    15/26

    RE: Java, they have pretty much completely missed the boat onbringing functional programming into the core laguage. luckily

    jpython, jruby, & the like have brought functional programming tothe JVM, but make no mistake, .NET is leading the way with its F#language, and all the great functional aspects being added to C#

    (closures, lambdas) as far as the pattern of multiplelanguages/paradigms working in one virtual machine.

    RE: your point about waiting for the DB (or other resources). Thesolution to this is asynchronous programming, which in turn issolved by functional programming. Thats why its the future orprogramming. SSDs dont solve the waiting for resource problem. If

    youre a developer and not excited about C#s upcoming new async

    model, then you havent looked into it enough yet. Waits no longerbecome an issue. The only barrier left is thedisconnected/synchronous request-response nature of HTTP, butwebsockets and the like are trying to break down those barrierstoo.

    Gustav K1 mo, 2 wks ago

    I LOVE your way of reasoning!

    Funny that for once you applied the same method to a technologyperspective, not just business..

    And being an oldschool C and Java develpoer, I have no regretsover your conclusions.

    As far as I know, several really large companies are skipping theSolid State disk level, and go directly to In Memory databases. Iwork with SAP products, and SAP is about to release such asolution, focused on their Business Intelligence system, so thetransition is close by.

    31.

    Chris Smith1 mo, 2 wks ago

    There will be a second coming in Java, but your assertions are just

    simply wrong, especially from a technical point of view. I meanSSDs? Cmon. Compilation is a non-issue i.e. looking at Eclipse, itcompiles stuff on the fly.

    32.

  • 8/3/2019 The Second Coming of Java

    16/26

    The reason people switched from Java is based on needs. Somepeople shifting out web sites dont need the dev overhead Java that is it. They are shifting noddy little applications out.

    Now most of the other side of the Java guys (the enterprise lot) who

    bothered to switch, switched to .Net/CLR platform which is turningout to be expensive to scale. Ive seen a lot of new projects beingshifted out in Java because its more cost-efficient, even from MSpartners recently.

    And for reference, Ruby is not easier than Java: its just different!

    jeffh1 mo, 2 wks ago

    Boulderdash to java. On the web, json > xml and dynamic is betterthan statically typed. You have something with optimizations but itis multicore that is important. The winner will be something akin topython & pypy http://pypy.org/

    Code yal8r,J

    33.

    Sean Jensen-Grey

    1 mo, 2 wks ago

    What Bob is getting at is this, We can afford to use slow language_implementations_ because we have so many other currentbottlenecks, once those bottlenecks are removed, these slowruntimes will stick out like a sore thumb.

    And that the biggest bottleneck right now is the database using

    spinnings disks where SSDs will provide at least two orders ofmagnitude of IOPs (think disk seeks).

    I agree, the JVM is already gaining more *popular traction*, it neverlost traction, it just wasnt cool. But cool doesnt really matter,websites that perform and stay up matter. The dynamic languagecrowd would say that, flexible websites that are quick to write anddeploy matters. And both are right.

    The argument that he makes for SSDs showing the inefficiencies ofslow runtimes also holds for runtimes. JRuby (on the JVM) is damnfast, PyPy (just in time compiler for Python) is also damn fast. You

    34.

  • 8/3/2019 The Second Coming of Java

    17/26

    can have dynamic and fast. Programmers are always trying to findthe right balance between productivity and speed, and yes the SSDchanges the equation.

    Alanl1 mo, 2 wks ago

    Groovy is Java well, yes, in the sense that most Java programsare valid Groovy programs. But Bobs point is speed, and currentlyGroovy does _not_ match Java (nowhere close) in speed due to all

    the dynamic dispatching and meta class handling required atruntime. Groovy++ (an attempt to introduce static types and typeinferencing into Groovy) shows some hope of closing theperformance gap, but, sadly, in some ways Groovy++ is _not_Groovy (some valid Groovy programs have different semantics asGroovy++ programs )

    Im surprised no one has mentioned Grails (grails.org Groovy on

    Rails), which, to many (including me), is Rails done right. No Rubyin sight.

    As many have mentioned here it is not Java that will make acomeback (it is long in the tooth and about as much fun as C++ tocode in) but the JVM. Since Java, Groovy, Scala (the one to watch) allcompile down to interoperable class files, your web service can useTomcat (Java) to host Grails ( Java and Groovy) to vend GSPs (Groovyas scripting language to generate web pages) while getting theheavy lifting done behind the scenes in Scala (did I say to watch outfor Scala ?) which offers an elegant mixture of object oriented andfunctional programming, with static typing (but using typeinferencing so you dont need the syntatical verbiage of Java to get

    your type checking done at compile time rather than debugging it(ha!) at run time). Oh, and in some cases Scala is _faster_ than Java(given the sophistication of the Scala compiler it can sometimesemit more efficient byte codes).

    Just my (longwinded) 2c.

    Alanl

    35.

    Daniel Sobral1 mo, 2 wks ago

    36.

  • 8/3/2019 The Second Coming of Java

    18/26

    You are looking at the wrong bottleneck. It is not application speedthat is a bottleneck it is programming speed. While applicationspeed is a major consideration when you have effectively won,reason why facebook compiles its PHP to C, that is a problem fewpeople have.

    No, the problem for most people creating web apps is to havesomething faster than the competition and to adapt faster than thecompetition. Slow beats non-existent every day.

    And THAT is the real reason why web frameworks are mostly donein dynamic languages Ruby on Rails, Python on Django, Groovyon Grails, etc. It optimizes the time it takes to build and modify

    these web applications, not the time it takes them to run. Which iswhy Twitter is still front-ended by Ruby on Rails, even though ituses other languages on performance-critical elements.

    As for application speed, JRuby, that is, Ruby on JVM, is pretty solidnowadays. It gains you most of Javas performance without losinganything in expressiveness and flexibility.

    I do agree with others that JVM is making a comeback, on the backs

    of other languages running on it: Scala, Clojure and JRuby just toname a few.

    On the other hand, the asynchronous character of modern webapplications is very well served by Javascript, so I expect Node.js tobe quite successful as well.

    Dean1 mo, 2 wks ago

    Did Java go away? I dont think any of the languages mentionedabove will go away, maybe some shifts along the way. And may aparadigm shift will come along with a new language that will

    surprise and please. Since we are really over due for one I think.

    37.

    Jack Green1 mo, 2 wks ago

    Java never left and never stopped growing. All the languagesdeveloped over the past decade have been fads. In the mean time,Java became the elephant in the elephant-sized room.

    38.

  • 8/3/2019 The Second Coming of Java

    19/26

    Chris1 mo, 2 wks ago

    I see a rather large problem with your argument. That Java doessomething different than Ruby or Python. All three compile tobytecode that runs in a VM. The only difference is that Ruby andPython call theirs an interpreter. This is mostly because thecompilation happens on the fly. I cant speak for Ruby, but Pythonactually outperforms Java for most tasks. The exception beingcomplex math, but for that theres Numpy.

    Also, the concern these days is with horizontal scalability. Very fewpeople are concerned with the performance of one request. If theyare, the biggest gains are achieved client side.

    I find it odd that you didnt attempt to measure/justify theperformance improvements gained by SSDs. Assuming that SSDsmake databases fast enough that they are no longer the

    bottleneck(a difficult assumption on my part.) The next bottleneckwould be the network, not the runtime. This is assuming an iobound workload, which is most websites.

    39.

    Chuckie

    1 mo, 2 wks ago

    Wow Bob,

    Great troll piece. Historically the interpreted language to compiledlanguage to interpreted language cycle has always been largelybased in hardware performance, i.e., if the hardware is fast enoughthen interpreted is likely okay. Otherwise, compilation is necessary.

    Where you argument falls down for me:

    1) JRuby, et al., are written on top of the JVM negating theperformance argument2) Java continues to increase in complexity3) Scala may well be a better Java

    While Java has become entrenched in the enterprise as the new

    COBOL, its fallen out of favor as a development language for manyreasons, not the least of which is Sun/Oracle dropping the ballconstantly. Like COBOL, Java will likely have a long lifespan. Like

    40.

  • 8/3/2019 The Second Coming of Java

    20/26

    COBOL, it will continue to decline in popularity in the face of thelanguage of the day with all of the shiny new features that Javatakes forever to implement. If youre banking on a resurgence of

    Java as a popular language, you might want to also look for theTooth Fairy, Santa Claus, and an honest investment banker.

    Greg1 mo, 2 wks ago

    PyPy says Sup?.

    41.

    James1 mo, 2 wks ago

    Forget spinning disks? Not for a while. While a single SSD (or two) in

    a Single Server is sweet, it doesnt scale as well as SAN AttachedStorage (or iSCSI or NFS or whatever) for that Database Clusterwhere I have racks of processing power. I still rely on my SAN.

    But you make a good point about the spinning disk. SSDs are stilltoo expensive for SANs to be price competitive but they are gettingthere. And with auto-tiering, they are getting even better, but I stilldont trust tiering with my most important data.

    Now, if you are a single developer and you need the speed and youdont have to worry about scaling out, then forget SSD and goFusion IO. Now that is FAST!

    42.

    Julian

    1 mo, 2 wks ago

    that is why I would personally pick http://helma.org and/orhttp://ringojs.org over Ruby on Rails and NodeJS.

    Having JVM as the bottom layer is the best thing I ever picked for aplatform.

    43.

    44.

  • 8/3/2019 The Second Coming of Java

    21/26

    Lorenzo1 mo, 2 wks ago

    Im afraid you have failed to consider that any, and I really meanany, language that is interpreted and slow today can be compiled

    with an optimizing compiler and be made really, really fast. There iseven a compiler to take java to machine code rather than to jvmbytecode.

    Scott

    1 mo, 2 wks ago

    Bob, youre right, the 2nd coming of Java is at hand. The problem inthe comments is, everyone who bought into the Ruby/Python/PHPframeworks bit still believes theyre right. However, theyre just notrunning a high enough volume site to realize how wrong they are.

    Sorry script fans, but compiled languages top scripting frameworksfor serious projects and honestly, this is the reason the 2nd comingof Java is more of a resonance than anything else. Java still powersthe big commerce sites, and the JVM does the heavy lifting even forWeb 2.0 sites like Twitter (see Scala http://www.scala-lang.org/).

    Even if functional languages are all the rage as I see in somecomments, theyll still run on the JVM (again see Scala).

    The problem is programmers get bored and need the next-

    big-thing. For a while the Java language stagnated and theinteresting developments have been in 3rd party frameworks likeSpring. Developers lost interest.

    However, as an IT manager, I can tell you that the majority of thedevelopers Ive interviewed over the past few years almost alwayshave more or more bullet points like: Ported .net application X to

    Java, or, Ported Rails application Y to Java. When I ask these

    developers why, the answer is almost always, Application X endedup being useful to the company, so to deploy it company-wide, wehad to port it to Java. The takeaway is that Java never really wentanywhere. Developers just got bored of it. However, at the end ofthe day, the enterprise applications are always ported to a languagethat runs on Suns JVM.

    45.

    CdrJameson46.

  • 8/3/2019 The Second Coming of Java

    22/26

    1 mo, 2 wks ago

    Javascript is the new C++; Its dirty, but it works.

    Java still needs compiling (ie. taking your punched cards to the

    mainframe) so isnt going to gain popularity amongstnon-programmers.

    Ruby is the new Cobol.

    Sean Stapleton1 mo, 2 wks ago

    I think youve missed a critical aspect of this, Bob, and itundermines the whole of your reasoning. Several othercommentors have hinted at it, but Ive not seen it stated explicitly:** You are assuming that speed is what matters in selection of alanguage/platform. **

    We can lease a *quite* beefy server for $1500 / month. Addanother 33% for network infrastructure (load balancer, etc) and callit $2000. Im sure others will point out that this is overpaying.

    What if we found that language+framework X in comparison toc++ / java ; allowed us to extract an additional Y% productivitybenefit from our development staff of Z developers. For what what

    values of X and Z does it become monumentally stupid to code our

    new web application in java vice X?

    47.

    roboprog1 mo, 2 wks ago

    Why is Scala intimidating? I admit, the opening chapter or two inthe book I bought seemed to go out of its way to make Scala lookodd, but its not that different from other non-Java languages(functions, closures, tuples like Python, Ruby, or even Perl). Plus,

    you can experiment with little scripts on top of existing Java code inyour app portfolio. Yummy!

    48.

    roboprog49.

  • 8/3/2019 The Second Coming of Java

    23/26

    1 mo, 2 wks ago

    >> Ruby is not easier than Java

    Really? I like the brevity of Ruby, from what little Ive done of it,

    compared to Java. Struts (or other XML domain specificlanguages) anyone?

    Now drop and give me 20 XML push-ups!

    Euro2cent1 mo, 2 wks ago

    > the kids who wrote Rails were too cool for Perl, which they saw asold school. But Ruby has nothing on Perl.

    Priceless.

    But, getting back to your point, which was that with SSD, fast disk

    access would make language speed matter: are you bonkers?

    Have loaded any regular web page lately? Its a clusterfuck ofslowly loading ads from ten different sources, plus Flashanimations soon to be replaced by CPU-sucking in HTML5 approvedfashion. And embedded videos.

    How the hell is the speed of the language that loads the 10% of realcontent going to matter?

    50.

    roboprog1 mo, 2 wks ago

    Slow implementations? Id sure like to see more variation on

    memory management. Simply having generational GC more oftenthat full sweep GC isnt good enough. Id like to have a referencecounting option on some popular languages. Even though it breaksthe semantics a bit (understatement, I know), it preserves localityof reference enough to avoid marching most of 4 GB of datathrough a 4 MB level N cache on a regular basis.

    51.

    roboprog52.

  • 8/3/2019 The Second Coming of Java

    24/26

    1 mo, 2 wks ago

    Exactly: Java (the language) *is* the COBOL of the 21st century.

    monopole1 mo, 2 wks ago

    Exactly what I was thinking. Jython, Iron Python or Psycho allow forJIT compiling.Given Oracles incredible bloodymindedness re Java in Android,

    Psycho or Unladen Swallow starts looking much better.

    53.

    JCBaby1 mo, 2 wks ago

    Im not sure you have a clue about Ruby at all. Ruby has way morethan just Hashtables and Arrays. It is an object oriented languageand you can implement what ever data structures in it that youwish.

    People also didnt take up Ruby instead of Perl simply because Perlwas old school and they wanted to be new and hip. Ruby offers alot when you want to create domain specific like languages. Theability in a Rails model to state something like a has_many or

    belongs_to or any of the other dsl type constructs it has wouldnt bepossible in Perl.

    What is also readily apparent is that you dont really know what ittakes to scale a website. It relies on quite a bit more then how fast agiven language is. Using a faster language will get you minimalgains compared caching and load balancing, both of which javabased applications need to scale as well. This includes the use of

    servers like apache and nginx as the first tier of the application toserve static content. There is no use in having ruby or java server upa static file when it can be done much faster by apache.

    Java is still heavily used in the Enterprise (read over blownexpensive overly complicated for no reason other then to paycontractors) space. Most people I know are moving away from the

    JEE based approach because most of the time it is way more than is

    needed. Java is still really big in the SOAP space as well, and thattoo is a fading area as corporations find that simple REST basedapplications using JSON and Javascript get the same thing done a

    54.

  • 8/3/2019 The Second Coming of Java

    25/26

    lot quicker and for a lot less money.

    Future web development will continue toward the the interpretedlanguages such as Ruby for sometime to come. CPU speed isgetting faster, CPU and memory is getting cheaper and platforms

    like Amazons EC2 that allow for massive horizontal scaling makefor ease and speed of development trumping language speed.

    I dont think you can be any further from the mark.

    Francis1 mo, 2 wks ago

    Actually you can get have your cake and eat it too JRuby code inRuby, run in Java bytecode. There are even debugging tools thatchain back to the Ruby source.

    I know of at least one company in the area, writing kiosk softwarefor hospitals, which are comfortable with Java, who simply say their

    code is Java but actually its Ruby on JRuby. And JRuby runs muchfaster than Ruby. Apparently this is mostly an artifact according tosome bright guys who have looked into it due to a poor garbagecollector implementation in Ruby and a great one in Java.

    55.

    Francis1 mo, 2 wks ago

    A wise man once said to me programming is aboutrepresentation. And hes right. Representation and execution areindependent things, mostly.

    56.

    Adam1 mo, 2 wks ago

    You mean like:

    Response.Write(Hello)

    in C# (Im certain its not more difficult in Java). To say that its goingto take 30x more lines to do something in java or .NET is justblatantly dishonest. Not to mention, hes talking JVM, so if you want

    57.

  • 8/3/2019 The Second Coming of Java

    26/26

    your ruby 1 liners there is JRuby.

    Dave1 mo, 2 wks ago

    Has anyone heard of Android? it runs a some popular smartphones? This Looks like JavaIt Walks like Java:http://developer.android.com/reference/android/net/ConnectivityManager.html

    And Eclipse tools are the sweetest things ever! The problem with.Net is that it lacked checked exceptions:http://cafe.elharo.com/programming/bruce-eckel-is-wrong/

    58.

    0