back to article Onwards to Valhalla: Java ain't dead yet and it's only getting bigger

Scale was big at the JavaOne conference this week. Spotify lauded its success scaling with Java, and Oracle execs practically squealed as they reeled off adoption statistics. Big Red believes the next ten years belong to Java. "We want the next decade to be Java first, Java always," vice president Mark Cavage said on stage. …

  1. ForthIsNotDead

    It occurs to me...

    ...that with all the issues that Java has with garbage collection and heap management (for obvious reasons, being pure/almost pure OOP platform) that using it for web applications of any sort is just a, well... crap idea.

    It comes across that all these clever folks that are beavering away so gallantly at Java to improve (in particular) GC are doing so in an effort to be able to shoe-horn Java into an arena in which (IMO) it has never been particularly well suited. I actually like Java very much. I'm not an expert at it, but I can put together code that works reliably and behaves itself. I've never considered it for web stuff, though, ever, despite all the webby technologies in its orbit.

    Web is just not what Java is good at.

    Java lives on the desktop, and the back-office. Not on the web.

    1. Tom Samplonius

      Re: It occurs to me...

      > Web is just not what Java is good at.

      It is the only thing Java is good at.

      > Java lives on the desktop, and the back-office. Not on the web.

      You are the only person that believes that Java even belongs on the desktop, let alone lives. And your back-office is probably web anyways.

    2. JMiles

      Re: It occurs to me...

      Java on the server is well suited. The GC issues happen only in the most latency sensitive situations - think financial transactions and the like (and can be worked around - take a look at some of the high performance messaging software on java). Your average Java web app can be chugging along without anyone noticing a stop-the-world GC occurring.

      When you compare it to node, ruby, php java tends to scale well too. Then you add to the mix the millions of java developers and probably the widest set of libraries that exist anywhere. Why exactly wouldn't you think it's suited server side?

      1. werdsmith Silver badge

        Re: It occurs to me...

        Why exactly wouldn't you think it's suited server side?

        Because Oracle are involved.

      2. ForthIsNotDead

        Re: It occurs to me...

        Hi JMiles,

        Well, simply because (and I'm happy to be corrected on this, I'm in no way a Java expert, having really only used it for desktop applications) it seems to me to be a bit of a mega-huge lumbering beast that uses a huge amount of memory, and (to a lesser extent, these days, admittedly) CPU resources).

        When you are doing web, you want small, tiny kernals, each doing a small part of the overall web application. You wouldn't spin up multiple copies of a huge lumbering JVM for that, would you?

        Genuine question - not sarcasm :-)

        1. Anonymous Coward
          Anonymous Coward

          Re: It occurs to me...

          "You wouldn't spin up multiple copies of a huge lumbering JVM for that, would you?"

          That's exactly what you do, especially in this age of instant-start containerisation. JVMs are comparatively heavy (at least until Jigsaw really kicks in), but still small enough that optimising for their weight is definitively premature.

          The question isn't "Is the runtime too heavy?" but "Would I save anything switching to a lighter runtime?"

          Now you could switch to a much nippier environment like Go but the fact is the JVM ecosystem is rich, mature, well established and well supported by both people and infrastructure. It's not the fastest or lightest platform, but it's close enough that those two things are not concerns for the overwhelming majority of applications. That makes it a winner in many, if not most, organisations.

          Take a look at Spotify's talks on the topic - they started out as an all-Python shop for many of the same reasons you're stating. They're now all-JVM, all the time.

    3. HmmmYes

      Re: It occurs to me...

      Speeding up JVM garbage collection is like tuning up a tractor for F1.

      Pointless.

  2. HmmmYes

    Java != JVM.

    Java (language) is shit. No other word for it. Written at the wrong level.

    The JVM is more interesting, providing there's a better way of programming it.

    If the JVM just shipped with a simple CLI, socket support and safe, easy way of interfacing to C shared objects support then JVM would be a no brainer.

    1. ForthIsNotDead

      Interesting that you think that. I wonder what leads to you think Java (the language) is shit.

      At the moment, I'm writing libraries (to be consumed/used by others in a product) in C++. They are based on classes/objects as one would expect. I'm trying to keep it as simple as possible for everyone.

      Given C++'s tortured pointer syntax, which sometimes still ties me up in knots after 20 years, I know which language I'd rather use!

      1. HmmmYes

        Why?

        ~20 years of having to implement odds + sods in Java.

        I avoid it now, bar maintaining existing stuff.

        C++ ABI was a massive PITA. The whole concept of object orientation as a solution (remind, whats the problem?) has been grossly oversold. The entire OO industry picked up on the pointless bit of OO - interfaces, and spent the next 30 years implementing it wrong - starting at MI to abortions like CORBA. And missed the simple thing that made Smalltalk a success - messages.

        Anything that adds complexity and/or unexpected behaviour to a large software base should be avoided.

        Final point, Java is ~25 years old. They are discussing better support for libraries FFS.

        1. Anonymous Coward
          Anonymous Coward

          @HmmmYes

          "The entire OO industry picked up on the pointless bit of OO - interfaces, and spent the next 30 years implementing it wrong - starting at MI to abortions like CORBA. And missed the simple thing that made Smalltalk a success - messages."

          Yes, if only someone had created a version of C that implemented messages. They could have perhaps called it, I dunno, Objective-C? I'm sure it would have been worldwide success and not confined to a niche OS where people had to use it under sufferance because there was little alternative.

          Truth is, for the machine level at which C++ is pitched messages are a pointless irrelevance. I don't want data I send to an object disappear into a black hole if the receiver doesn't have an interface for that type, I want to know at compile time that it'll actually get there! (Whether it does anything with it or not is another matter, but at least it means the class author considered it)

          1. HmmmYes

            Re: @HmmmYes

            Yes and No.

            Objective-C, from NextStep-> OSX can hardly be called a a niche, can it?

            The NS/OSX development tools and productivity were rightly considered very good.

            The Mac dev site documentation of the framework.

            I think Objective C's lack of utilisation outside of Apple can be put down to MS betting the farm on C++.

            What C++ system framworks can you name? MFC - shudder, Taligent??

            I think OO is only productive when you have very dynamic method dispatch.

            ObjC ships with a (small) runtime.

            C++ did not have an ABI until v. recently - you know, when people decided after 30 off years of different binaries not being able to link.

            1. Anonymous Coward
              Anonymous Coward

              Re: @HmmmYes

              "Objective-C, from NextStep-> OSX can hardly be called a a niche, can it?"

              Even Apple programmers try and avoid it as much as possible, which is why Objective-C++ came about.

              "I think Objective C's lack of utilisation outside of Apple can be put down to MS betting the farm on C++."

              Partly, but bear in mind that C++ was in use in the Unix world long before MS got interested in it and gcc supported C++ some features a long time before MC VC++ did. In fact gcc is still ahead in the latest feature set though tbh its a law of diminshing returns now wrt to C++ spec. Seems to me its only updated these days to justify the commitees existence rather than because anyone was crying out for the new features.

              "I think OO is only productive when you have very dynamic method dispatch."

              Productivity isn't the issue, its more a case of code clarity IMO.

              "C++ did not have an ABI until v. recently"

              There was always the C ABI: extern "C" etc.

              1. HmmmYes

                Re: @HmmmYes

                ????????

                C++ 1st book was 1986.

                Barely used.

                C++ 2nd/Grey book was 1991.

                This when C++ started being used for everything, mainly MS's system libraries.

                I cant remember any Unix C++ framework i nth 90s.

                1. Anonymous Coward
                  Anonymous Coward

                  Re: @HmmmYes

                  "This when C++ started being used for everything, mainly MS's system libraries.

                  "I cant remember any Unix C++ framework i nth 90s."

                  FFS, C++ was initially developed on Unix you clown. Stroustrup started it in 1979 at AT&T when MS was just a start-up no one had yet heard of, and originally it was a C++ (or C with classes back then) to C pre-compiler. Learn some fscking history before you post crap. MS is a follower, not a leader in pretty much everything.

                  1. HmmmYes

                    Re: @HmmmYes

                    FFS leam terminology.

                    I know C++'s history. The bits of the 5ESS I worked on were in C.

                    Again name one, wildly used Unix C++ framework , go on.

                    1. Anonymous Coward
                      Anonymous Coward

                      Re: @HmmmYes

                      "Again name one, wildly used Unix C++ framework , go on."

                      It doesn' t need one (though IIRC ACE was one attempt for sockets programming that sank without trace). The entire unix system API is in C, has been for 40 years, works well and is fairly easy to use for any competant coder. However if you want to talk about graphics on X win there are a number of C++ APIs you can use, eg Qt. MFC was AFAIK an alternative to win32 which was borderline unusable, and includes a lot of functionality that is better implemented in the C++ STL.

                      1. HmmmYes

                        Re: @HmmmYes

                        ACE was a fine attempt.

                        But, to quote end of the day, as soon as you bring a network into play and start implementing distributed state then you you ought to be using Erlang/OTP. Google Steve Vinoski on this.

                        QT is a v good library. I did wonder if MS buying Nokia also was trying o knock out QT, which it must see as threat. But again, he magic sauce in QT is the signals/slot, achived via the QT preprocessor.

                        WFC predates the the heavy going C++ template stuff - predating the STL.

            2. Lysenko

              Re: @HmmmYes

              Objective-C, from NextStep-> OSX can hardly be called a a niche, can it?

              In a word, yes. There are about 700 million iPhones out there. That's a niche. Why? Well, there are about 50 billion ARM processors, 12 billion PICs, 5 billion MIPS (I can't be bothered to look up x86) so that's 700M out of 67B ~= 1% (one percent). Calling that a niche is charitable - it's more of a rounding error.

              1. HmmmYes

                Re: @HmmmYes

                And whats the software than runs on those ARM, MIPS, x86 processors?

                Its mainly C, or VMs written in C.

      2. Anonymous Coward
        Anonymous Coward

        "Given C++'s tortured pointer syntax, which sometimes still ties me up in knots after 20 years, I know which language I'd rather use!"

        If you still can't understand pointers after 20 years then yes, perhaps it is best you stick with a language that doesn't have them and has to have a hack like autoboxing to get around this limitation.

        1. ForthIsNotDead

          I didn't say I don't understand pointers, did I? Where above did I say "I don't understand pointers?".

          I said that C's pointers syntax is tortured. And it is.

          And I'm not the only one who thinks that. https://whydoesitsuck.com/cpp-sucks-for-a-reason/

          It must be great to be you with your super l33t programming skillz. Look how much better you are than everyone else.

          1. Anonymous Coward
            Anonymous Coward

            "It must be great to be you with your super l33t programming skillz. Look how much better you are than everyone else."

            Oh for heavens sake, some of the pointer syntax could have been designed better and the distinction between pointers and arrays in C can be unnecessarily wooly at times, but tortured? Come off it. If you want tortured syntax then Perl would be your first port of call.

  3. Spicer
    Thumb Up

    Wow, what a change!

    For once* it seems ElReg blesses us with a real technical article (and about Java, no less) without the author feeling compelled to fire cheap shots at Oracle or IBM or Microsoft

    I know this is the editorial tone that most people who come here expect, but it IS refreshing, at least once in a while.

    Well done!

    (* although you've been known to have done that before, a long long time ago!)

  4. Anonymous Coward
    Anonymous Coward

    When Oracle rewrite their core RDBMS engine in Java...

    ... then I might take notice of all their sales pitching about it. In the meantime I'll maintain my opinion of it as a fairly useful but memory grabbing and inefficient front end and middleware application programming language, nothing more.

  5. Gunboat Diplomat

    Depends on your situation

    It's not a case of Java being good or bad, it's about using the right tool for the job. If you need to build things quickly and aren't concerned about maximising the use of your compute resources, a language like python is probably better for your organisation (significantly fewer lines of code, quicker to dev, easier to cross-train staff, etc).

    If you're doing something like large scale data stream processing (100s of thousands of records per second and above) using Apache Spark and budget constraints mean you need to make the most of your cluster then you are much better off on the JVM (Scala / Java /etc).

    Note: Of course you can scale Python to extreme levels (youtube) and Java (Google). However, most organisations don't need extreme scale.

    1. James 47

      Re: Depends on your situation

      > If you're doing something like large scale data stream processing (100s of thousands of records per second and above) using Apache Spark and budget constraints mean you need to make the most of your cluster then you are much better off on the JVM (Scala / Java /etc).

      Why not just use C++? No f******g around.

      1. Anonymous Coward
        Anonymous Coward

        Re: Depends on your situation

        If you could point us to a broadly supported C++ distributed computing framework that'd be great.

  6. GlorianChris

    Missed Opportunity

    The Alibaba customisation of Tomcat really should have been called AliCat.

  7. ValleyBoy

    Java not dead?

    Why do we keep seeing these conversations about Java? It is no more likely to disappear than C++. or COBOL.

    The only people who seem to think that Java is dead are born-again .NET Evangelists, or Orthodox C developers.

    Zealots!

  8. Ilsa Loving

    Cave Johnson here...

    I'll be honest, we're throwing Java at the wall here to see what sticks. No idea what it'll do. Probably nothing. Best-case scenario, you might get some superpowers. Worst case, some tumors, which we'll cut out.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like