Live data from Hacker News

An Opinionated Guide to Modern Java, Part 2

blog.paralleluniverse.co

41–50 of 138 posts

Re: An Opinionated Guide to Modern Java, Part 2

#41
post #15

Nice article - Many of the suggestions (single-jar deployment, metrics, slf4j logging, etc) are all wrapped up for you in Dropwizard http://dropwizard.io , which we use and love.

Sharing a lot of the Dropwizard philosophy, there is Spring Boot ( http://projects.spring.io/spring-boot/ ), which we use and love as well.

I'm not clear, just did a ton of Googling and I think maybe spring.io is related to the Spring Framework at VMware. That would mean it's dependency injection.

Re: An Opinionated Guide to Modern Java, Part 2

#42
post #34

Earlier quoted context omitted.

Java - "run anywhere" (supposedly) Docker - "The Linux Container Engine" Think you've got your answer there.

> Java - "run anywhere" (supposedly) Sure, it's a nice benefit, but is it actually used? In 2014, how many of us are doing backend/service development in java and not deploying to Linux machines? There are certainly still backend/service java shops out there that aren't deploying to linux machines, but I wager that most are. Regardless of those numbers though, why do the linux shops actually care about being able to…

    In 2014, how many of us are doing backend/service development in java and not deploying to Linux machines?
Among silicon valley webstartups? Not many. But there still are a lot of Windows based installs large megacorps and small offices all over. For a lot of them, switching away is not an option so you might want to support them.

Re: An Opinionated Guide to Modern Java, Part 2

#43

Earlier quoted context omitted.

> "Java application servers are dead" and since there's no alternative to Java application servers here's a solution I cooked up myself. The alternative are servlet containers, like Jetty or Tomcat. Jetty for example is very popular and really good and can be easily embedded inside an app for single JAR deployments, which is an awesome way to deploy an app btw.

Fair enough, it's a matter of terminology then, I guess? Generally I think of Tomcat as being as much of an application server as something like JBoss is. Granted, JBoss/Wildfly has a lot more enterprise-y features, but they both 'serve' web 'applications.'

I was talking about app/servlet containers (Tomcat, JBoss, WebSphere, etc.), vs embedded, single-app servers (Jetty, embedded Tomcat, and Dropwizard, which is essentially Jetty+Jersey+added goodies)

Re: An Opinionated Guide to Modern Java, Part 2

#44
post #15

Nice article - Many of the suggestions (single-jar deployment, metrics, slf4j logging, etc) are all wrapped up for you in Dropwizard http://dropwizard.io , which we use and love.

Do you just use it for producing a REST API or do you use it to render HTML, handle session management etc.?

We use it for both REST APIs on top our services and rendering templated HTML. We had to bastardize the asset bundle extension considerably for that though. Once we got things working we didn't want to go back.

Re: An Opinionated Guide to Modern Java, Part 2

#45
post #18

I like the overview given to JVM tooling, many developers are fully unaware of what JVMs (not only the official one from Oracle) offer in terms of monitoring. If you want to go really low level, a few of them even show the generated assembly code by the JIT.

You can do this from the JVM command line with "-XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly". (it's kind of a mess, though)

Re: An Opinionated Guide to Modern Java, Part 2

#46
post #39
post #15

Nice article - Many of the suggestions (single-jar deployment, metrics, slf4j logging, etc) are all wrapped up for you in Dropwizard http://dropwizard.io , which we use and love.

We'll discuss Dropwizard in part 3, but the single-jar deployment is not really solved by Dropwizard. To launch the server you still need to configure the JVM at the command line.

An off topic question; Would it be possible to have an RSS feed on your blog? I see you have Twitter but personally I don't really use that.

Re: An Opinionated Guide to Modern Java, Part 2

#47
post #46
post #39

Earlier quoted context omitted.

We'll discuss Dropwizard in part 3, but the single-jar deployment is not really solved by Dropwizard. To launch the server you still need to configure the JVM at the command line.

An off topic question; Would it be possible to have an RSS feed on your blog? I see you have Twitter but personally I don't really use that.

http://blog.paralleluniverse.co/rss.xml

Re: An Opinionated Guide to Modern Java, Part 2

#48
post #29

Earlier quoted context omitted.

Java - "run anywhere" (supposedly) Docker - "The Linux Container Engine" Think you've got your answer there.

Docker is an option if you're deploying on Linux, which is what the majority of server deployments use these days. Chef works on the rest of the Unixes, including OS X. If you're deploying Java on a Windows server, you're doing it wrong. And the days of needing to use different development and production OSs are over...if you develop in Windows and deploy on some Unix variant, you should be using a VM. I'm still not…

> If you're deploying Java on a Windows server, you're doing it wrong.

You're assuming you have control over what the customer's servers are.

Re: An Opinionated Guide to Modern Java, Part 2

#49

As far as packaging and deployment of a native executable goes, I thought it odd to not mention Excelsior JET ( http://www.excelsiorjet.com ) as I believe that's the only Java compiler that can handle all of the JDK (gcj isn't there yet).

Native executables are not always what you want. For example, they don't get security patches.

Re: An Opinionated Guide to Modern Java, Part 2

#50

As a Java developer, I thought this article had some interesting information about logging and monitoring. However, the deployment section had my scratching my head a little. I've never totally understood why people want to make fat jars. It seems like a process full of headaches since you can't have jars in jars. Wouldn't it be much easier to create a regular zip file with a small script to set the classpath and and…

Actually, you can have Jars in Jars. Of course, you need to do the lifting yourself. It is actually very nice to have a simple unpack / installation application inside a Jar and to unpack the actual application from this Jar. In this way, the only requirement for unpack / installation is the JVM, which you already require to run the application itself. This is much more elegant than a platform dependent unpack / installation (installer binary or ZIP plus Windows Batch or a Shell script).
Post reply on HN