News for hackers. Stuff that matters.
Re:Oracle’s Java 11 trap by wheresvic1 on Wednesday September 26, 2018 @08:17AM (#18075098)
I'm not sure Java is worth the effort at this point. If I'm going to have to keep updating every 6 months, I would rather use Go, which seems to have all that Java has to offer + the backing of a huge corporation.
Re:Oracle’s Java 11 trap by StreamBright on Wednesday September 26, 2018 @09:11AM (#18075536)
Right, what is the equivalent of the following in Go?

import org.apache.hadoop.*;

import org.rapidoid.net.Server;

In case you are wondering people not only using languages for language features but also for the quality/quantity of libraries available in those languages. This is why is very hard to bootstrap a new language. Java has a ton of great libraries that are essential to big data and high performance backend services that you do not have in Go. I could mention tooling as well but we can skip it for now, the aforementioned library situation is enough to not to consider go already. Btw. the new OpenJDK releases are just fine for running Java and many companies use it extensively already (like AWS EMR for example) to run production code.

Re:Oracle’s Java 11 trap by ofrzeta on Wednesday September 26, 2018 @09:32AM (#18075709)

  import (
  	"net/http"
  	"github.com/labstack/echo"
  )
For Hadoop I guess it depends on what you want to do. For instance there are modules for HDFS but also several module by Hortonworks: https://de.hortonworks.com/blog/go-hadoop-err-hadoop-and-go/
Re:Oracle’s Java 11 trap by dig1 on Wednesday September 26, 2018 @10:12AM (#18076105)
But you still need jre/jdk to serve HDFS ;) Also, there are tons of other missing products like ElasticSearch, Kafka, Spark...
Re:Oracle’s Java 11 trap by bborud on Wednesday September 26, 2018 @11:42AM (#18077077)
Sure, but fight the battles you can win. The database I use wasn't written in C. That doesn't mean I have to write applications in C.
Re:Oracle’s Java 11 trap by bborud on Thursday October 04, 2018 @06:56AM (#18138750)
*was written in C
Re:Oracle’s Java 11 trap by ofrzeta on Wednesday September 26, 2018 @10:50AM (#18076498)
Yeah, I don't doubt that there are many more Java libs. But for most uses cases today there are Golang libs as well. There's a Kafka client by Confluent, Elasticsearch client etc.
Re:Oracle’s Java 11 trap by VLM on Wednesday September 26, 2018 @10:07AM (#18076036)
We used the same argument a decade ago with Perl, look where that got us.

Java in 2018 is Perl in 2008, roughly.

Re:Oracle’s Java 11 trap by StreamBright on Wednesday September 26, 2018 @10:48AM (#18076479)
Actually I never used this argument for Perl. Perl was not really used for things like big data or high performance backend applications. You can use this reasoning for C++ or C# on the other hand and it stands. Many "big data" things re in C++ and a lot of high performance projects out there.

If you want to compare nifty scripting languages than you can compare Perl with Ruby or Python. In 2008 I was happily using Ruby for most of things we used to do in Perl, a bit slower yes, but who cared and it was much more readable.

Re:Oracle’s Java 11 trap by lizmat on Wednesday September 26, 2018 @07:37PM (#18081155)
> If you want to compare nifty scripting languages than you can compare Perl with Ruby or Python.

Perhaps even compare with Perl 6 :-)

Re:Oracle’s Java 11 trap by koolba on Wednesday September 26, 2018 @08:32AM (#18075230)
How is that any different than updating a Go app? If a security issue arises in an older version of Go, it doesn’t magically fix in your app until you recompile it.

Java also has a multi decade history of remaining backwards compatible across major version upgrades. Barring known exceptions for things explicitly being removed, I don’t see that changing.

Re:Oracle’s Java 11 trap by carlmr on Wednesday September 26, 2018 @08:50AM (#18075377)
>Java also has a multi decade history of remaining backwards compatible across major version upgrades.

And Google has a history of starting and scrapping products without much attention to the remaining userbase. I'm not saying Go is one of these.

Re:Oracle’s Java 11 trap by lclarkmichalek on Wednesday September 26, 2018 @08:58AM (#18075435)
Then what are you saying?
Re:Oracle’s Java 11 trap by carlmr on Wednesday September 26, 2018 @10:18AM (#18076147)
That Go may or may not be a trustworthy foundation to build on for the future you can't say it yet, but Google isn't very trustworthy on this front, while for Java oracle has been very boring but stable.
Re:Oracle’s Java 11 trap by lngnmn1 on Wednesday September 26, 2018 @09:26AM (#18075647)
Having an statically linked a.out which depends only on ABI is such a bliss.
Re:Oracle’s Java 11 trap by wrmsr on Wednesday September 26, 2018 @02:54PM (#18079118)
Having a self-contained single JAR that doesn't even depend on the host's ABI or OS and requires exactly one system dep - a JVM - is even nicer. And if you do want a statically linked self-contained ABI-OS specific binary Java give you that too now.
Re:Oracle’s Java 11 trap by pharaohgeek on Wednesday September 26, 2018 @08:39AM (#18075289)
Personally, I wish Swift had a larger server-side ecosystem around it. I love the language, and some of the new web app frameworks (Vapor, Perfect, Kitura, etc.) are really great. However, there just aren't as many open-source, third-party libraries as there are for Java. To me, that's really Java's strength. There are libraries or clients for EVERYTHING.
Re:Oracle’s Java 11 trap by veidr on Wednesday September 26, 2018 @08:59AM (#18075449)
I like Swift, too, and if it's a rap battle between Swift and Java, I think Swift has to emphasize C interop, and more recently (or perhaps "soonly"?) Python interop.

But regardless, we're gonna have to give it a few years to get a Swift ecosystem even trying to get on the mic in the same venues as Java/JDK.

Re:Oracle’s Java 11 trap by ofrzeta on Wednesday September 26, 2018 @09:45AM (#18075832)
I don't think this is gonna happen. There's no huge momentum behind Swift on the server. And when IBM is losing interest it will be reduced by 50 percent. Apple doesn't seem to be too much interested in Swift on a server (apart from releasing SwiftNIO, that's about it). When you take a look at the commit stats of Vapor on GitHub you will notice that there's not much going on either.
Re:Oracle’s Java 11 trap by gutnor on Wednesday September 26, 2018 @08:50AM (#18075378)
Java has 2 release cycles. A yearly release with all the latest and greatest available without waiting but whose support stops right after the next release is out. Java 9 went out of support when 10 was released and 10 went out of support when 11 was released.

Then there is still the regular one, release that get support for a very long time. That LTS releases and Java 11 is the first LTS release since Java 8. Java 8 will still be supported for a while even though Java 11 is out, giving you years to update.

So basically if you like how it worked before, in the days of Java 1.4, 5, 6, ... you just need to only look at LTS releases.

Re:Oracle’s Java 11 trap by Insanity on Wednesday September 26, 2018 @08:22AM (#18075135)
We use both at work and they really are two different beasts.

Especially if you use Java for desktop applications rather than server-side. And Generics was not part of Go's plan for a long time.

I enjoy both but would not say Go offers all that Java has or vice versa

Re:Oracle’s Java 11 trap by Aaargh20318 on Wednesday September 26, 2018 @08:21AM (#18075128)
> I would rather use Go, which seems to have all that Java has to offer

Really ? What is the Go equivalent of J2EE ? Do Go appservers exist that offer all the features that something like Payara (Glassfish), JBoss or WebSphere does ?

Re:Oracle’s Java 11 trap by ofrzeta on Wednesday September 26, 2018 @08:25AM (#18075167)
What's the point of J2EE or an application server? You can get functionality such as templates, management, monitoring, persistence through other means as well.
Re:Oracle’s Java 11 trap by randomsearch on Wednesday September 26, 2018 @08:38AM (#18075276)
Think the point is that the Java ecosystem is vastly greater than Go. And ecosystem mattes.
Re:Oracle’s Java 11 trap by thdespou on Thursday September 27, 2018 @05:27AM (#18083069)
That may change in a few years. Currently, a ton of new software is built with Go.

Kubernetes, Istio, Prometheus, All the Hashicorp stuff, hyperledger, traefik , kong you name it.

Re:Oracle’s Java 11 trap by philbarr on Wednesday September 26, 2018 @08:48AM (#18075371)
For Go, what are those means? (I'm just starting with Go so it would be useful to see how we get all that stuff)
Re:Oracle’s Java 11 trap by ofrzeta on Wednesday September 26, 2018 @08:56AM (#18075422)
Go templates come with the standard library, an ORM could be GORM, for monitoring you can get metrics of the runtime through the package of the same name also in the standard library or on an application level use the Prometheus client API to make your application talk to the Prometheus monitoring system.
Re:Oracle’s Java 11 trap by riku_iki on Wednesday September 26, 2018 @03:57PM (#18079662)
I think the premise of JEE is that you label your class by @SessionBean annotation, and everything is installed automatically for that class: RPC, load balancing, security, monitoring, and you don't need to shop for individual components and find the way how to glue them together. How this premise is implemented is another story. I am not sure about quality because didn't use jee for last 10 years, but when I was using it, IBM stack was far ahead of everything on the market, and was like your private PaaS with cloud functions, but with high license fees of course.
Re:Oracle’s Java 11 trap by ofrzeta on Thursday September 27, 2018 @07:38AM (#18083536)
That sounds good. I wonder how it is implemented, though. I read through the WildFly feature list and there are several features you mention, such as clustering or failover. I wonder how you get to bridge the gap from the application to the underlying infrastructure, though.

EDIT: I see from the docs http://docs.wildfly.org/14/High_Availability_Guide.html that you need to configure an Infinispan cluster, what looks like a non-trivial operation.

Re:Oracle’s Java 11 trap by Aaargh20318 on Thursday September 27, 2018 @10:40AM (#18084935)
Paraya uses HazelCast for clustering by default. IIRC all it needs is for the servers to be in the same network.
Re:Oracle’s Java 11 trap by raverbashing on Wednesday September 26, 2018 @08:36AM (#18075260)
> What is the Go equivalent of J2EE ?

I consider not having a suffocating bureaucratic "framework" that can be replaced by simpler and more straightforward constructs most of the time a feature and not a bug

But those that grow up under a bureaucracy tend to miss it

Re:Oracle’s Java 11 trap by ilikehurdles on Wednesday September 26, 2018 @08:39AM (#18075286)
The parent said Go has all that Java has to offer. I would be surprised if the standard library was in the same magnitude of size.
Re:Oracle’s Java 11 trap by Leace on Wednesday September 26, 2018 @08:49AM (#18075373)
Yes, exactly. Having used Java and many other languages for years Java's strongest point is tooling - there are high quality tools for any aspect of software lifecycle. A lot of them available for free.

Of course new languages are quickly getting more and more tools but sometimes I feel that they are just reinventing the wheel (sometimes squared). For example: it's easy to host a mirror Maven repository, the file structure is very simple, even with per-project setting. It's not that straightforward with npm or cargo, they push you into centralized model with paid private repositories (npm).

Re:Oracle’s Java 11 trap by Aaargh20318 on Thursday September 27, 2018 @05:22AM (#18083046)
> I consider not having a suffocating bureaucratic "framework" that can be replaced by simpler and more straightforward constructs most of the time a feature and not a bug

All those 'simpler and more straightforward' constructs cost a lot of extra time and effort, there's a lot of reinventing the wheel going on. Can you do something similar to just adding a field annotated with @PersistenceContext or @Resource and having a database connection injected ? Does it also allow for complete decoupling between the configuration of that datasource and the application itself ? Can it resize the database connection pools live, and then push that config change to an entire cluster, without writing a single line of extra code ?

Re:Oracle’s Java 11 trap by grey-area on Wednesday September 26, 2018 @08:51AM (#18075379)
What is the Go equivalent of J2EE?

無

Re:Oracle’s Java 11 trap by anticensor on Wednesday September 26, 2018 @04:24PM (#18079915)
This Chinese character means "nothing, not at all" for you people who do not speak Chinese.
Re:Oracle’s Java 11 trap by dudul on Wednesday September 26, 2018 @08:26AM (#18075179)
You seem to confuse the language Java and the JVM. Updating the JVM (which you are not forced to do) does not mean that you need to update your code base. That's actually Java's main strength (and weakness), it is compatible all the way to version 1.0
Re:Oracle’s Java 11 trap by wheresvic1 on Wednesday September 26, 2018 @09:20AM (#18075611)
Aha, you are correct - this is only JVM related.

In theory, the changes should really be minimal but to be sure we would need to have a very strong CI and stress testing platform to be sure about upgrading.

All good projects should have this in place anyways.

Re:Oracle’s Java 11 trap by holtalanm on Wednesday September 26, 2018 @09:27AM (#18075655)
go ahead and try building a sufficiently large project written in java 6 on the java 9 jdk and tell me how backward compatible it is. Go ahead, I'll wait.
Re:Oracle’s Java 11 trap by dudul on Wednesday September 26, 2018 @09:47AM (#18075853)
Maybe you can point us towards which parts would break compatibility. Go ahead, I'll wait.
Re:Oracle’s Java 11 trap by bloodgain on Wednesday September 26, 2018 @04:29PM (#18079964)
The applet library.

Back in college, I created a small desktop app that played a WAV file when any key was pressed, but could be closed silently with the mouse. (Its purpose, along with a recording of me screaming, was to train my cats not to sleep on my laptop.) It would have been written in Java 1.4 or maybe 1.3. The applet library was a pretty standard way to open and play an audio file, because it was simple.

Fast forward a few years, I came across the app again and decided to see if it still worked. It didn't work with the existing JRE on my box. So I rebuilt it with a more recent JDK (1.6, I think). It built, but it still didn't work.

See, Java 1.5 AKA "Java 2" had a new memory model, deprecated a lot of things (like applets), and started modernizing heavily. They attempted to maintain backward compatibility, giving us things like the awful erasure-based generics, but it really wasn't fully BC. They really should have just done what Python did with Python 3 and make Java 2.0 non-BC.

This isn't an isolated incident, either. A major project I worked on updated from Java 1.6 to 1.7 and it broke several things. They were fixed pretty quickly, but it still wasn't truly backwards compatible. It's just like the Java claim that you can write once and run anywhere, which is only half-jokingly referred to by devs as "write once, debug everywhere".

Re:Oracle’s Java 11 trap by brokensegue on Wednesday September 26, 2018 @09:51AM (#18075893)
That's not what they claimed...
Re:Oracle’s Java 11 trap by maaaats on Wednesday September 26, 2018 @08:26AM (#18075185)
Why do you have to "keep updating every 6 months"? Lots of projects stuck on java6, 7 or 8 without updating for years.
Re:Oracle’s Java 11 trap by Cthulhu_ on Wednesday September 26, 2018 @08:46AM (#18075348)
That's probably a misconception based on the new Oracle JDK release and support cycles; new release every 6 months, at which point support for the -1 version is immediately stopped (unless you have a commercial license or something). This LTS version is probably different (hence the name LTS), but it's also commercial.

Anyway it's a misconception because it only applies to the Oracle JDK, OpenJDK still follows a different support structure I believe.

Re:Oracle’s Java 11 trap by christophilus on Wednesday September 26, 2018 @08:33AM (#18075239)
Yeah. I'm kinda with you. You've got .NET Core and Go as reasonable contenders for new projects, but it's hard to justify moving an existing product away from Java. Not to mention, it seems that Java's still got a huge head-start on existing libraries vs Go / .NET.

Er... Well, I'm with you for a different reason than updating... I'm thinking that Oracle is just shifting the licensing ground too much for my comfort.

Re:Oracle’s Java 11 trap by filomeno on Wednesday September 26, 2018 @10:15AM (#18076130)
But why all the effort needed when you can simply use the open-source Java version called OpenJDK? It's virtually identical to Oracle's JDK, only without commercial support, and it's licensed the same way those other alternatives you're suggesting.

Besides, dotnet core would not be a better replacement: it's got a large corporation behind too, so nothing prevents them to do the same in the future.

Re:Oracle’s Java 11 trap by ilikehurdles on Wednesday September 26, 2018 @08:37AM (#18075274)
Why does Go not have updates? Has Go been abandoned?

This is an LTS release. It will be available for more than a few months.

Re:Oracle’s Java 11 trap by xtrapolate on Wednesday September 26, 2018 @09:55AM (#18075936)
So Go is somehow immune from a similar fate? What's the reasoning behind this?
Re:Oracle’s Java 11 trap by kitd on Wednesday September 26, 2018 @09:16AM (#18075563)
+ the backing of a huge corporation.

Poor little Oracle & IBM.

Re:Oracle’s Java 11 trap by pjmlp on Wednesday September 26, 2018 @09:41AM (#18075794)
Let me just try that nice Go UI framework, oh wait...